PSCF v1.5.0
Pscf::Rp::System< D, T > Class Template Reference

Base class template for classes that represent a complete system. More...

#include <System.h>

Inheritance diagram for Pscf::Rp::System< D, T >:
Util::ParamComposite Util::ParamComponent Util::Serializable Util::MpiFileIo

Public Member Functions

Construction and Destruction
 System ()
 Constructor.
 ~System ()
 Destructor.
Lifetime Actions
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).
int readCommands (std::istream &in)
 Read and process commands from an input stream.
int 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, propagators and free energies as outdated.
Unit Cell Modifiers
void setUnitCell (UnitCell< D > const &unitCell)
 Set parameters of the associated unit cell.
void setUnitCell (FSArray< double, 6 > const &parameters)
 Set parameters of the associated unit cell.
void clearUnitCellData ()
 Notify System members that unit cell parameters have been modified.
Field Containers
CFields< D, T > const & c () const
 Get the monomer concentration (c) fields (const).
WFields< D, T > const & w () const
 Get the chemical potential (w) fields (const).
WFields< D, T > & w ()
 Get the chemical potential (w) fields (non-const).
WFields< D, T > const & h () const
 Get the external potential (h) fields (const).
WFields< D, T > & h ()
 Get the external potential (h) fields (non-const).
Mask< D, T > const & mask () const
 Get the mask (const).
Mask< D, T > & mask ()
 Get the mask (non-const).
bool hasSymmetricInputFields ()
 Are the w fields, external fields and mask (if any) all symmetric?
Component Object Accessors
Mixture< D, T > const & mixture () const
 Get the Mixture (const).
MixtureModifier< D, T > & mixtureModifier ()
 Get the MixtureModifier (non-const).
Interaction const & interaction () const
 Get the Interaction (const).
Interaction & interaction ()
 Get the Interaction (non-const).
Domain< D, T > const & domain () const
 Get the Domain (const).
WaveList< D, T > & waveList ()
 Get the WaveList (non-const).
bool hasEnvironment () const
 Does this system have an Environment?
Environment const & environment () const
 Get the Environment (const).
Environment & environment ()
 Get the Environment (non-const).
ScftThermo< D, T > const & scft () const
 Get the ScftThermo object (const).
ScftThermo< D, T > & scft ()
 Get the ScftThermo object (non-const).
bool hasIterator () const
 Does this system have an Iterator?
Iterator< D, T > const & iterator () const
 Get the Iterator (const).
Iterator< D, T > & iterator ()
 Get the Iterator (non-const).
bool hasSweep () const
 Does this system have a Sweep?
bool hasSimulator () const
 Does this system have a Simulator?
Simulator< D, T > const & simulator () const
 Get the Simulator (const).
Simulator< D, T > & simulator ()
 Get the Simulator (non-const).
FileMaster const & fileMaster () const
 Get the FileMaster (const).
FileMaster & fileMaster ()
 Get the FileMaster (non-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 all 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 &param, bool next=true)
 Set this to the parent of a child component.
void addComponent (ParamComponent &param, 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.

Detailed Description

template<int D, class T>
class Pscf::Rp::System< D, T >

Base class template for classes that represent a complete system.

Template parameters and typename aliases:

D - integer dimensionality of space (D=1, 2, or 3) T - backend identifier class

An instance of System <D, T> owns a set of child objects, most of which are instances of specializations of templates that also take D and T as template parameters. For simplicity, in the remainder of the documentation for the System class templates, we use names of class templates such as "Mixture" or "Iterator" as shorthand for names of corresponding specializations of those templates, such as Mixture <D, T> or Iterator <D, T>.

Class Components : A System has (among other components):

  • a Mixture (container for polymer and solvent solvers)
  • an Interaction (list of binary interaction parameters)
  • a Domain (description of unit cell and discretization)
  • a CFields container of monomer concentration (c) fields
  • a WFields container of monomer chemical potential (w) fields
  • a WFields container of external (h) fields
  • a Mask field that defines an inhomogeneous density constraint

The container of external fields and the Mask are only needed to describe systems that are subjected to inhomogeneous imposed environments (such as in thin films) and are otherwise left empty and unused. The h().hasData() and mask().hasData() bool functions may be queried to determine if these components are actually in use.

A System may also optionally have:

Each optional component is constructed if and only if the parameter file that is used to initialize the System contains a corresponding optional parameter file block.

  • An Iterator is only used for SCFT calculations.
  • An Environment is used in SCFT calculations to generate external and mask fields to describe inhomogeneous environments, and is omitted in standard SCFT calculations for structures formed in a homogeneous environment.
  • A Sweep is used for "sweep" calculations that solve a sequence of SCFT problems along a path through parameter space.
  • A Simulator is only used for PS-FTS calculations, i.e., field theoretic simulations based on a partial saddle-point approximation.

The Iterator, Environment and Sweep objects are thus all normally omitted in parameter files used for PS-FTS calculations, while the Simulator object is normally omitted in parameter files for SCFT calculations. The hasEnvironment(), hasIterator(), hasSweep(), and hasSimulator() bool member functions may be queried after processing of the parameter file to determine which of these optional components exist.

See also:

Definition at line 124 of file rp/system/System.h.

Constructor & Destructor Documentation

◆ System()

◆ ~System()

template<int D, class T>
Pscf::Rp::System< D, T >::~System ( )

Destructor.

Definition at line 204 of file System.tpp.

Member Function Documentation

◆ setOptions()

template<int D, class T>
void Pscf::Rp::System< D, T >::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 be passed to this function unaltered, to allow this function to process the command line options passed to the program executable.

Parameters
argcnumber of command line arguments
argvarray of pointers to command line arguments

Definition at line 248 of file System.tpp.

Referenced by Pscf::Rp::run().

◆ readParam() [1/2]

template<int D, class T>
void Pscf::Rp::System< D, T >::readParam ( std::istream & in)
virtual

Read input parameters (with opening and closing lines).

Parameters
ininput parameter stream

Reimplemented from Util::ParamComposite.

Definition at line 468 of file System.tpp.

References Util::ParamComposite::className(), Util::ParamComposite::readBegin(), Util::ParamComposite::readEnd(), and readParameters().

Referenced by readParam(), and Pscf::Rp::run().

◆ readParam() [2/2]

template<int D, class T>
void Pscf::Rp::System< D, T >::readParam ( )

Read input parameters from default param file.

This function reads the parameter file set by the -p command line option.

Definition at line 479 of file System.tpp.

References fileMaster(), and readParam().

◆ readParameters()

template<int D, class T>
void Pscf::Rp::System< D, T >::readParameters ( std::istream & in)
virtual

Read body of parameter block (without opening and closing lines).

Parameters
ininput parameter stream

Reimplemented from Util::ParamComposite.

Definition at line 354 of file System.tpp.

Referenced by readParam().

◆ readCommands() [1/2]

template<int D, class T>
int Pscf::Rp::System< D, T >::readCommands ( std::istream & in)

Read and process commands from an input stream.

Execution stops at FINISH, at the end of the script, or after a command that failed: an ITERATE or COMPRESS command that did not converge or an unknown command.

Parameters
incommand script input stream
Returns
0 if no command failed, 1 otherwise

Definition at line 486 of file System.tpp.

References c(), Util::Log::file(), scft(), setUnitCell(), UTIL_CHECK, w(), and waveList().

Referenced by readCommands(), and Pscf::Rp::run().

◆ readCommands() [2/2]

template<int D, class T>
int Pscf::Rp::System< D, T >::readCommands ( )

Read and process commands from the default command file.

This function reads the parameter file set by the -c command line option.

Returns
0 if no command failed, 1 otherwise

Definition at line 907 of file System.tpp.

References fileMaster(), readCommands(), and UTIL_THROW.

◆ compute()

template<int D, class T>
void Pscf::Rp::System< D, T >::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).

This function also computes the stress, by calling computeStress(), if and only if the argument needStress is true.

Precondition
w().hasData() == true
Postcondition
c().hasData() == true
hasStress() == true iff needStress == true
Parameters
needStresstrue if stress is needed, false otherwise

Definition at line 921 of file System.tpp.

References c(), clearCFields(), computeStress(), environment(), hasEnvironment(), mask(), scft(), UTIL_CHECK, and w().

◆ computeStress()

template<int D, class T>
void Pscf::Rp::System< D, T >::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.

Precondition
w().hasData() == true
c().hasData() == true
Postcondition
hasStress() == true

Definition at line 961 of file System.tpp.

References Util::FSArray< Data, Capacity >::append(), environment(), hasEnvironment(), hasIterator(), iterator(), and mask().

Referenced by compute(), and iterate().

◆ iterate()

template<int D, class T>
int Pscf::Rp::System< D, T >::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.

Precondition
hasIterator() == true
w().hasData() == true
w().isSymmetric() == true if the iterator is symmetric
Postcondition
c().hasData() == true
scft().hasData() == true upon successful convergence
Returns
returns 0 for successful convergence, 1 for failure
Parameters
isContinuationtrue if a continuation within a sweep

Definition at line 991 of file System.tpp.

References c(), clearCFields(), computeStress(), environment(), Util::Log::file(), hasEnvironment(), hasIterator(), hasSymmetricInputFields(), iterator(), scft(), UTIL_CHECK, and w().

◆ sweep()

template<int D, class T>
void Pscf::Rp::System< D, T >::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 path 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.

Precondition
hasSweep() == true
All preconditions of the iterate() function must be satisfied

Definition at line 1040 of file System.tpp.

References Util::Log::file(), hasIterator(), hasSweep(), hasSymmetricInputFields(), iterator(), UTIL_CHECK, and w().

◆ simulate()

template<int D, class T>
void Pscf::Rp::System< D, T >::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".

Precondition
Function hasSimulator() == true
Function w().hasData() == true
Parameters
nStepnumber of simulation (BD or MC) steps

Definition at line 1062 of file System.tpp.

References clearCFields(), hasSimulator(), simulator(), and UTIL_CHECK.

◆ clearCFields()

template<int D, class T>
void Pscf::Rp::System< D, T >::clearCFields ( )

Mark c-fields, propagators and free energies as outdated.

This function must 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() will all return false. If the system has an Environment, then environment().hasStress() will also return false.

Definition at line 1075 of file System.tpp.

References environment(), hasEnvironment(), and scft().

Referenced by clearUnitCellData(), compute(), iterate(), Pscf::Rp::System< D, CPT >::readCommands(), Pscf::Rp::System< D, CPT >::readParameters(), and simulate().

◆ setUnitCell() [1/2]

template<int D, class T>
void Pscf::Rp::System< D, T >::setUnitCell ( UnitCell< D > const & unitCell)

Set parameters of the associated unit cell.

The lattice (i.e., lattice system type) set in the UnitCell<D> input parameter must agree with a lattice enum value that was set previously in the parameter file.

If a space group has been declared but a basis has not yet been initialized, then a symmetry-adapted basis will be constructed.

Parameters
unitCellnew UnitCell<D> (with new parameters)

Definition at line 1110 of file System.tpp.

References UTIL_CHECK, and waveList().

Referenced by readCommands().

◆ setUnitCell() [2/2]

template<int D, class T>
void Pscf::Rp::System< D, T >::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.

If a space group has been declared but a basis has not yet been initialized, then a symmetry-adapted basis will be constructed.

Parameters
parametersarray of new unit cell parameters

Definition at line 1138 of file System.tpp.

References UTIL_CHECK, and waveList().

◆ clearUnitCellData()

template<int D, class T>
void Pscf::Rp::System< D, T >::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(), wavelist().clearUnitCellData(), clearCFields(), and, if an Environment exists, environment().reset().

Definition at line 1169 of file System.tpp.

References clearCFields(), environment(), hasEnvironment(), hasSimulator(), and simulator().

Referenced by Pscf::Rp::System< D, CPT >::readParameters().

◆ c()

template<int D, class T>
CFields< D, T > const & Pscf::Rp::System< D, T >::c ( ) const
inline

Get the monomer concentration (c) fields (const).

Definition at line 798 of file rp/system/System.h.

Referenced by Pscf::Rp::SystemConstRef< D, T >::associate(), compute(), iterate(), and readCommands().

◆ w() [1/2]

template<int D, class T>
WFields< D, T > const & Pscf::Rp::System< D, T >::w ( ) const
inline

Get the chemical potential (w) fields (const).

Definition at line 803 of file rp/system/System.h.

Referenced by Pscf::Rp::SystemConstRef< D, T >::associate(), compute(), hasSymmetricInputFields(), iterate(), readCommands(), and sweep().

◆ w() [2/2]

template<int D, class T>
WFields< D, T > & Pscf::Rp::System< D, T >::w ( )
inline

Get the chemical potential (w) fields (non-const).

Definition at line 808 of file rp/system/System.h.

◆ h() [1/2]

template<int D, class T>
WFields< D, T > const & Pscf::Rp::System< D, T >::h ( ) const
inline

Get the external potential (h) fields (const).

Definition at line 813 of file rp/system/System.h.

Referenced by Pscf::Rp::SystemConstRef< D, T >::associate(), and hasSymmetricInputFields().

◆ h() [2/2]

template<int D, class T>
WFields< D, T > & Pscf::Rp::System< D, T >::h ( )
inline

Get the external potential (h) fields (non-const).

Definition at line 818 of file rp/system/System.h.

◆ mask() [1/2]

template<int D, class T>
Mask< D, T > const & Pscf::Rp::System< D, T >::mask ( ) const
inline

Get the mask (const).

Definition at line 823 of file rp/system/System.h.

Referenced by Pscf::Rp::SystemConstRef< D, T >::associate(), compute(), computeStress(), and hasSymmetricInputFields().

◆ mask() [2/2]

template<int D, class T>
Mask< D, T > & Pscf::Rp::System< D, T >::mask ( )
inline

Get the mask (non-const).

Definition at line 828 of file rp/system/System.h.

◆ hasSymmetricInputFields()

template<int D, class T>
bool Pscf::Rp::System< D, T >::hasSymmetricInputFields ( )

Are the w fields, external fields and mask (if any) all symmetric?

This checks if all relevant fields that are used as inputs to an MDE calculation are invariant under all elements declared space group. The return may be used as a precondition to the use of an SCFT iterator that preserves space group symmetry.

Definition at line 1090 of file System.tpp.

References h(), mask(), and w().

Referenced by iterate(), and sweep().

◆ mixture()

template<int D, class T>
Mixture< D, T > const & Pscf::Rp::System< D, T >::mixture ( ) const
inline

Get the Mixture (const).

Definition at line 732 of file rp/system/System.h.

References UTIL_ASSERT.

Referenced by Pscf::Rp::SystemConstRef< D, T >::associate(), and writeParamNoSweep().

◆ mixtureModifier()

template<int D, class T>
MixtureModifier< D, T > & Pscf::Rp::System< D, T >::mixtureModifier ( )
inline

Get the MixtureModifier (non-const).

Definition at line 740 of file rp/system/System.h.

References UTIL_ASSERT.

◆ interaction() [1/2]

template<int D, class T>
Interaction const & Pscf::Rp::System< D, T >::interaction ( ) const
inline

Get the Interaction (const).

Definition at line 748 of file rp/system/System.h.

References UTIL_ASSERT.

Referenced by Pscf::Rp::SystemConstRef< D, T >::associate(), and writeParamNoSweep().

◆ interaction() [2/2]

template<int D, class T>
Interaction & Pscf::Rp::System< D, T >::interaction ( )
inline

Get the Interaction (non-const).

Definition at line 756 of file rp/system/System.h.

References UTIL_ASSERT.

◆ domain()

template<int D, class T>
Domain< D, T > const & Pscf::Rp::System< D, T >::domain ( ) const
inline

◆ waveList()

template<int D, class T>
WaveList< D, T > & Pscf::Rp::System< D, T >::waveList ( )
inline

Get the WaveList (non-const).

This function provides direct non-const access to the WaveList. The WaveList is owned by the Domain, and const (i.e., read-only) access is also provided via the domain() member function. This function exists to allow a non-const reference to the parent system to be used to access to non-const member functions of the WaveList that update data structures maintained by the WaveList.

Definition at line 772 of file rp/system/System.h.

References UTIL_ASSERT.

Referenced by readCommands(), setUnitCell(), and setUnitCell().

◆ hasEnvironment()

template<int D, class T>
bool Pscf::Rp::System< D, T >::hasEnvironment ( ) const
inline

Does this system have an Environment?

Definition at line 835 of file rp/system/System.h.

Referenced by clearCFields(), clearUnitCellData(), compute(), computeStress(), iterate(), and writeParamNoSweep().

◆ environment() [1/2]

template<int D, class T>
Environment const & Pscf::Rp::System< D, T >::environment ( ) const
inline

Get the Environment (const).

Definition at line 840 of file rp/system/System.h.

References UTIL_ASSERT.

Referenced by clearCFields(), clearUnitCellData(), compute(), computeStress(), iterate(), and writeParamNoSweep().

◆ environment() [2/2]

template<int D, class T>
Environment & Pscf::Rp::System< D, T >::environment ( )
inline

Get the Environment (non-const).

Definition at line 848 of file rp/system/System.h.

References UTIL_ASSERT.

◆ scft() [1/2]

template<int D, class T>
ScftThermo< D, T > const & Pscf::Rp::System< D, T >::scft ( ) const
inline

Get the ScftThermo object (const).

Definition at line 856 of file rp/system/System.h.

References UTIL_ASSERT.

Referenced by clearCFields(), compute(), iterate(), and readCommands().

◆ scft() [2/2]

template<int D, class T>
ScftThermo< D, T > & Pscf::Rp::System< D, T >::scft ( )
inline

Get the ScftThermo object (non-const).

Definition at line 864 of file rp/system/System.h.

References UTIL_ASSERT.

◆ hasIterator()

template<int D, class T>
bool Pscf::Rp::System< D, T >::hasIterator ( ) const
inline

Does this system have an Iterator?

Definition at line 872 of file rp/system/System.h.

Referenced by clearTimers(), computeStress(), iterate(), sweep(), writeParamNoSweep(), and writeTimers().

◆ iterator() [1/2]

template<int D, class T>
Iterator< D, T > const & Pscf::Rp::System< D, T >::iterator ( ) const
inline

Get the Iterator (const).

Definition at line 877 of file rp/system/System.h.

References UTIL_ASSERT.

Referenced by clearTimers(), computeStress(), iterate(), sweep(), writeParamNoSweep(), and writeTimers().

◆ iterator() [2/2]

template<int D, class T>
Iterator< D, T > & Pscf::Rp::System< D, T >::iterator ( )
inline

Get the Iterator (non-const).

Definition at line 885 of file rp/system/System.h.

References UTIL_ASSERT.

◆ hasSweep()

template<int D, class T>
bool Pscf::Rp::System< D, T >::hasSweep ( ) const
inline

Does this system have a Sweep?

Definition at line 893 of file rp/system/System.h.

Referenced by sweep().

◆ hasSimulator()

template<int D, class T>
bool Pscf::Rp::System< D, T >::hasSimulator ( ) const
inline

Does this system have a Simulator?

Definition at line 898 of file rp/system/System.h.

Referenced by clearTimers(), clearUnitCellData(), simulate(), and writeTimers().

◆ simulator() [1/2]

template<int D, class T>
Simulator< D, T > const & Pscf::Rp::System< D, T >::simulator ( ) const
inline

Get the Simulator (const).

Definition at line 903 of file rp/system/System.h.

References UTIL_ASSERT.

Referenced by clearTimers(), clearUnitCellData(), simulate(), and writeTimers().

◆ simulator() [2/2]

template<int D, class T>
Simulator< D, T > & Pscf::Rp::System< D, T >::simulator ( )
inline

Get the Simulator (non-const).

Definition at line 911 of file rp/system/System.h.

References UTIL_ASSERT.

◆ fileMaster() [1/2]

◆ fileMaster() [2/2]

template<int D, class T>
FileMaster & Pscf::Rp::System< D, T >::fileMaster ( )
inline

Get the FileMaster (non-const).

Access (non-const) is used in some unit tests.

Definition at line 788 of file rp/system/System.h.

References UTIL_ASSERT.

◆ writeParamNoSweep()

template<int D, class T>
void Pscf::Rp::System< D, T >::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.

Parameters
outoutput stream

Definition at line 1188 of file System.tpp.

References domain(), environment(), hasEnvironment(), hasIterator(), interaction(), Pscf::PolymerModel::isBead(), iterator(), mixture(), and Pscf::PolymerModel::model().

◆ writeTimers()

template<int D, class T>
void Pscf::Rp::System< D, T >::writeTimers ( std::ostream & out) const

Write timer information to an output stream.

Parameters
outoutput stream

Definition at line 1214 of file System.tpp.

References Util::Log::file(), hasIterator(), hasSimulator(), iterator(), and simulator().

◆ clearTimers()

template<int D, class T>
void Pscf::Rp::System< D, T >::clearTimers ( )

Clear all timers.

Definition at line 1230 of file System.tpp.

References hasIterator(), hasSimulator(), iterator(), and simulator().


The documentation for this class was generated from the following files: