PSCF v1.3
FieldGeneratorBase.h
1#ifndef PSCF_FIELD_GENERATOR_BASE_H
2#define PSCF_FIELD_GENERATOR_BASE_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 <util/param/ParamComposite.h> // base class
12#include <pscf/sweep/ParameterModifier.h> // base class
13
14namespace Pscf {
15
16 using namespace Util;
17
39 {
40
41 public:
42
46 enum Type {Mask, External, None};
47
52
57
61 void generate();
62
66 virtual bool needsUpdate() const = 0;
67
76 virtual void checkCompatibility() = 0;
77
83 Type type() const;
84
109 bool isDependent() const;
110
111 protected:
112
116 virtual void compute() = 0;
117
125
128
129 };
130
131 // Inline member functions
132
133 // Return Type enumeration value (Mask, External, or None)
136
137 // Is this object dependent on parameters of another FieldGeneratorBase?
139 { return isDependent_; }
140
141}
142#endif
Type type_
Type of field (Mask, External, or None).
virtual void checkCompatibility()=0
Check that the system is compatible with these fields.
Type
Enum representing the type of field (mask, external field, or none).
void generate()
Checks if fields need to be (re)generated.
virtual void compute()=0
Compute the field(s) and store where the System can access.
bool isDependent() const
Is this object dependent on parameters of another FieldGeneratorBase?
Type type() const
Return Type enumeration value (Mask, External, or None)
virtual bool needsUpdate() const =0
Check whether system has changed such that the field(s) need updating.
bool isDependent_
Is this object dependent on parameters of another FieldGeneratorBase?
ParamComposite()
Constructor.
PSCF package top-level namespace.
Definition param_pc.dox:1