PSCF v1.1
|
Command to compute properties of homogeneous reference system. More...
#include <HomogeneousComparison.h>
Public Member Functions | |
HomogeneousComparison () | |
Default constructor. More... | |
HomogeneousComparison (System &system) | |
Constructor. More... | |
~HomogeneousComparison () | |
Destructor. More... | |
void | compute (int mode) |
Compute properties of a homogeneous reference system. More... | |
void | output (int mode, std::ostream &out) |
Output comparison to a homogeneous reference system. More... | |
![]() | |
SystemAccess () | |
Default constructor. More... | |
SystemAccess (System &system) | |
Constructor. More... | |
~SystemAccess () | |
Destructor. More... | |
virtual void | setSystem (System &system) |
Set the system after construction. More... | |
const System & | system () const |
Get parent System by reference. More... | |
System & | system () |
Get parent System by reference. More... | |
const Mixture & | mixture () const |
Get Mixture by reference. More... | |
Mixture & | mixture () |
Get Mixture by reference. More... | |
const Domain & | domain () const |
Get spatial domain (including grid info) by reference. More... | |
Domain & | domain () |
Get spatial domain (including grid info) by reference. More... | |
const Interaction & | interaction () const |
Get interaction (i.e., excess free energy model) by reference. More... | |
Interaction & | interaction () |
Get interaction (i.e., excess free energy model) by reference. More... | |
const Homogeneous::Mixture & | homogeneous () const |
Get homogeneous mixture (for reference calculations). More... | |
Homogeneous::Mixture & | homogeneous () |
Get homogeneous mixture (for reference calculations). More... | |
FileMaster & | fileMaster () |
Get FileMaster by reference. More... | |
DArray< System::WField > & | wFields () |
Get array of all chemical potential fields. More... | |
System::WField & | wField (int monomerId) |
Get chemical potential field for a specific monomer type. More... | |
DArray< System::CField > & | cFields () |
Get array of all chemical potential fields. More... | |
System::CField & | cField (int monomerId) |
Get chemical potential field for a specific monomer type. More... | |
Command to compute properties of homogeneous reference system.
Definition at line 21 of file HomogeneousComparison.h.
Pscf::Fd1d::HomogeneousComparison::HomogeneousComparison | ( | ) |
Default constructor.
Definition at line 28 of file HomogeneousComparison.cpp.
Pscf::Fd1d::HomogeneousComparison::HomogeneousComparison | ( | System & | system | ) |
Constructor.
Definition at line 35 of file HomogeneousComparison.cpp.
Pscf::Fd1d::HomogeneousComparison::~HomogeneousComparison | ( | ) |
Destructor.
Definition at line 42 of file HomogeneousComparison.cpp.
void Pscf::Fd1d::HomogeneousComparison::compute | ( | int | mode | ) |
Compute properties of a homogeneous reference system.
This function should be called after iterator().solve() to compute properties of a homogeneous reference system to which the properties of the system of interest can be compared. The value of the mode parameter controls the choice of homogeneous reference system used for this comparison.
Mode parameter values:
The difference between mode indices 1 and 2 is the initial guess used in the iterative computation of the composition of the homogeneous reference system:
Mode indices 1 and 2 are intended to be used for calculation of excess properties in, e.g., computation of properties of a micelle or an interface.
mode | mode index |
Definition at line 54 of file HomogeneousComparison.cpp.
References Util::DArray< Data >::allocate(), Util::Array< Data >::capacity(), Pscf::Homogeneous::Mixture::computeFreeEnergy(), Pscf::Homogeneous::Mixture::computeMu(), Pscf::Homogeneous::Mixture::computePhi(), Pscf::Fd1d::SystemAccess::domain(), Pscf::Fd1d::SystemAccess::homogeneous(), Pscf::Fd1d::SystemAccess::interaction(), Util::DArray< Data >::isAllocated(), Pscf::Fd1d::SystemAccess::mixture(), Pscf::MixtureTmpl< TP, TS >::nPolymer(), Pscf::MixtureTmpl< TP, TS >::nSolvent(), Pscf::Fd1d::Domain::nx(), Pscf::MixtureTmpl< TP, TS >::polymer(), Pscf::Homogeneous::Mixture::setComposition(), UTIL_CHECK, and UTIL_THROW.
Referenced by Pscf::Fd1d::Sweep::getSolution(), and Pscf::Fd1d::System::readCommands().
void Pscf::Fd1d::HomogeneousComparison::output | ( | int | mode, |
std::ostream & | out | ||
) |
Output comparison to a homogeneous reference system.
mode | mode index |
out | output stream |
Definition at line 117 of file HomogeneousComparison.cpp.
References Pscf::Fd1d::SystemAccess::domain(), Pscf::Fd1d::System::fHelmholtz(), Pscf::Homogeneous::Mixture::fHelmholtz(), Pscf::Fd1d::SystemAccess::homogeneous(), Pscf::Fd1d::SystemAccess::mixture(), Pscf::Homogeneous::Mixture::nMolecule(), Pscf::Homogeneous::Mixture::phi(), Pscf::MixtureTmpl< TP, TS >::polymer(), Pscf::Fd1d::System::pressure(), Pscf::Homogeneous::Mixture::pressure(), Pscf::Fd1d::SystemAccess::system(), Pscf::MixtureTmpl< TP, TS >::vMonomer(), and Pscf::Fd1d::Domain::volume().
Referenced by Pscf::Fd1d::Sweep::outputSolution(), and Pscf::Fd1d::System::readCommands().