|
PSCF v1.3.3
|
Enumeration and functions to specify a model for polymer chains. More...
Enumerations | |
| enum | Type |
| Scoped enumeration of polymer model types. More... | |
Functions | |
| void | setModel (PolymerModel::Type model) |
| Set the global polymer model enumeration value. | |
| void | lock () |
| Make the polymer model immutable. | |
| Type | model () |
| Get the global polymer model type enumeration value. | |
| bool | isThread () |
| Is the thread model in use ? | |
| bool | isBead () |
| Is the bead model in use ? | |
| bool | isLocked () |
| Has the model type been locked (i.e., made immutable) ? | |
| int | nSet () |
| How many times has setModel been called? | |
| std::istream & | operator>> (std::istream &in, PolymerModel::Type &model) |
| Input stream extractor for a PolymerModel::Type enumeration. | |
| std::ostream & | operator<< (std::ostream &out, PolymerModel::Type const &model) |
| Output stream inserter for a PolymerModel::Type enumeration. | |
| template<class Archive> | |
| void | serialize (Archive &ar, PolymerModel::Type &data, const unsigned int version) |
| Serialize a PolymerModel::Type enumeration. | |
Enumeration and functions to specify a model for polymer chains.
PSCF allows the use of either a continuous "thread" or a discrete "bead" model for chain conformations. The PolymerModel::Type enumeration type has two allowed values of PolymerModel::Thread and PolymerModel::Bead that identify these two models.
Functions defined in the PolymerModel namespace can be used to set and query a globally accessible pseudo private variable of type PolymerModel::Type that specifies which of these two models is being used throughout a program. This model type variable is initialized to PolymerModel::Thread by default. In PSCF programs that can support either thread or bead models, a choice of model should be set in the early stages of program execution and not changed again before the program terminates.
| void Pscf::PolymerModel::setModel | ( | PolymerModel::Type | model | ) |
Set the global polymer model enumeration value.
| model | polymer model type enumeration value |
Definition at line 45 of file PolymerModel.cpp.
References model(), and UTIL_CHECK.
Referenced by Pscf::Prdc::SystemTmpl< D, T >::readParameters().
| void Pscf::PolymerModel::lock | ( | ) |
Make the polymer model immutable.
Locking the polymer model is irreversible - there is no unlock function.
Advice: Lock the model shortly after it is set in the execution path of the main program for PSCF executable programs. Do not lock the model in unit tests, so that a unit test runner can run different tests that test the thread and bead model.
Definition at line 55 of file PolymerModel.cpp.
Referenced by Pscf::Rpc::run().
| PolymerModel::Type Pscf::PolymerModel::model | ( | ) |
Get the global polymer model type enumeration value.
Definition at line 63 of file PolymerModel.cpp.
Referenced by setModel().
| bool Pscf::PolymerModel::isThread | ( | ) |
Is the thread model in use ?
Definition at line 69 of file PolymerModel.cpp.
Referenced by Pscf::Rpc::Block< D >::allocate(), Pscf::Rpg::Block< D >::allocate(), Pscf::Prdc::ScftThermoTmpl< D, ST >::compute(), Pscf::Rpc::Polymer< D >::compute(), Pscf::Rpg::Polymer< D >::compute(), Pscf::Rpc::Simulator< D >::computeHamiltonian(), Pscf::Rpg::Simulator< D >::computeHamiltonian(), Pscf::Rpc::IntraCorrelation< D >::computeIntraCorrelations(), Pscf::Rpg::IntraCorrelation< D >::computeIntraCorrelations(), Pscf::Rpc::Polymer< D >::computeStress(), Pscf::Rpg::Polymer< D >::computeStress(), Pscf::Rpc::Block< D >::computeStressThread(), Pscf::Rpg::Block< D >::computeStressThread(), Pscf::Edge::length(), Pscf::PolymerSpecies::length(), Pscf::Edge::operator<<, Pscf::Prdc::MixturePrdc< D, PT, ST, TT >::readParameters(), Pscf::Rpc::Block< D >::setId(), Pscf::Edge::setLength(), Pscf::Rpc::Block< D >::setLength(), Pscf::Rpg::Block< D >::setLength(), Pscf::Rpc::Block< D >::setupSolver(), Pscf::Rpg::Block< D >::setupSolver(), Pscf::Rpc::Propagator< D >::solve(), Pscf::Rpc::Propagator< D >::solve(), Pscf::Rpg::Propagator< D >::solve(), Pscf::Rpg::Propagator< D >::solve(), Pscf::Rpc::Block< D >::stepThread(), Pscf::Rpc::Propagator< D >::tail(), Pscf::Rpg::Propagator< D >::tail(), and Pscf::Rpc::RampParameter< D >::type().
| bool Pscf::PolymerModel::isBead | ( | ) |
Is the bead model in use ?
Definition at line 75 of file PolymerModel.cpp.
Referenced by Pscf::Rpc::Block< D >::allocate(), Pscf::Rpg::Block< D >::allocate(), Pscf::Rpc::Polymer< D >::compute(), Pscf::Rpc::Propagator< D >::computeQ(), Pscf::Rpg::Propagator< D >::computeQ(), Pscf::Rpc::Block< D >::computeStressBead(), Pscf::Rpg::Block< D >::computeStressBead(), Pscf::Edge::nBead(), Pscf::PolymerSpecies::nBead(), Pscf::Edge::operator<<, Pscf::Edge::setNBead(), Pscf::Rpc::Block< D >::setupSolver(), Pscf::Rpc::Propagator< D >::solve(), Pscf::Rpc::Propagator< D >::solve(), Pscf::Rpg::Propagator< D >::solve(), Pscf::Rpg::Propagator< D >::solve(), and Pscf::Rpc::Block< D >::stepBead().
| bool Pscf::PolymerModel::isLocked | ( | ) |
Has the model type been locked (i.e., made immutable) ?
Definition at line 81 of file PolymerModel.cpp.
Referenced by Pscf::Prdc::SystemTmpl< D, T >::readParameters().
| int Pscf::PolymerModel::nSet | ( | ) |
How many times has setModel been called?
This returns a counter that is initialized to zero, and is incremented every times setModel is invoked. It can be used confirm that polymer model was not changed within a section of code..
Definition at line 87 of file PolymerModel.cpp.