PSCF v1.1
pspc/sweep/FieldState.tpp
1#ifndef PSPC_FIELD_STATE_TPP
2#define PSPC_FIELD_STATE_TPP
3
4/*
5* PSCF - Polymer Self-Consistent Field Theory
6*
7* Copyright 2016 - 2022, 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
13#include <pspc/System.h>
14#include <pspc/field/FFT.h>
15#include <pscf/mesh/Mesh.h>
16#include <pscf/crystal/Basis.h>
17#include <util/misc/FileMaster.h>
18
19// #include <util/format/Str.h>
20// #include <util/format/Int.h>
21// #include <util/format/Dbl.h>
22
23namespace Pscf {
24namespace Pspc
25{
26
27 using namespace Util;
28
29 /*
30 * Constructor.
31 */
32 template <int D, class FT>
34 : fields_(),
35 unitCell_(),
36 systemPtr_(0)
37 {}
38
39 /*
40 * Constructor.
41 */
42 template <int D, class FT>
44 : fields_(),
45 unitCell_(),
46 systemPtr_(0)
47 { setSystem(system); }
48
49 /*
50 * Destructor.
51 */
52 template <int D, class FT>
54 {}
55
56 /*
57 * Set association with system, after default construction.
58 */
59 template <int D, class FT>
61 {
62 if (hasSystem()) {
63 UTIL_CHECK(systemPtr_ = &system);
64 } else {
65 systemPtr_ = &system;
66 }
67 }
68
69} // namespace Pspc
70} // namespace Pscf
71#endif
FieldState()
Default constructor.
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
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
Definition: global.h:68
C++ namespace for polymer self-consistent field theory (PSCF).
Utility classes for scientific computation.
Definition: accumulators.mod:1