1#ifndef RPC_BASIS_FIELD_STATE_TPP
2#define RPC_BASIS_FIELD_STATE_TPP
11#include "BasisFieldState.h"
12#include "FieldState.tpp"
53 int nMonomer = system().mixture().nMonomer();
55 if (fields().isAllocated()) {
58 fields().allocate(nMonomer);
61 int nBasis = system().domain().basis().nBasis();
63 for (
int i = 0; i < nMonomer; ++i) {
64 if (field(i).isAllocated()) {
67 field(i).allocate(nBasis);
80 FieldIo<D> const & fieldIo = system().domain().fieldIo();
92 FieldIo<D> const & fieldIo = system().domain().fieldIo();
104 int nMonomer = system().mixture().nMonomer();
105 int nBasis = system().domain().basis().nBasis();
107 for (i = 0; i < nMonomer; ++i) {
110 for (j = 0; j < nBasis; ++j) {
111 stateField[j] = systemField[j];
116 unitCell() = system().domain().unitCell();
125 system().setWBasis(fields());
127 system().setUnitCell(unitCell());
void readFieldsBasis(std::istream &in, DArray< DArray< double > > &fields, UnitCell< D > &unitCell) const
Read concentration or chemical potential fields from file.
void writeFieldsBasis(std::ostream &out, DArray< DArray< double > > const &fields, UnitCell< D > const &unitCell) const
Write concentration or chemical potential field components to file.
void write(const std::string &filename)
Write state to file.
BasisFieldState()
Default constructor.
void allocate()
Allocate all fields.
void setSystemState(bool isFlexible)
Set the state of the associated system to this state.
~BasisFieldState()
Destructor.
void read(const std::string &filename)
Read state from file.
void getSystemState()
Copy the current state of the associated system.
File input/output operations and format conversions for fields.
Record of a state of a System (fields + unit cell).
Main class for SCFT or PS-FTS simulation of one system.
Dynamically allocatable contiguous array template.
File containing preprocessor macros for error handling.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
PSCF package top-level namespace.
Utility classes for scientific computation.