|
PSCF v1.5.0
|
Main class in SCFT simulation of one system. More...
#include <System.h>
Public Types | |
| typedef DArray< double > | Field |
| Generic Field type. | |
| typedef DArray< double > | WField |
| Monomer chemical potential field type. | |
| typedef DArray< double > | CField |
| Monomer concentration / volume fraction field type. | |
| 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. | |
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 input parameters (without opening and closing lines). | |
| int | readCommands (std::istream &in) |
| Read command script. | |
| int | readCommands () |
| Read commands from default command file. | |
Primary SCFT Computations | |
| void | compute () |
| Solve the modified diffusion equation once, without iteration. | |
| int | iterate (bool isContinuation=false) |
| Iteratively solve a SCFT problem. | |
| void | sweep () |
| Sweep in parameter space, solving an SCF problem at each point. | |
Thermodynamic Properties | |
| void | computeFreeEnergy () |
| Compute free energy density and pressure for current fields. | |
| double | fHelmholtz () const |
| Get precomputed Helmholtz free energy per monomer / kT. | |
| double | pressure () const |
| Get precomputed pressure x monomer volume kT. | |
Thermodynamic Data Output | |
| void | writeParamNoSweep (std::ostream &out) const |
| Write parameter file to an ostream, omitting any Sweep block. | |
| void | writeThermo (std::ostream &out) const |
| Write thermodynamic properties to a file. | |
Field Output | |
| void | writeW (std::string const &filename) const |
| Write chemical potential fields in symmetrized basis format. | |
| void | writeC (std::string const &filename) const |
| Write concentration fields in symmetrized basis format. | |
| void | writeBlockC (std::string const &filename) const |
| Write c-fields for all blocks and solvents in r-grid format. | |
| void | writeQSlice (std::string const &filename, int polymerId, int blockId, int directionId, int segmentId) const |
| Write slice of a propagator at fixed s in r-grid format. | |
| void | writeQTail (std::string const &filename, int polymerId, int blockId, int directionId) const |
| Write the final slice of a propagator in r-grid format. | |
| void | writeQ (std::string const &filename, int polymerId, int blockId, int directionId) const |
| Write one propagator for one block, in r-grid format. | |
| void | writeQAll (std::string const &basename) const |
| Write all propagators of all blocks, each to a separate file. | |
Field Accessors | |
| DArray< WField > & | wFields () |
| Get array of all chemical potential fields. | |
| DArray< WField > const & | wFields () const |
| Get const array of all chemical potential fields. | |
| WField & | wField (int monomerId) |
| Get chemical potential field for a specific monomer type. | |
| WField const & | wField (int monomerId) const |
| Get const chemical potential field for a specific monomer type. | |
| DArray< Field > & | cFields () |
| Get array of all chemical potential fields. | |
| DArray< Field > const & | cFields () const |
| Get const array of all chemical potential fields. | |
| Field & | cField (int monomerId) |
| Get chemical potential field for a specific monomer type. | |
| Field const & | cField (int monomerId) const |
| Get const chemical potential field for a specific monomer type. | |
Member object accessors | |
| Mixture & | mixture () |
| Get Mixture by reference. | |
| Mixture const & | mixture () const |
| Get Mixture by reference. | |
| Interaction & | interaction () |
| Get interaction (i.e., excess free energy) by reference. | |
| Interaction const & | interaction () const |
| Get interaction (i.e., excess free energy) by const reference. | |
| Domain & | domain () |
| Get spatial domain (including grid info) by reference. | |
| Iterator & | iterator () |
| Get the Iterator by reference. | |
| FileMaster & | fileMaster () |
| Get FileMaster by reference. | |
| 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 | |
| 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 in SCFT simulation of one system.
An R1::System is designed to perform SCFT calculations of one-dimension SCFT problems in Cartesian, spherical or cylindrical coordinates. Such a System has (among other components):
A system may also optionally contain a Sweep object.
A minimal main program that uses this class to implement a program might look something like this:
The actual main program is given in the file pscf_1d.cpp.
Definition at line 66 of file r1/system/System.h.
| typedef DArray<double> Pscf::R1::System::Field |
Generic Field type.
Definition at line 72 of file r1/system/System.h.
| typedef DArray<double> Pscf::R1::System::WField |
Monomer chemical potential field type.
Definition at line 75 of file r1/system/System.h.
| typedef DArray<double> Pscf::R1::System::CField |
Monomer concentration / volume fraction field type.
Definition at line 78 of file r1/system/System.h.
| Pscf::R1::System::System | ( | ) |
Constructor.
Definition at line 58 of file r1/system/System.cpp.
References Pscf::Interaction::Interaction(), Pscf::R1::IteratorFactory::IteratorFactory(), Util::BracketPolicy::set(), Util::ParamComposite::setClassName(), and Pscf::R1::SweepFactory::SweepFactory().
| Pscf::R1::System::~System | ( | ) |
Destructor.
Definition at line 95 of file r1/system/System.cpp.
| void Pscf::R1::System::setOptions | ( | int | argc, |
| char ** | argv ) |
Process command line options.
Definition at line 117 of file r1/system/System.cpp.
References Util::Log::file(), fileMaster(), Util::FileMaster::setCommandFileName(), Util::ParamComponent::setEcho(), Util::FileMaster::setInputPrefix(), Util::FileMaster::setOutputPrefix(), Util::FileMaster::setParamFileName(), and UTIL_THROW.
Referenced by main().
|
virtual |
Read input parameters (with opening and closing lines).
| in | input parameter stream |
Reimplemented from Util::ParamComposite.
Definition at line 226 of file r1/system/System.cpp.
References Util::ParamComposite::className(), Util::ParamComposite::readBegin(), Util::ParamComposite::readEnd(), and readParameters().
Referenced by main(), and readParam().
| void Pscf::R1::System::readParam | ( | ) |
Read input parameters from default param file.
Definition at line 236 of file r1/system/System.cpp.
References fileMaster(), and readParam().
|
virtual |
Read input parameters (without opening and closing lines).
| in | input parameter stream |
Reimplemented from Util::ParamComposite.
Definition at line 189 of file r1/system/System.cpp.
References Util::ParamComposite::className(), domain(), interaction(), mixture(), Util::ParamComposite::readParamComposite(), Pscf::Interaction::setNMonomer(), and UTIL_THROW.
Referenced by readParam().
| int Pscf::R1::System::readCommands | ( | std::istream & | in | ) |
Read command script.
Execution stops at FINISH, at the end of the script, or after a command that failed: an ITERATE command that did not converge or an unknown command.
| in | command script file. |
Definition at line 279 of file r1/system/System.cpp.
References cFields(), Pscf::R1::HomogeneousComparison::compute(), compute(), Util::Log::file(), fileMaster(), Util::Int::Int(), iterate(), Util::FileMaster::openOutputFile(), Pscf::R1::HomogeneousComparison::output(), Util::Str::Str(), sweep(), UTIL_CHECK, UTIL_THROW, wFields(), Util::ParamComposite::writeParam(), writeQ(), writeQAll(), writeQSlice(), writeQTail(), and writeThermo().
Referenced by main(), and readCommands().
| int Pscf::R1::System::readCommands | ( | ) |
Read commands from default command file.
Definition at line 483 of file r1/system/System.cpp.
References fileMaster(), readCommands(), and UTIL_THROW.
| void Pscf::R1::System::compute | ( | ) |
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 chemical potential fields (wFields). 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 blocks and solvents, and computation of overall concentrations for all monomer types. It then computes the Helmholtz free energy and the pressure of these fields (see computeFreeEnergy). Upon return, the flag hasCFields is set true.
Definition at line 508 of file r1/system/System.cpp.
References computeFreeEnergy(), and wFields().
Referenced by readCommands().
| int Pscf::R1::System::iterate | ( | bool | isContinuation = false | ) |
Iteratively solve a SCFT problem.
This function calls the iterator to attempt to solve the SCFT problem for the current mixture and system parameters, using the current chemical potential fields (wFields) as initial guesses.
| isContinuation | true if continuation within a sweep. |
Definition at line 526 of file r1/system/System.cpp.
References computeFreeEnergy(), Util::Log::file(), iterator(), Pscf::R1::Iterator::solve(), and writeThermo().
Referenced by readCommands(), and Pscf::R1::Sweep::solve().
| void Pscf::R1::System::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 SCF problem at a sequence of points along a line in parameter space. The nature of this sequence of points is determined by implementation of a subclass of Sweep and the parameters passed to the sweep object in the parameter file. The Iterator that is initialized in the parameter file is called at each state point.
Definition at line 548 of file r1/system/System.cpp.
References Util::Log::file(), and UTIL_CHECK.
Referenced by readCommands().
| void Pscf::R1::System::computeFreeEnergy | ( | ) |
Compute free energy density and pressure for current fields.
This function should be called after a successful call of iterator().solve(). Resulting values are returned by the freeEnergy() and pressure() accessor functions.
Definition at line 563 of file r1/system/System.cpp.
References Pscf::Interaction::chi(), domain(), Pscf::R1::Domain::innerProduct(), interaction(), Pscf::PolymerSpecies< WT >::length(), mixture(), Pscf::Species< WT >::mu(), Pscf::Composition< WT >::nMonomer(), Pscf::Composition< WT >::nPolymer(), Pscf::Composition< WT >::nSolvent(), Pscf::R1::Domain::nx(), Pscf::Species< WT >::phi(), Pscf::MixtureTmpl< PT, ST, WT >::polymer(), Pscf::SolventSpecies< WT >::size(), Pscf::MixtureTmpl< PT, ST, WT >::solvent(), and Pscf::R1::Domain::spatialAverage().
Referenced by compute(), iterate(), Pscf::R1::BinaryRelaxIterator::solve(), and Pscf::R1::NrIterator::solve().
|
inline |
Get precomputed Helmholtz free energy per monomer / kT.
The value retrieved by this function is computed by the computeFreeEnergy() function.
Definition at line 672 of file r1/system/System.h.
Referenced by Pscf::R1::HomogeneousComparison::output(), Pscf::R1::Sweep::outputSummary(), and writeThermo().
|
inline |
Get precomputed pressure x monomer volume kT.
The value retrieved by this function is computed by the computeFreeEnergy() function.
Definition at line 678 of file r1/system/System.h.
Referenced by Pscf::R1::HomogeneousComparison::output(), Pscf::R1::Sweep::outputSummary(), and writeThermo().
| void Pscf::R1::System::writeParamNoSweep | ( | std::ostream & | out | ) | const |
Write parameter file to an ostream, omitting any Sweep block.
| out | output stream |
Definition at line 242 of file r1/system/System.cpp.
| void Pscf::R1::System::writeThermo | ( | std::ostream & | out | ) | const |
Write thermodynamic properties to a file.
This function outputs Helmholtz free energy per monomer, pressure (in units of kT per monomer volume), and the volume fraction phi and chemical potential mu of each species.
| out | output stream |
Definition at line 666 of file r1/system/System.cpp.
References Util::Dbl::Dbl(), fHelmholtz(), Util::Int::Int(), mixture(), Pscf::Composition< WT >::nPolymer(), Pscf::Composition< WT >::nSolvent(), and pressure().
Referenced by iterate(), Pscf::R1::Sweep::outputSolution(), and readCommands().
| void Pscf::R1::System::writeW | ( | std::string const & | filename | ) | const |
Write chemical potential fields in symmetrized basis format.
| filename | name of output file |
Definition at line 717 of file r1/system/System.cpp.
References wFields().
| void Pscf::R1::System::writeC | ( | std::string const & | filename | ) | const |
Write concentration fields in symmetrized basis format.
| filename | name of output file |
Definition at line 726 of file r1/system/System.cpp.
References cFields().
| void Pscf::R1::System::writeBlockC | ( | std::string const & | filename | ) | const |
Write c-fields for all blocks and solvents in r-grid format.
Writes concentrations for all blocks of all polymers and all solvent species in r-grid format. Columns associated with blocks appear ordered by polymer id and then by block id, followed by solvent species ordered by solvent id.
| filename | name of output file |
Definition at line 736 of file r1/system/System.cpp.
| void Pscf::R1::System::writeQSlice | ( | std::string const & | filename, |
| int | polymerId, | ||
| int | blockId, | ||
| int | directionId, | ||
| int | segmentId ) const |
Write slice of a propagator at fixed s in r-grid format.
| filename | name of output file |
| polymerId | integer id of the polymer |
| blockId | integer id of the block within the polymer |
| directionId | integer id of the direction (0 or 1) |
| segmentId | integer integration step index |
Definition at line 745 of file r1/system/System.cpp.
References Pscf::PolymerSpecies< WT >::nBlock(), Pscf::PolymerTmpl< BT, PT, WT >::propagator(), Pscf::R1::Propagator::q(), and UTIL_CHECK.
Referenced by readCommands().
| void Pscf::R1::System::writeQTail | ( | std::string const & | filename, |
| int | polymerId, | ||
| int | blockId, | ||
| int | directionId ) const |
Write the final slice of a propagator in r-grid format.
| filename | name of output file |
| polymerId | integer id of the polymer |
| blockId | integer id of the block within the polymer |
| directionId | integer id of the direction (0 or 1) |
Definition at line 766 of file r1/system/System.cpp.
References Pscf::PolymerSpecies< WT >::nBlock(), Pscf::PolymerTmpl< BT, PT, WT >::propagator(), and UTIL_CHECK.
Referenced by readCommands().
| void Pscf::R1::System::writeQ | ( | std::string const & | filename, |
| int | polymerId, | ||
| int | blockId, | ||
| int | directionId ) const |
Write one propagator for one block, in r-grid format.
| filename | name of output file |
| polymerId | integer id of the polymer |
| blockId | integer id of the block within the polymer |
| directionId | integer id of the direction (0 or 1) |
Definition at line 785 of file r1/system/System.cpp.
References Pscf::PolymerSpecies< WT >::nBlock(), Pscf::R1::Propagator::ns(), Pscf::PolymerTmpl< BT, PT, WT >::propagator(), Pscf::R1::Propagator::q(), and UTIL_CHECK.
Referenced by readCommands(), and writeQAll().
| void Pscf::R1::System::writeQAll | ( | std::string const & | basename | ) | const |
Write all propagators of all blocks, each to a separate file.
Write all propagators for both directions for all blocks of all polymers, with each propagator in a separate file. The function writeQ is called internally for each propagator, and is passed an automatically generated file name. The file name for each propagator is given by a string of the form (basename)_(ip)_(ib)_(id), where (basename) denotes the value of the std::string function parameter basename, and where (ip), (ib), and (id) denote the string representations of a polymer indiex ip, a block index ib, and direction index id, with id = 0 or 1. For example, if basename == "out/q", then the file name of the propagator for direction 1 of block 2 of polymer 0 would be "out/q_0_2_1".
| basename | common prefix for output file names |
Definition at line 823 of file r1/system/System.cpp.
References Util::toString(), and writeQ().
Referenced by readCommands().
|
inline |
Get array of all chemical potential fields.
The array capacity is equal to the number of monomer types.
Definition at line 619 of file r1/system/System.h.
Referenced by compute(), readCommands(), and writeW().
|
inline |
Get const array of all chemical potential fields.
The array capacity is equal to the number of monomer types.
Definition at line 626 of file r1/system/System.h.
|
inline |
Get chemical potential field for a specific monomer type.
| monomerId | integer monomer type index |
Definition at line 633 of file r1/system/System.h.
Referenced by Pscf::R1::BinaryRelaxIterator::solve(), and Pscf::R1::NrIterator::solve().
|
inline |
Get const chemical potential field for a specific monomer type.
| monomerId | integer monomer type index |
Definition at line 640 of file r1/system/System.h.
|
inline |
Get array of all chemical potential fields.
The array capacity is equal to the number of monomer types.
Definition at line 647 of file r1/system/System.h.
Referenced by readCommands(), and writeC().
|
inline |
Get const array of all chemical potential fields.
The array capacity is equal to the number of monomer types.
Definition at line 654 of file r1/system/System.h.
|
inline |
Get chemical potential field for a specific monomer type.
| monomerId | integer monomer type index |
Definition at line 660 of file r1/system/System.h.
Referenced by Pscf::R1::BinaryRelaxIterator::solve(), and Pscf::R1::NrIterator::solve().
|
inline |
Get const chemical potential field for a specific monomer type.
| monomerId | integer monomer type index |
Definition at line 666 of file r1/system/System.h.
|
inline |
Get Mixture by reference.
Definition at line 567 of file r1/system/System.h.
Referenced by computeFreeEnergy(), readParameters(), Pscf::R1::BinaryRelaxIterator::solve(), Pscf::R1::NrIterator::solve(), and writeThermo().
|
inline |
Get Mixture by reference.
Definition at line 573 of file r1/system/System.h.
|
inline |
Get interaction (i.e., excess free energy) by reference.
Definition at line 579 of file r1/system/System.h.
References UTIL_ASSERT.
Referenced by computeFreeEnergy(), and readParameters().
|
inline |
Get interaction (i.e., excess free energy) by const reference.
Definition at line 588 of file r1/system/System.h.
References UTIL_ASSERT.
|
inline |
Get spatial domain (including grid info) by reference.
Definition at line 597 of file r1/system/System.h.
Referenced by computeFreeEnergy(), readParameters(), and Pscf::R1::Sweep::Sweep().
|
inline |
Get the Iterator by reference.
Definition at line 603 of file r1/system/System.h.
References UTIL_ASSERT.
Referenced by iterate().
|
inline |
Get FileMaster by reference.
Definition at line 612 of file r1/system/System.h.
Referenced by readCommands(), readCommands(), readParam(), setOptions(), and Pscf::R1::Sweep::Sweep().