1#ifndef PSCF_IMPOSED_FIELDS_TMPL_H
2#define PSCF_IMPOSED_FIELDS_TMPL_H
11#include <pscf/iterator/FieldGenerator.h>
12#include <util/param/ParamComposite.h>
13#include <util/param/Factory.h>
103 std::string
type()
const;
182 virtual double modifyStress(
int paramId,
double stress)
const;
Abstract base class for objects that generate fields for ImposedFields.
Base class defining mask & external fields to impose on the calculation.
virtual double modifyStress(int paramId, double stress) const
Modify the stress value if necessary.
void readParameters(std::istream &in)
Read parameters from input stream.
void update()
Check whether system has changed, update the field(s) if necessary.
FieldGenerator const & fieldGenerator1() const
Return const references to the FieldGenerator child objects.
void setup()
Allocate, check compatibility, calculate, and store the field(s).
ImposedFieldsTmpl()
Constructor.
virtual void createGenerators()=0
Create FieldGenerator objects for mask and/or external field.
void setParameter(std::string name, DArray< int > ids, double value, bool &success)
Set the value of a specialized sweep parameter.
~ImposedFieldsTmpl()
Destructor.
double correctedStress(int paramId, double stress) const
Correct the stress value if necessary.
double getParameter(std::string name, DArray< int > ids, bool &success) const
Get the value of a specialized sweep parameter.
FieldGenerator * fieldGenPtr2_
Pointer to the second FieldGenerator object (optional).
FieldGenerator * fieldGenPtr1_
Pointer to the first FieldGenerator object (required).
GArray< ParameterType > getParameterTypes()
Return specialized sweep parameter types to add to a Sweep object.
std::string type() const
Get the type string associated with this object.
Base class allowing subclasses to define sweepable parameters.
virtual void setParameter(std::string name, DArray< int > ids, double value, bool &success)
Set the value of a specialized sweep parameter.
virtual double getParameter(std::string name, DArray< int > ids, bool &success) const
Get the value of a specialized sweep parameter.
Dynamically allocatable contiguous array template.
An automatically growable array, analogous to a std::vector.
An object that can read multiple parameters from file.
PSCF package top-level namespace.
Utility classes for scientific computation.