1#ifndef PSCF_FIELD_GENERATOR_H
2#define PSCF_FIELD_GENERATOR_H
11#include <pscf/sweep/ParameterModifier.h>
12#include <util/param/ParamComposite.h>
40 enum Type {Mask, External, Both, None};
Abstract base class for objects that generate fields for ImposedFields.
virtual void checkCompatibility()=0
Check that the system is compatible with these fields.
Type type() const
Return Type enumeration value (Mask, External, or None)
FieldGenerator()
Constructor.
void setup()
Allocate, check compatibility, calculate, and store the field(s)
~FieldGenerator()
Destructor.
virtual bool isGenerated() const =0
Check whether the field(s) have been generated.
virtual void generate()=0
Generate the field(s) and store where the Iterator can access.
void update()
Check whether system has changed and update the field(s) if necessary.
Type
Enum representing the type of field (mask, external field, or both).
virtual double modifyStress(int paramId, double stress) const
Modify stress value if necessary.
bool isDependent() const
Is this object dependent on the parameters of another FieldGenerator?
virtual void allocate()=0
Allocate container(s) necessary to generate and store field(s)
bool isDependent_
Is this object dependent on the parameters of another FieldGenerator?
virtual bool updateNeeded() const =0
Check whether system has changed such that the field(s) need updating.
Type type_
Type of field (Mask, External, Both, or None)
virtual double stressTerm(int paramId) const
Get contribution to the stress from this imposed field.
Base class allowing subclasses to define sweepable parameters.
An object that can read multiple parameters from file.
PSCF package top-level namespace.
Utility classes for scientific computation.