PSCF v1.3
|
Main class, representing one complete system. More...
#include <System.h>
Public Member Functions | |
Construction and Destruction | |
System () | |
Constructor. | |
~System () | |
Destructor. | |
Lifetime (Actions in Main Program) | |
void | setOptions (int argc, char **argv) |
Process command line options. | |
virtual void | readParam (std::istream &in) |
Read input parameters (with opening and closing lines). | |
void | readParam () |
Read input parameters from default param file. | |
virtual void | readParameters (std::istream &in) |
Read body of parameter block (without opening and closing lines). | |
void | readCommands (std::istream &in) |
Read and process commands from an input stream. | |
void | readCommands () |
Read and process commands from the default command file. | |
Field Theory Computations | |
void | compute (bool needStress=false) |
Solve the modified diffusion equation once, without iteration. | |
void | computeStress () |
Compute SCFT stress. | |
int | iterate (bool isContinuation=false) |
Iteratively solve a SCFT problem. | |
void | sweep () |
Sweep in parameter space, solving an SCF problem at each point. | |
void | simulate (int nStep) |
Perform a field theoretic simulation (PS-FTS). | |
void | clearCFields () |
Mark c-fields and free energy as outdated or invalid. | |
Unit Cell Modifiers | |
void | setUnitCell (UnitCell< D > const &unitCell) |
Set parameters of the associated unit cell. | |
void | setUnitCell (FSArray< double, 6 > const ¶meters) |
Set parameters of the associated unit cell. | |
void | clearUnitCellData () |
Notify System members that unit cell parameters have been modified. | |
Field Containers | |
CFieldContainer< D > const & | c () const |
Get the monomer concentration (c) fields (const). | |
WFieldContainer< D > & | w () |
Get the chemical potential (w) fields (non-const). | |
WFieldContainer< D > const & | w () const |
Get the chemical potential (w) fields (const). | |
WFieldContainer< D > & | h () |
Get the external potential (h) fields (non-const). | |
WFieldContainer< D > const & | h () const |
Get the external potential (h) fields (const). | |
Mask< D > & | mask () |
Get the mask (non-const). | |
Mask< D > const & | mask () const |
Get the mask (const). | |
Component Object Accessors | |
Mixture< D > const & | mixture () const |
Get the Mixture (const). | |
MixtureModifier< D > & | mixtureModifier () |
Get the MixtureModifier (non-const). | |
Interaction & | interaction () |
Get the Interaction (non-const). | |
Interaction const & | interaction () const |
Get the Interaction (const). | |
Domain< D > const & | domain () const |
Get the Domain (const). | |
bool | hasEnvironment () const |
Does this system have an Environment? | |
Environment & | environment () |
Get the Environment (non-const). | |
Environment const & | environment () const |
Get the Environment (const). | |
ScftThermo< D > & | scft () |
Get the ScftThermo object (non-const). | |
ScftThermo< D > const & | scft () const |
Get the ScftThermo object (const). | |
bool | hasIterator () const |
Does this system have an Iterator? | |
Iterator< D > & | iterator () |
Get the Iterator (non-const). | |
Iterator< D > const & | iterator () const |
Get the Iterator (const). | |
bool | hasSweep () const |
Does this system have a Sweep? | |
bool | hasSimulator () const |
Does this system have a Simulator? | |
Simulator< D > & | simulator () |
Get the Simulator (non-const). | |
Simulator< D > const & | simulator () const |
Get the Simulator (const). | |
FileMaster & | fileMaster () |
Get the FileMaster (non-const). | |
FileMaster const & | fileMaster () const |
Get the FileMaster (const). | |
Property Output | |
void | writeParamNoSweep (std::ostream &out) const |
Write partial parameter file to an ostream. | |
Timers | |
void | writeTimers (std::ostream &out) const |
Write timer information to an output stream. | |
void | clearTimers () |
Clear timers. | |
Public Member Functions inherited from Util::ParamComposite | |
ParamComposite () | |
Constructor. | |
ParamComposite (const ParamComposite &other) | |
Copy constructor. | |
ParamComposite (int capacity) | |
Constructor. | |
virtual | ~ParamComposite () |
Virtual destructor. | |
void | resetParam () |
Resets ParamComposite to its empty state. | |
virtual void | readParamOptional (std::istream &in) |
Read optional parameter file block. | |
virtual void | writeParam (std::ostream &out) const |
Write all parameters to an output stream. | |
virtual void | load (Serializable::IArchive &ar) |
Load all parameters from an input archive. | |
virtual void | loadOptional (Serializable::IArchive &ar) |
Load an optional ParamComposite. | |
virtual void | loadParameters (Serializable::IArchive &ar) |
Load state from archive, without adding Begin and End lines. | |
virtual void | save (Serializable::OArchive &ar) |
Saves all parameters to an archive. | |
void | saveOptional (Serializable::OArchive &ar) |
Saves isActive flag, and then calls save() iff isActive is true. | |
void | readParamComposite (std::istream &in, ParamComposite &child, bool next=true) |
Add and read a required child ParamComposite. | |
void | readParamCompositeOptional (std::istream &in, ParamComposite &child, bool next=true) |
Add and attempt to read an optional child ParamComposite. | |
template<typename Type> | |
ScalarParam< Type > & | read (std::istream &in, const char *label, Type &value) |
Add and read a new required ScalarParam < Type > object. | |
template<typename Type> | |
ScalarParam< Type > & | readOptional (std::istream &in, const char *label, Type &value) |
Add and read a new optional ScalarParam < Type > object. | |
template<typename Type> | |
CArrayParam< Type > & | readCArray (std::istream &in, const char *label, Type *value, int n) |
Add and read a required C array parameter. | |
template<typename Type> | |
CArrayParam< Type > & | readOptionalCArray (std::istream &in, const char *label, Type *value, int n) |
Add and read an optional C array parameter. | |
template<typename Type> | |
DArrayParam< Type > & | readDArray (std::istream &in, const char *label, DArray< Type > &array, int n) |
Add and read a required DArray < Type > parameter. | |
template<typename Type> | |
DArrayParam< Type > & | readOptionalDArray (std::istream &in, const char *label, DArray< Type > &array, int n) |
Add and read an optional DArray < Type > parameter. | |
template<typename Type, int N> | |
FArrayParam< Type, N > & | readFArray (std::istream &in, const char *label, FArray< Type, N > &array) |
Add and read a required FArray < Type, N > array parameter. | |
template<typename Type, int N> | |
FArrayParam< Type, N > & | readOptionalFArray (std::istream &in, const char *label, FArray< Type, N > &array) |
Add and read an optional FArray < Type, N > array parameter. | |
template<typename Type, int N> | |
FSArrayParam< Type, N > & | readFSArray (std::istream &in, const char *label, FSArray< Type, N > &array, int size) |
Add and read a required FSArray < Type, N > array parameter. | |
template<typename Type, int N> | |
FSArrayParam< Type, N > & | readOptionalFSArray (std::istream &in, const char *label, FSArray< Type, N > &array, int size) |
Add and read an optional FSArray < Type, N > array parameter. | |
template<typename Type> | |
CArray2DParam< Type > & | readCArray2D (std::istream &in, const char *label, Type *value, int m, int n, int np) |
Add and read a required CArray2DParam < Type > 2D C-array. | |
template<typename Type> | |
CArray2DParam< Type > & | readOptionalCArray2D (std::istream &in, const char *label, Type *value, int m, int n, int np) |
Add and read an optional CArray2DParam < Type > 2D C-array parameter. | |
template<typename Type> | |
DMatrixParam< Type > & | readDMatrix (std::istream &in, const char *label, DMatrix< Type > &matrix, int m, int n) |
Add and read a required DMatrix < Type > matrix parameter. | |
template<typename Type> | |
DMatrixParam< Type > & | readOptionalDMatrix (std::istream &in, const char *label, DMatrix< Type > &matrix, int m, int n) |
Add and read an optional DMatrix < Type > matrix parameter. | |
template<typename Type> | |
DSymmMatrixParam< Type > & | readDSymmMatrix (std::istream &in, const char *label, DMatrix< Type > &matrix, int n) |
Add and read a required symmetrix DMatrix. | |
template<typename Type> | |
DSymmMatrixParam< Type > & | readOptionalDSymmMatrix (std::istream &in, const char *label, DMatrix< Type > &matrix, int n) |
Add and read an optional DMatrix matrix parameter. | |
Begin & | readBegin (std::istream &in, const char *label, bool isRequired=true) |
Add and read a class label and opening bracket. | |
End & | readEnd (std::istream &in) |
Add and read the closing bracket. | |
Blank & | readBlank (std::istream &in) |
Add and read a new Blank object, representing a blank line. | |
void | loadParamComposite (Serializable::IArchive &ar, ParamComposite &child, bool next=true) |
Add and load a required child ParamComposite. | |
void | loadParamCompositeOptional (Serializable::IArchive &ar, ParamComposite &child, bool next=true) |
Add and load an optional child ParamComposite if isActive. | |
template<typename Type> | |
ScalarParam< Type > & | loadParameter (Serializable::IArchive &ar, const char *label, Type &value, bool isRequired) |
Add and load a new ScalarParam < Type > object. | |
template<typename Type> | |
ScalarParam< Type > & | loadParameter (Serializable::IArchive &ar, const char *label, Type &value) |
Add and load new required ScalarParam < Type > object. | |
template<typename Type> | |
CArrayParam< Type > & | loadCArray (Serializable::IArchive &ar, const char *label, Type *value, int n, bool isRequired) |
Add a C array parameter and load its elements. | |
template<typename Type> | |
CArrayParam< Type > & | loadCArray (Serializable::IArchive &ar, const char *label, Type *value, int n) |
Add and load a required CArrayParam< Type > array parameter. | |
template<typename Type> | |
DArrayParam< Type > & | loadDArray (Serializable::IArchive &ar, const char *label, DArray< Type > &array, int n, bool isRequired) |
Add an load a DArray < Type > array parameter. | |
template<typename Type> | |
DArrayParam< Type > & | loadDArray (Serializable::IArchive &ar, const char *label, DArray< Type > &array, int n) |
Add and load a required DArray< Type > array parameter. | |
template<typename Type, int N> | |
FArrayParam< Type, N > & | loadFArray (Serializable::IArchive &ar, const char *label, FArray< Type, N > &array, bool isRequired) |
Add and load an FArray < Type, N > fixed-size array parameter. | |
template<typename Type, int N> | |
FArrayParam< Type, N > & | loadFArray (Serializable::IArchive &ar, const char *label, FArray< Type, N > &array) |
Add and load a required FArray < Type > array parameter. | |
template<typename Type, int N> | |
FSArrayParam< Type, N > & | loadFSArray (Serializable::IArchive &ar, const char *label, FSArray< Type, N > &array, int size, bool isRequired) |
Add and load an FSArray < Type, N > array parameter. | |
template<typename Type, int N> | |
FSArrayParam< Type, N > & | loadFSArray (Serializable::IArchive &ar, const char *label, FSArray< Type, N > &array, int size) |
Add and load a required FSArray < Type > array parameter. | |
template<typename Type> | |
CArray2DParam< Type > & | loadCArray2D (Serializable::IArchive &ar, const char *label, Type *value, int m, int n, int np, bool isRequired) |
Add and load a CArray2DParam < Type > C 2D array parameter. | |
template<typename Type> | |
CArray2DParam< Type > & | loadCArray2D (Serializable::IArchive &ar, const char *label, Type *value, int m, int n, int np) |
Add and load a required < Type > matrix parameter. | |
template<typename Type> | |
DMatrixParam< Type > & | loadDMatrix (Serializable::IArchive &ar, const char *label, DMatrix< Type > &matrix, int m, int n, bool isRequired) |
Add and load a DMatrixParam < Type > matrix parameter. | |
template<typename Type> | |
DMatrixParam< Type > & | loadDMatrix (Serializable::IArchive &ar, const char *label, DMatrix< Type > &matrix, int m, int n) |
Add and load a required DMatrixParam < Type > matrix parameter. | |
template<typename Type> | |
DSymmMatrixParam< Type > & | loadDSymmMatrix (Serializable::IArchive &ar, const char *label, DMatrix< Type > &matrix, int n, bool isRequired) |
Add and load a symmetric DSymmMatrixParam < Type > matrix parameter. | |
template<typename Type> | |
DSymmMatrixParam< Type > & | loadDSymmMatrix (Serializable::IArchive &ar, const char *label, DMatrix< Type > &matrix, int n) |
Add and load a required DSymmMatrixParam < Type > matrix parameter. | |
void | addParamComposite (ParamComposite &child, bool next=true) |
Add a child ParamComposite object to the format array. | |
Begin & | addBegin (const char *label) |
Add a Begin object representing a class name and bracket. | |
End & | addEnd () |
Add a closing bracket. | |
Blank & | addBlank () |
Create and add a new Blank object, representing a blank line. | |
std::string | className () const |
Get class name string. | |
bool | isRequired () const |
Is this ParamComposite required in the input file? | |
bool | isActive () const |
Is this parameter active? | |
Public Member Functions inherited from Util::ParamComponent | |
virtual | ~ParamComponent () |
Destructor. | |
void | setIndent (const ParamComponent &parent, bool next=true) |
Set indent level. | |
std::string | indent () const |
Return indent string for this object (string of spaces). | |
template<class Archive> | |
void | serialize (Archive &ar, const unsigned int version) |
Serialize this ParamComponent as a string. | |
Public Member Functions inherited from Util::Serializable | |
virtual | ~Serializable () |
Destructor. | |
Public Member Functions inherited from Util::MpiFileIo | |
MpiFileIo () | |
Constructor. | |
MpiFileIo (const MpiFileIo &other) | |
Copy constructor. | |
bool | isIoProcessor () const |
Can this processor do file I/O ? |
Additional Inherited Members | |
Public Types inherited from Util::Serializable | |
typedef BinaryFileOArchive | OArchive |
Type of output archive used by save method. | |
typedef BinaryFileIArchive | IArchive |
Type of input archive used by load method. | |
Static Public Member Functions inherited from Util::ParamComponent | |
static void | initStatic () |
Initialize static echo member to false. | |
static void | setEcho (bool echo=true) |
Enable or disable echoing for all subclasses of ParamComponent. | |
static bool | echo () |
Get echo parameter. | |
void | setClassName (const char *className) |
Set class name string. | |
void | setIsRequired (bool isRequired) |
Set or unset the isActive flag. | |
void | setIsActive (bool isActive) |
Set or unset the isActive flag. | |
void | setParent (ParamComponent ¶m, bool next=true) |
Set this to the parent of a child component. | |
void | addComponent (ParamComponent ¶m, bool isLeaf=true) |
Add a new ParamComponent object to the format array. | |
template<typename Type> | |
ScalarParam< Type > & | add (std::istream &in, const char *label, Type &value, bool isRequired=true) |
Add a new required ScalarParam < Type > object. | |
template<typename Type> | |
CArrayParam< Type > & | addCArray (std::istream &in, const char *label, Type *value, int n, bool isRequired=true) |
Add (but do not read) a required C array parameter. | |
template<typename Type> | |
DArrayParam< Type > & | addDArray (std::istream &in, const char *label, DArray< Type > &array, int n, bool isRequired=true) |
Add (but do not read) a DArray < Type > parameter. | |
template<typename Type, int N> | |
FArrayParam< Type, N > & | addFArray (std::istream &in, const char *label, FArray< Type, N > &array, bool isRequired=true) |
Add (but do not read) a FArray < Type, N > array parameter. | |
template<typename Type, int N> | |
FSArrayParam< Type, N > & | addFSArray (std::istream &in, const char *label, FSArray< Type, N > &array, int size, bool isRequired=true) |
Add (but do not read) a FSArray < Type, N > array parameter. | |
template<typename Type> | |
CArray2DParam< Type > & | addCArray2D (std::istream &in, const char *label, Type *value, int m, int n, int np, bool isRequired=true) |
Add (but do not read) a CArray2DParam < Type > 2D C-array. | |
template<typename Type> | |
DMatrixParam< Type > & | addDMatrix (std::istream &in, const char *label, DMatrix< Type > &matrix, int m, int n, bool isRequired=true) |
Add and read a required DMatrix < Type > matrix parameter. | |
Protected Member Functions inherited from Util::ParamComponent | |
ParamComponent () | |
Constructor. | |
ParamComponent (const ParamComponent &other) | |
Copy constructor. |
Main class, representing one complete system.
A System has (among other components):
A System may also optionally have Environment, Iterator, Sweep, and Simulator (BdSimulator or McSimulator) components. Iterator and Sweep objects are only used for SCFT calculations. A Simulator object is only used for PS-FTS calculations (i.e., field theoretic simulations that use a partial saddle-point approximation).
System is a class template with an integer template parameter D = 1, 2, or 3 that represents the dimension of space. Many related components are also class templates of the same type. Names such as System, Mixture, Domain, etc. mentioned above are thus names of class templates, while actual class names are of the form Mixture<D>, Domain<D>, etc. with D=1, 2, or 3.
Usage of a System<D> object in the pscf_pg main program looks something like this:
where argc, and argv are parameters containing information about command line arguments that must be passed from the main program. This is implemented as function template Pscf::Rpg::run in the file src/rpg/pscf_pg.cpp.
See also:
Definition at line 103 of file rpg/system/System.h.
Pscf::Rpg::System< D >::System | ( | ) |
Constructor.
Definition at line 60 of file rpg/system/System.tpp.
References Util::Signal< T >::addObserver(), clearCFields(), clearUnitCellData(), Pscf::ThreadArray::init(), mixtureModifier(), Util::BracketPolicy::set(), and Util::ParamComposite::setClassName().
Pscf::Rpg::System< D >::~System | ( | ) |
Destructor.
Definition at line 157 of file rpg/system/System.tpp.
void Pscf::Rpg::System< D >::setOptions | ( | int | argc, |
char ** | argv ) |
Process command line options.
This function takes the same arguments as any C/C++ main program function. The arguments of the main function should d be passed to this function unaltered, to allow this function to process the command line options.
argc | number of command line arguments |
argv | array of pointers to command line arguments |
Definition at line 197 of file rpg/system/System.tpp.
References c(), Util::Log::file(), Util::ParamComponent::setEcho(), Pscf::ThreadArray::setThreadsPerBlock(), Pscf::ThreadMesh::setThreadsPerBlock(), UTIL_CHECK, and UTIL_THROW.
Referenced by Pscf::Rpg::run().
|
virtual |
Read input parameters (with opening and closing lines).
in | input parameter stream |
Reimplemented from Util::ParamComposite.
Definition at line 403 of file rpg/system/System.tpp.
References Util::ParamComposite::className(), Util::ParamComposite::readBegin(), Util::ParamComposite::readEnd(), and readParameters().
Referenced by readParam(), and Pscf::Rpg::run().
void Pscf::Rpg::System< D >::readParam | ( | ) |
Read input parameters from default param file.
This function reads the parameter file set by the -p command line option.
Definition at line 414 of file rpg/system/System.tpp.
References readParam().
|
virtual |
Read body of parameter block (without opening and closing lines).
in | input parameter stream |
Reimplemented from Util::ParamComposite.
Definition at line 303 of file rpg/system/System.tpp.
References Util::ParamComposite::className(), Util::ParamComponent::echo(), environment(), Util::Log::file(), hasIterator(), Util::ParamComponent::indent(), interaction(), Pscf::PolymerModel::isLocked(), Pscf::PolymerModel::nSet(), Util::ParamComposite::readOptional(), Util::ParamComposite::readParamComposite(), Pscf::PolymerModel::setModel(), and UTIL_CHECK.
Referenced by readParam().
void Pscf::Rpg::System< D >::readCommands | ( | std::istream & | in | ) |
Read and process commands from an input stream.
in | command script input stream |
Definition at line 421 of file rpg/system/System.tpp.
References Util::DArray< Data >::allocate(), c(), clearTimers(), Pscf::Rpg::FieldIo< D >::compareFieldsBasis(), Pscf::Rpg::FieldIo< D >::compareFieldsRGrid(), compute(), computeStress(), Pscf::Rpg::FieldIo< D >::convertBasisToKGrid(), Pscf::Rpg::FieldIo< D >::convertBasisToRGrid(), Pscf::Rpg::FieldIo< D >::convertKGridToBasis(), Pscf::Rpg::FieldIo< D >::convertKGridToRGrid(), Pscf::Rpg::FieldIo< D >::convertRGridToBasis(), Pscf::Rpg::FieldIo< D >::convertRGridToKGrid(), environment(), Pscf::Rpg::FieldIo< D >::estimateWBasis(), Pscf::Rpg::FieldIo< D >::expandRGridDimension(), Util::Log::file(), h(), hasEnvironment(), hasSimulator(), Pscf::Prdc::hasSymmetry(), Pscf::Rpg::FieldIo< D >::hasSymmetry(), interaction(), iterate(), mask(), mixture(), Pscf::Rpg::FieldIo< D >::replicateUnitCell(), Pscf::Rpg::FieldIo< D >::scaleFieldsBasis(), Pscf::Rpg::FieldIo< D >::scaleFieldsRGrid(), scft(), setUnitCell(), simulate(), simulator(), sweep(), UTIL_CHECK, w(), writeParamNoSweep(), and writeTimers().
Referenced by readCommands(), and Pscf::Rpg::run().
void Pscf::Rpg::System< D >::readCommands | ( | ) |
Read and process commands from the default command file.
This function reads the parameter file set by the -c command line option.
Definition at line 795 of file rpg/system/System.tpp.
References readCommands(), and UTIL_THROW.
void Pscf::Rpg::System< D >::compute | ( | bool | needStress = false | ) |
Solve the modified diffusion equation once, without iteration.
This function calls the Mixture::compute() function to solve the statistical mechanics problem for a non-interacting system subjected to the currrent system chemical potential fields. This requires solution of the modified diffusion equation for all polymers, computation of Boltzmann weights for all solvents, computation of molecular partition functions for all species, computation of concentration fields for all blocks and solvents, and computation of overall concentrations for all monomer types. This function does not compute the canonical (Helmholtz) free energy or grand-canonical free energy (i.e., pressure).
If argument needStress is true, then this function also calls computeStress() to compute the stress.
needStress | true if stress is needed, false otherwise |
Definition at line 809 of file rpg/system/System.tpp.
References clearCFields(), computeStress(), environment(), hasEnvironment(), scft(), and UTIL_CHECK.
Referenced by readCommands().
void Pscf::Rpg::System< D >::computeStress | ( | ) |
Compute SCFT stress.
This function computes the standard definition of stress maintained by the Mixture class. If an Environment exists, it also allows the Environment to compute a modified definition of the stress.
Definition at line 849 of file rpg/system/System.tpp.
References environment(), hasEnvironment(), iterator(), mask(), and mixture().
Referenced by compute(), iterate(), and readCommands().
int Pscf::Rpg::System< D >::iterate | ( | bool | isContinuation = false | ) |
Iteratively solve a SCFT problem.
This function calls the iterator to solve the SCFT problem for the current system parameters, using the current chemical potential fields and unit cell parameters as initial guesses. Upon exit, c().hasData() == true whether or not convergence is obtained to within the desired tolerance, but the SCFT Helmholtz free energy and pressure are computed only if convergence is successful.
isContinuation | true if a continuation within a sweep |
Definition at line 869 of file rpg/system/System.tpp.
References clearCFields(), computeStress(), environment(), Util::Log::file(), hasEnvironment(), hasIterator(), iterator(), mixture(), scft(), and UTIL_CHECK.
Referenced by readCommands().
void Pscf::Rpg::System< D >::sweep | ( | ) |
Sweep in parameter space, solving an SCF problem at each point.
This function uses a Sweep object that was initialized in the parameter file to solve the SCFT problem at a sequence of points along a contour in parameter space. The nature of this sequence is determined by implementation of a subclass of Sweep and the parameters passed to the sweep object in the parameter file.
Definition at line 916 of file rpg/system/System.tpp.
References Util::Log::file(), hasIterator(), hasSweep(), iterator(), and UTIL_CHECK.
Referenced by readCommands().
void Pscf::Rpg::System< D >::simulate | ( | int | nStep | ) |
Perform a field theoretic simulation (PS-FTS).
Perform a field theoretic simulation using the partial saddle-point approximation (PS-FTS). The type of simulation (BD or MC) is determined by the type of Simulator (BdSimulator or McSimulator) that is created in the parameter file. The number of BD steps or attempted MC moves to be performed is given by the parameter "nStep".
nStep | number of simulation (BD or MC) steps |
Definition at line 938 of file rpg/system/System.tpp.
References clearCFields(), hasSimulator(), simulator(), and UTIL_CHECK.
Referenced by readCommands().
void Pscf::Rpg::System< D >::clearCFields | ( | ) |
Mark c-fields and free energy as outdated or invalid.
This function should be called whenever any of the inputs to the solution of the modified diffusion equation are modified, including the w fields, unit cell parameters, external fields, or mask. Upon return, c().hasData(), scft().hasData(), and mixture().hasStress() all return false; if the system has an Environment, environment().needsUpdate() will return true.
Definition at line 951 of file rpg/system/System.tpp.
References scft().
Referenced by clearUnitCellData(), compute(), iterate(), simulate(), and System().
void Pscf::Rpg::System< D >::setUnitCell | ( | UnitCell< D > const & | unitCell | ) |
Set parameters of the associated unit cell.
The lattice (i.e., lattice system type) set in the UnitCell<D> unitCell input parameter must agree with any lattice enum value that was set previously in the parameter file.
If a space group has been set but a basis has not yet been initialized, then this and the other setUnitCell member function will initialize a symmetry-adapted basis as a side effect.
unitCell | new UnitCell<D> (with new parameters) |
Definition at line 963 of file rpg/system/System.tpp.
References UTIL_CHECK.
Referenced by readCommands().
void Pscf::Rpg::System< D >::setUnitCell | ( | FSArray< double, 6 > const & | parameters | ) |
Set parameters of the associated unit cell.
The lattice type must have been set before this function is called. The logical size of the FSArray<double, 6> "parameters" array must match the expected number of parameters for the current lattice type.
See documentation of setUnitCell(UnitCell<D> const &) regarding possible construction of a basis as a side effect.
parameters | array of new unit cell parameters |
Definition at line 991 of file rpg/system/System.tpp.
References UTIL_CHECK.
void Pscf::Rpg::System< D >::clearUnitCellData | ( | ) |
Notify System members that unit cell parameters have been modified.
This function should be called whenever the unit cell parameters are modified. It calls functions mixture().clearUnitCellData(), domain().wavelist().clearUnitCellData(), clearCFields(), and, if an Environment exists, environment().reset().
Definition at line 1022 of file rpg/system/System.tpp.
References clearCFields(), environment(), and hasEnvironment().
Referenced by System().
|
inline |
Get the monomer concentration (c) fields (const).
Definition at line 800 of file rpg/system/System.h.
Referenced by readCommands(), and setOptions().
|
inline |
Get the chemical potential (w) fields (non-const).
Definition at line 806 of file rpg/system/System.h.
Referenced by readCommands().
|
inline |
Get the chemical potential (w) fields (const).
Definition at line 812 of file rpg/system/System.h.
|
inline |
Get the external potential (h) fields (non-const).
Definition at line 817 of file rpg/system/System.h.
Referenced by readCommands().
|
inline |
Get the external potential (h) fields (const).
Definition at line 822 of file rpg/system/System.h.
|
inline |
Get the mask (non-const).
Definition at line 827 of file rpg/system/System.h.
Referenced by computeStress(), and readCommands().
|
inline |
Get the mask (const).
Definition at line 832 of file rpg/system/System.h.
|
inline |
Get the Mixture (const).
Definition at line 671 of file rpg/system/System.h.
Referenced by computeStress(), iterate(), and readCommands().
|
inline |
Get the MixtureModifier (non-const).
Definition at line 676 of file rpg/system/System.h.
References UTIL_ASSERT.
Referenced by System().
|
inline |
Get the Interaction (non-const).
Definition at line 684 of file rpg/system/System.h.
References UTIL_ASSERT.
Referenced by readCommands(), readParameters(), and writeParamNoSweep().
|
inline |
Get the Interaction (const).
Definition at line 692 of file rpg/system/System.h.
References UTIL_ASSERT.
|
inline |
Get the Domain (const).
Definition at line 700 of file rpg/system/System.h.
|
inline |
Does this system have an Environment?
Definition at line 705 of file rpg/system/System.h.
Referenced by clearUnitCellData(), compute(), computeStress(), iterate(), readCommands(), and writeParamNoSweep().
|
inline |
Get the Environment (non-const).
Definition at line 710 of file rpg/system/System.h.
References UTIL_ASSERT.
Referenced by clearUnitCellData(), compute(), computeStress(), iterate(), readCommands(), readParameters(), and writeParamNoSweep().
|
inline |
Get the Environment (const).
Definition at line 718 of file rpg/system/System.h.
References UTIL_ASSERT.
|
inline |
Get the ScftThermo object (non-const).
Definition at line 726 of file rpg/system/System.h.
References UTIL_ASSERT.
Referenced by clearCFields(), compute(), iterate(), and readCommands().
|
inline |
Get the ScftThermo object (const).
Definition at line 734 of file rpg/system/System.h.
References UTIL_ASSERT.
|
inline |
Does this system have an Iterator?
Definition at line 742 of file rpg/system/System.h.
Referenced by clearTimers(), iterate(), readParameters(), sweep(), writeParamNoSweep(), and writeTimers().
|
inline |
Get the Iterator (non-const).
Definition at line 747 of file rpg/system/System.h.
References UTIL_ASSERT.
Referenced by clearTimers(), computeStress(), iterate(), sweep(), writeParamNoSweep(), and writeTimers().
|
inline |
Get the Iterator (const).
Definition at line 755 of file rpg/system/System.h.
References UTIL_ASSERT.
|
inline |
Does this system have a Sweep?
Definition at line 763 of file rpg/system/System.h.
Referenced by sweep().
|
inline |
Does this system have a Simulator?
Definition at line 768 of file rpg/system/System.h.
Referenced by clearTimers(), readCommands(), simulate(), and writeTimers().
|
inline |
Get the Simulator (non-const).
Definition at line 773 of file rpg/system/System.h.
References UTIL_ASSERT.
Referenced by clearTimers(), readCommands(), simulate(), and writeTimers().
|
inline |
Get the Simulator (const).
Definition at line 781 of file rpg/system/System.h.
References UTIL_ASSERT.
|
inline |
Get the FileMaster (non-const).
Access (non-const) is used in some unit tests.
Definition at line 789 of file rpg/system/System.h.
|
inline |
Get the FileMaster (const).
Definition at line 794 of file rpg/system/System.h.
void Pscf::Rpg::System< D >::writeParamNoSweep | ( | std::ostream & | out | ) | const |
Write partial parameter file to an ostream.
This function writes the Mixture, Interaction, and Domain blocks of a parameter file, as well as any Environment and Iterator blocks, but omits any Sweep or Simulator blocks. The intent is to produce an output during an SCFT sweep that only refers to parameters relevant to a single state point, in a form that could be used as a parameter file for a single SCFT calculation.
out | output stream |
Definition at line 1038 of file rpg/system/System.tpp.
References environment(), hasEnvironment(), hasIterator(), interaction(), and iterator().
Referenced by readCommands().
void Pscf::Rpg::System< D >::writeTimers | ( | std::ostream & | out | ) | const |
Write timer information to an output stream.
out | output stream |
Definition at line 1059 of file rpg/system/System.tpp.
References Util::Log::file(), hasIterator(), hasSimulator(), iterator(), and simulator().
Referenced by readCommands().
void Pscf::Rpg::System< D >::clearTimers | ( | ) |
Clear timers.
Definition at line 1075 of file rpg/system/System.tpp.
References hasIterator(), hasSimulator(), iterator(), and simulator().
Referenced by readCommands().