PSCF v1.3
|
Base class for SCFT thermodynamic property calculator. More...
#include <ScftReal.h>
Public Types | |
using | Base = SystemConstRefReal<ST> |
Base class type name alias. | |
using | SystemT = typename Base::SystemT |
Parent System type name alias. |
Public Member Functions | |
ScftReal (SystemT const &system) | |
Constructor. | |
virtual | ~ScftReal () |
Destructor. | |
State modifiers | |
void | compute () |
Compute SCFT free energy density and pressure for current fields. | |
void | clear () |
Clear all thermodynamic data. | |
SCFT Property Access and Output | |
bool | hasData () const |
Have free energies and pressure been computed? | |
double | fHelmholtz () const |
Get total Helmholtz free energy per monomer / kT. | |
double | fIdeal () const |
Get the ideal gas contribution to fHelmholtz. | |
double | fInter () const |
Get the interaction contribution to fHelmholtz. | |
double | fExt () const |
Get the external field contribution to fHelmholtz. | |
double | pressure () const |
Get the precomputed pressure times monomer volume / kT. | |
void | write (std::ostream &out) |
Write SCFT thermodynamic properties to a file. |
Protected Member Functions | |
virtual double | innerProduct (FieldT const &A, FieldT const &B) const |
Inner product of two fields. | |
SystemT const & | system () const |
Get the associated System. | |
MixtureT const & | mixture () const |
Get the Mixture. | |
InteractionT const & | interaction () const |
Get the Interaction. | |
DomainT const & | domain () const |
Get the Domain. | |
CFieldContainerT const & | c () const |
Get the concentration (c) field container. | |
WFieldContainerT const & | w () const |
Get the chemical potential (w) field container. | |
WFieldContainerT const & | h () const |
Get the external potential (h) field container. | |
MaskT const & | mask () const |
Get the mask. | |
FileMaster const & | fileMaster () const |
Get the FileMaster. | |
Protected Member Functions inherited from Pscf::Prdc::SystemConstRefReal< ST > | |
SystemConstRefReal () | |
Default constructor. | |
SystemConstRefReal (SystemT const &system) | |
Constructor. | |
~SystemConstRefReal () | |
Destructor. | |
void | associate (SystemT const &system) |
Create associations with a system and its components. | |
SystemT const & | system () const |
Get the associated System. | |
MixtureT const & | mixture () const |
Get the Mixture. | |
InteractionT const & | interaction () const |
Get the Interaction. | |
DomainT const & | domain () const |
Get the Domain. | |
CFieldContainerT const & | c () const |
Get the concentration (c) field container. | |
WFieldContainerT const & | w () const |
Get the chemical potential (w) field container. | |
WFieldContainerT const & | h () const |
Get the external potential (h) field container. | |
MaskT const & | mask () const |
Get the mask. | |
FileMaster const & | fileMaster () const |
Get the FileMaster. |
Base class for SCFT thermodynamic property calculator.
Definition at line 24 of file ScftReal.h.
using Pscf::Prdc::ScftReal< D, ST >::Base = SystemConstRefReal<ST> |
Base class type name alias.
Definition at line 30 of file ScftReal.h.
using Pscf::Prdc::ScftReal< D, ST >::SystemT = typename Base::SystemT |
Parent System type name alias.
Definition at line 33 of file ScftReal.h.
Pscf::Prdc::ScftReal< D, ST >::ScftReal | ( | SystemT const & | system | ) |
Constructor.
system | parent System object |
Definition at line 30 of file ScftReal.tpp.
References system(), and Pscf::Prdc::SystemConstRefReal< ST >::SystemConstRefReal().
|
virtual |
Destructor.
Definition at line 44 of file ScftReal.tpp.
void Pscf::Prdc::ScftReal< D, ST >::compute | ( | ) |
Compute SCFT free energy density and pressure for current fields.
Resulting values are retrieved by the fHelmholtz(), fIdeal(), fInter(), fExt(), and pressure() accessor functions.
Definition at line 51 of file ScftReal.tpp.
References c(), domain(), h(), hasData(), innerProduct(), interaction(), Pscf::PolymerModel::isThread(), Pscf::PolymerSpecies::length(), mask(), mixture(), Pscf::Species::mu(), Pscf::PolymerSpecies::nBead(), Pscf::Species::phi(), Pscf::SolventSpecies::size(), UTIL_CHECK, and w().
Referenced by write().
void Pscf::Prdc::ScftReal< D, ST >::clear | ( | ) |
Clear all thermodynamic data.
Definition at line 269 of file ScftReal.tpp.
|
inline |
Have free energies and pressure been computed?
Definition at line 259 of file ScftReal.h.
|
inline |
Get total Helmholtz free energy per monomer / kT.
This function retrieves a value computed by computeFreeEnergy().
Definition at line 219 of file ScftReal.h.
References UTIL_CHECK.
Referenced by write().
|
inline |
Get the ideal gas contribution to fHelmholtz.
This function retrieves a value computed by computeFreeEnergy().
Definition at line 227 of file ScftReal.h.
References UTIL_CHECK.
|
inline |
Get the interaction contribution to fHelmholtz.
This function retrieves a value computed by computeFreeEnergy().
Definition at line 235 of file ScftReal.h.
References UTIL_CHECK.
|
inline |
Get the external field contribution to fHelmholtz.
This function retrieves a value computed by computeFreeEnergy().
Definition at line 243 of file ScftReal.h.
References UTIL_CHECK.
|
inline |
Get the precomputed pressure times monomer volume / kT.
This function retrieves a value computed by computeFreeEnergy(). The value is -1 times the grand-canonical free energy per monomer divided by kT.
Definition at line 251 of file ScftReal.h.
References UTIL_CHECK.
Referenced by write().
void Pscf::Prdc::ScftReal< D, ST >::write | ( | std::ostream & | out | ) |
Write SCFT thermodynamic properties to a file.
This function outputs Helmholtz free energy per monomer, pressure (in units of kT per monomer volume), the volume fraction and chemical potential of each species, and all unit cell parameters.
If data is not available (i.e,. if hasData() == false), this function calls compute() on entry.
If parameter "out" is a file that already exists, this function will append to the end of that file, rather than overwriting it. Calling writeParamNoSweep and writeThermo in succession with the same output stream will thus produce a single file containing both input parameters and calculated thermodynamic properties.
out | output stream |
Definition at line 276 of file ScftReal.tpp.
References compute(), domain(), fHelmholtz(), h(), hasData(), mixture(), and pressure().
|
inlineprotectedvirtual |
Inner product of two fields.
A | 1st field |
B | 2nd field |
Definition at line 169 of file ScftReal.h.
Referenced by compute().
|
inlineprotected |
Get the associated System.
Definition at line 70 of file SystemConstRefReal.h.
Referenced by ScftReal().
|
inlineprotected |
Get the Mixture.
Definition at line 74 of file SystemConstRefReal.h.
|
inlineprotected |
|
inlineprotected |
Get the Domain.
Definition at line 82 of file SystemConstRefReal.h.
|
inlineprotected |
Get the concentration (c) field container.
Definition at line 86 of file SystemConstRefReal.h.
Referenced by compute().
|
inlineprotected |
Get the chemical potential (w) field container.
Definition at line 90 of file SystemConstRefReal.h.
Referenced by compute().
|
inlineprotected |
Get the external potential (h) field container.
Definition at line 94 of file SystemConstRefReal.h.
|
inlineprotected |
|
inlineprotected |
Get the FileMaster.
Definition at line 102 of file SystemConstRefReal.h.