1#ifndef PSCF_UNIT_CELL_TPP
2#define PSCF_UNIT_CELL_TPP
12#include <util/format/Dbl.h>
13#include <util/format/Int.h>
49 template <
class Archive,
int D>
51 const unsigned int version)
93 out <<
"crystal_system" << std::endl
94 <<
" " << cell.lattice_<< std::endl;
95 out <<
"N_cell_param" << std::endl
97 out <<
"cell_param " << std::endl;
108 void readFieldHeader(std::istream& in,
109 int& ver1,
int& ver2,
111 std::string& groupName,
142 void writeFieldHeader(std::ostream &out,
144 UnitCell<D>
const & cell,
145 std::string
const & groupName,
148 out <<
"format " <<
Int(ver1,3) <<
" " <<
Int(ver2,3) << std::endl;
149 out <<
"dim" << std::endl
150 <<
" " << D << std::endl;
152 out <<
"group_name" << std::endl
153 <<
" " << groupName << std::endl;
154 out <<
"N_monomer" << std::endl
155 <<
" " << nMonomer << std::endl;
int nParameter_
Number of parameters required to specify unit cell.
FArray< double, 6 > parameters_
Parameters used to describe the unit cell.
void setLattice()
Compute all private data, given latticeSystem and parameters.
bool isInitialized_
Has this unit cell been fully initialized?
Base template for UnitCell<D> classes, D=1, 2 or 3.
Wrapper for a double precision number, for formatted ostream output.
Wrapper for an int, for formatted ostream output.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
void writeUnitCellHeader(std::ostream &out, UnitCell< D > const &cell)
Write UnitCell<D> to a field file header (fortran PSCF format).
void readUnitCellHeader(std::istream &in, UnitCell< D > &cell)
Read UnitCell<D> from a field file header (fortran PSCF format).
void serializeEnum(Archive &ar, T &data, const unsigned int version=0)
Serialize an enumeration value.
C++ namespace for polymer self-consistent field theory (PSCF).
Utility classes for scientific computation.
std::istream & operator>>(std::istream &in, Pair< Data > &pair)
Input a Pair from an istream.
std::ostream & operator<<(std::ostream &out, const Pair< Data > &pair)
Output a Pair to an ostream, without line breaks.