PSCF v1.1
pspc/sweep/BasisFieldState.h
1#ifndef PSPC_BASIS_FIELD_STATE_H
2#define PSPC_BASIS_FIELD_STATE_H
3
4/*
5* PSCF - Polymer Self-Consistent Field Theory
6*
7* Copyright 2016 - 2021, The Regents of the University of Minnesota
8* Distributed under the terms of the GNU General Public License.
9*/
10
11#include "FieldState.h"
12#include <string>
13
14namespace Pscf {
15namespace Pspc
16{
17
18 using namespace Util;
19
23 template <int D>
24 class BasisFieldState : public FieldState<D, DArray<double> >
25 {
26 public:
27
32
39
44
50 void allocate();
51
57 void read(const std::string & filename);
58
64 void write(const std::string & filename);
65
71 void getSystemState();
72
78 void setSystemState(bool isFlexible);
79
80 // Inherited member functions
87
88 };
89
90 #ifndef PSPC_BASIS_FIELD_STATE_TPP
91 // Suppress implicit instantiation
92 extern template class BasisFieldState<1>;
93 extern template class BasisFieldState<2>;
94 extern template class BasisFieldState<3>;
95 #endif
96
97} // namespace Pspc
98} // namespace Pscf
99#endif
FieldState for fields in symmetry-adapted basis format.
void read(const std::string &filename)
Read state from file.
void getSystemState()
Copy the current state of the associated system.
void allocate()
Allocate all fields.
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).
const DArray< double > & field(int monomerId) const
Get a field for a single monomer type by const reference.
const UnitCell< D > & unitCell() const
Get UnitCell (i.e., lattice type and parameters) by const reference.
const DArray< DArray< double > > & fields() const
Get array of all fields by const reference.
System< D > & system()
Get associated System by reference.
void setSystem(System< D > &system)
Set association with System, after default construction.
Main class for SCFT simulation of one system.
Definition: pspc/System.h:76
Dynamically allocatable contiguous array template.
Definition: DArray.h:32
C++ namespace for polymer self-consistent field theory (PSCF).
Utility classes for scientific computation.
Definition: accumulators.mod:1