PSCF v1.4.0
scft/sweep/BasisFieldState.h
1#ifndef RP_BASIS_FIELD_STATE_H
2#define RP_BASIS_FIELD_STATE_H
3
4/*
5* PSCF - Polymer Self-Consistent Field
6*
7* Copyright 2015 - 2025, The Regents of the University of Minnesota
8* Distributed under the terms of the GNU General Public License.
9*/
10
11#include <prdc/field/FieldState.h>
12#include <string>
13
14namespace Pscf {
15namespace Rp {
16
17 using namespace Util;
18 using namespace Prdc;
19
35 template <int D, class T>
37 : public FieldState<D, DArray<double>, typename T::System>
38 {
39 public:
40
46 void allocate();
47
53 void read(const std::string & filename);
54
60 void write(const std::string & filename);
61
67 void getSystemState();
68
74 void setSystemState(bool newCellParams);
75
76 using FieldStateT = FieldState<D, DArray<double>, typename T::System>;
77
78 // Inherited member functions
83
84 protected:
85
90
96 BasisFieldState(typename T::System& system);
97
98 ~BasisFieldState() = default;
99
100 private:
101
102 using FieldIoT = typename T::FieldIo;
103
104 };
105
106} // namespace Rp
107} // namespace Pscf
108
109#endif
const DArray< double > & field(int monomerId) const
BasisFieldState()
Default constructor.
void write(const std::string &filename)
Write state to file.
void getSystemState()
Store the current state of the associated system.
void allocate()
Allocate all fields.
void read(const std::string &filename)
Read state from file.
typename T::System & system()
Get associated System by reference.
void setSystemState(bool newCellParams)
Set the state of the associated system to this state.
Periodic fields and crystallography.
Definition complex.cpp:11
Class templates for real-valued periodic fields.
PSCF package top-level namespace.