PSCF v1.3
Pscf::Prdc::MixAndMatchEnv Class Reference

Environment that can mix and match field generators in variable-cell SCFT. More...

#include <MixAndMatchEnv.h>

Inheritance diagram for Pscf::Prdc::MixAndMatchEnv:
Pscf::MixAndMatchEnvTmpl< Environment, FieldGenerator > Pscf::Rpc::FilmEnvironment< D > Pscf::Rpg::FilmEnvironment< D >

Public Member Functions

 MixAndMatchEnv ()
 Constructor.
 ~MixAndMatchEnv ()
 Destructor.
double modifyStress (int paramId, double stress) const
 Modify stress to account for Environment, for one lattice parameter.
Public Member Functions inherited from Pscf::MixAndMatchEnvTmpl< Environment, FieldGenerator >
 MixAndMatchEnvTmpl ()
 Constructor.
 ~MixAndMatchEnvTmpl ()
 Destructor.
void readParameters (std::istream &in)
 Read parameters from input stream.
void generate ()
 Checks if fields need to be (re)generated.
FieldGenerator const & fieldGenerator1 () const
 Get the first FieldGenerator by const reference.
FieldGenerator const & fieldGenerator2 () const
 Get the second FieldGenerator (if any) by const reference.
bool hasFieldGenerator2 () const
 Does a second FieldGenerator exist?
GArray< ParameterTypegetParameterTypes ()
 Get specialized sweep parameter types to add to a Sweep object.

Additional Inherited Members

Protected Member Functions inherited from Pscf::MixAndMatchEnvTmpl< Environment, FieldGenerator >
virtual void createGenerators ()=0
 Create FieldGenerator objects for mask and/or external field.
Protected Attributes inherited from Pscf::MixAndMatchEnvTmpl< Environment, FieldGenerator >
FieldGenerator * fieldGenPtr1_
 Pointer to the first FieldGenerator object (required).
FieldGenerator * fieldGenPtr2_
 Pointer to the second FieldGenerator object (optional).

Detailed Description

Environment that can mix and match field generators in variable-cell SCFT.

The classes Environment, FieldGenerator, and MixAndMatchEnv in the Prdc namespace are extensions of EnvironmentBase, FieldGeneratorBase, and MixAndMatchEnvTmpl in the Pscf namespace, respectively. These Prdc classes are designed to simply add a feature that is not defined in the corresponding Pscf classes: the ability to calculate, store, and write an environment-modified stress that will be used to optimize the lattice parameters of the periodic unit cell.

This class is therefore a subclass of MixAndMatchEnvTmpl that defines Prdc::Environment as its Environment base class, and uses Prdc::FieldGenerator as the base class for its field generators. It defines only one method, modifyStress, and otherwise adopts all the behavior of its parent MixAndMatchEnvTmpl class.

Definition at line 39 of file MixAndMatchEnv.h.

Constructor & Destructor Documentation

◆ MixAndMatchEnv()

◆ ~MixAndMatchEnv()

Pscf::Prdc::MixAndMatchEnv::~MixAndMatchEnv ( )

Destructor.

Definition at line 22 of file MixAndMatchEnv.cpp.

Member Function Documentation

◆ modifyStress()

double Pscf::Prdc::MixAndMatchEnv::modifyStress ( int paramId,
double stress ) const

Modify stress to account for Environment, for one lattice parameter.

This method performs only the Environment-specific aspects of the stress calculation, while all other aspects are handled by the computeStress method of the parent Prdc::Environment class.

Parameters
paramIdindex of the lattice parameter with this stress
stressbaseline SCFT stress computed by a Mixture object

Definition at line 28 of file MixAndMatchEnv.cpp.

References Pscf::MixAndMatchEnvTmpl< Environment, FieldGenerator >::fieldGenPtr1_, Pscf::MixAndMatchEnvTmpl< Environment, FieldGenerator >::fieldGenPtr2_, Pscf::EnvironmentBase::needsUpdate(), and UTIL_CHECK.


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