1#ifndef PSPC_BASIS_FIELD_STATE_TPP
2#define PSPC_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().basis().nBasis();
63 for (
int i = 0; i < nMonomer; ++i) {
64 if (field(i).isAllocated()) {
67 field(i).allocate(nBasis);
80 system().fieldIo().readFieldsBasis(filename, fields(), unitCell());
89 system().fieldIo().writeFieldsBasis(filename, fields(), unitCell());
100 int nMonomer = system().mixture().nMonomer();
101 int nBasis = system().basis().nBasis();
103 for (i = 0; i < nMonomer; ++i) {
106 for (j = 0; j < nBasis; ++j) {
107 stateField[j] = systemField[j];
112 unitCell() = system().unitCell();
121 system().setWBasis(fields());
123 system().setUnitCell(unitCell());
void read(const std::string &filename)
Read state from file.
void getSystemState()
Copy the current state of the associated system.
BasisFieldState()
Default constructor.
void allocate()
Allocate all fields.
~BasisFieldState()
Destructor.
void write(const std::string &filename)
Write state to file.
void setSystemState(bool isFlexible)
Set the state of the associated system to this state.
Record of a state of a System (fields + unit cell).
Main class for SCFT 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.
C++ namespace for polymer self-consistent field theory (PSCF).
Utility classes for scientific computation.