ls1-MarDyn
ls1-MarDyn molecular dynamics code
Public Member Functions | List of all members
GrandCanonicalEnsemble Class Reference

GrandCanonicalEnsemble was moved here from Simulation.cpp and partially adapted to Ensemble base class

The GrandCanonicalEnsemble probably used to be a functional muVT ensemble class, that was somewhat dropped with the move to XML inputs. The routines were all over simulation.cpp but never ran.
This is a STUB implementation, mainly lacking readXML and updateGlobalVariable.

Work done till now:
More...

#include <GrandCanonicalEnsemble.h>

Inheritance diagram for GrandCanonicalEnsemble:
Ensemble

Public Member Functions

void readXML (XMLfileUnits &xmlconfig) override
 
unsigned long N () override
 Returns the global number of Molecules of the ensemble. More...
 
double V () override
 Returns the global volume of the ensemble. More...
 
double T () override
 Returns the global Temperature of the ensemble. More...
 
double mu () override
 Returns the global chemical potential of the ensemble. More...
 
double p () override
 Returns the global presure of the ensemble. More...
 
double E () override
 Returns the global energy of the ensemble. More...
 
void updateGlobalVariable (ParticleContainer *particleContainer, GlobalVariable variable) override
 Calculate global variables. More...
 
void initConfigXML (ParticleContainer *moleculeContainer) override
 
void prepare_start () override
 
void beforeEventNewTimestep (ParticleContainer *moleculeContainer, DomainDecompBase *domainDecomposition, unsigned long simstep) override
 
void afterForces (ParticleContainer *moleculeContainer, DomainDecompBase *domainDecomposition, CellProcessor *cellProcessor, unsigned long simstep) override
 
void storeSample (Molecule *m, uint32_t componentid) override
 
std::list< ChemicalPotential > * getLmu () override
 
- Public Member Functions inherited from Ensemble
DomainBase *& domain ()
 
ComponentgetComponent (int cid)
 
ComponentgetComponent (std::string name)
 
std::vector< Component > * getComponents ()
 
void addComponent (Component &component)
 
void setComponentLookUpIDs ()
 prepare the _compIDs used by the Vectorized*CellProcessors
 
int getType ()
 
virtual void beforeThermostat (unsigned long simstep, unsigned long initStatistics)
 

Additional Inherited Members

- Protected Attributes inherited from Ensemble
std::vector< Component_components
 
std::map< std::string, int > _componentnamesToIds
 
std::vector< MixingRuleBase * > _mixingrules
 
DomainBase_domain
 
Type _type = undefined
 
Domain_simulationDomain
 

Detailed Description

GrandCanonicalEnsemble was moved here from Simulation.cpp and partially adapted to Ensemble base class

The GrandCanonicalEnsemble probably used to be a functional muVT ensemble class, that was somewhat dropped with the move to XML inputs. The routines were all over simulation.cpp but never ran.
This is a STUB implementation, mainly lacking readXML and updateGlobalVariable.

Work done till now:

Member Function Documentation

◆ afterForces()

void GrandCanonicalEnsemble::afterForces ( ParticleContainer moleculeContainer,
DomainDecompBase domainDecomposition,
CellProcessor cellProcessor,
unsigned long  simstep 
)
overridevirtual

Runs steps formerly in afterForces(simulate) in simulation.cpp

Reimplemented from Ensemble.

◆ beforeEventNewTimestep()

void GrandCanonicalEnsemble::beforeEventNewTimestep ( ParticleContainer moleculeContainer,
DomainDecompBase domainDecomposition,
unsigned long  simstep 
)
overridevirtual

Runs steps formerly in simulate in simulation.cpp

Todo:
What is this good for? Where come the numbers from? Needs documentation

Reimplemented from Ensemble.

◆ E()

double GrandCanonicalEnsemble::E ( )
inlineoverridevirtual

Returns the global energy of the ensemble.

Implements Ensemble.

◆ getLmu()

std::list<ChemicalPotential>* GrandCanonicalEnsemble::getLmu ( )
inlineoverridevirtual

Returns _lmu pointer for processing by external plugins

Reimplemented from Ensemble.

◆ initConfigXML()

void GrandCanonicalEnsemble::initConfigXML ( ParticleContainer moleculeContainer)
overridevirtual

Runs steps formerly in initConfigXML in simulation.cpp

Reimplemented from Ensemble.

◆ mu()

double GrandCanonicalEnsemble::mu ( )
inlineoverridevirtual

Returns the global chemical potential of the ensemble.

Implements Ensemble.

◆ N()

unsigned long GrandCanonicalEnsemble::N ( )
inlineoverridevirtual

Returns the global number of Molecules of the ensemble.

Implements Ensemble.

◆ p()

double GrandCanonicalEnsemble::p ( )
inlineoverridevirtual

Returns the global presure of the ensemble.

Implements Ensemble.

◆ prepare_start()

void GrandCanonicalEnsemble::prepare_start ( )
overridevirtual

Runs steps formerly in prepare_start in simulation.cpp

Reimplemented from Ensemble.

◆ readXML()

void GrandCanonicalEnsemble::readXML ( XMLfileUnits xmlconfig)
inlineoverridevirtual

Reimplemented from Ensemble.

◆ storeSample()

void GrandCanonicalEnsemble::storeSample ( Molecule m,
uint32_t  componentid 
)
overridevirtual

stores a molecule as a sample for a given component

Reimplemented from Ensemble.

◆ T()

double GrandCanonicalEnsemble::T ( )
inlineoverridevirtual

Returns the global Temperature of the ensemble.

Implements Ensemble.

◆ updateGlobalVariable()

void GrandCanonicalEnsemble::updateGlobalVariable ( ParticleContainer particleContainer,
GlobalVariable  variable 
)
inlineoverridevirtual

Calculate global variables.

Parameters
variableVariable to be updated.

Implements Ensemble.

◆ V()

double GrandCanonicalEnsemble::V ( )
inlineoverridevirtual

Returns the global volume of the ensemble.

Implements Ensemble.


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