ls1-MarDyn
ls1-MarDyn molecular dynamics code
Public Member Functions | Protected Attributes | List of all members
Ensemble Class Referenceabstract

Base class for ensembles. More...

#include <EnsembleBase.h>

Inheritance diagram for Ensemble:
CanonicalEnsemble GrandCanonicalEnsemble

Public Member Functions

virtual void readXML (XMLfileUnits &xmlconfig)
 
virtual unsigned long N ()=0
 Returns the global number of Molecules of the ensemble. More...
 
virtual double V ()=0
 Returns the global volume of the ensemble. More...
 
virtual double E ()=0
 Returns the global energy of the ensemble. More...
 
virtual double mu ()=0
 Returns the global chemical potential of the ensemble. More...
 
virtual double p ()=0
 Returns the global presure of the ensemble. More...
 
virtual double T ()=0
 Returns the global Temperature of the ensemble. More...
 
virtual void updateGlobalVariable (ParticleContainer *particleContainer, GlobalVariable variable)=0
 Calculate global variables. More...
 
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 std::list< ChemicalPotential > * getLmu ()
 
virtual void initConfigXML (ParticleContainer *moleculeContainer)
 
virtual void prepare_start ()
 
virtual void beforeEventNewTimestep (ParticleContainer *moleculeContainer, DomainDecompBase *domainDecomposition, unsigned long simstep)
 
virtual void afterForces (ParticleContainer *moleculeContainer, DomainDecompBase *domainDecomposition, CellProcessor *cellProcessor, unsigned long simstep)
 
virtual void beforeThermostat (unsigned long simstep, unsigned long initStatistics)
 
virtual void storeSample (Molecule *m, uint32_t componentid)
 

Protected Attributes

std::vector< Component_components
 
std::map< std::string, int > _componentnamesToIds
 
std::vector< MixingRuleBase * > _mixingrules
 
DomainBase_domain
 
Type _type = undefined
 
Domain_simulationDomain
 

Detailed Description

Base class for ensembles.

Author
Christoph Niethammer nieth.nosp@m.amme.nosp@m.r@hlr.nosp@m.s.de

Each ensemble should provide access to extensive (NVE) and intensive (\mu p t) variables as well as a function to update global variables.

Member Function Documentation

◆ afterForces()

virtual void Ensemble::afterForces ( ParticleContainer moleculeContainer,
DomainDecompBase domainDecomposition,
CellProcessor cellProcessor,
unsigned long  simstep 
)
inlinevirtual

runs after forces step for GrandCanonical, nothing for canonical

Reimplemented in GrandCanonicalEnsemble.

◆ beforeEventNewTimestep()

virtual void Ensemble::beforeEventNewTimestep ( ParticleContainer moleculeContainer,
DomainDecompBase domainDecomposition,
unsigned long  simstep 
)
inlinevirtual

runs simulate step needed in GrandCanonical, nothing for canonical

Reimplemented in GrandCanonicalEnsemble.

◆ beforeThermostat()

virtual void Ensemble::beforeThermostat ( unsigned long  simstep,
unsigned long  initStatistics 
)
inlinevirtual

runs before temperature control is applied, but after force calculations

Reimplemented in CanonicalEnsemble.

◆ E()

virtual double Ensemble::E ( )
pure virtual

Returns the global energy of the ensemble.

Implemented in CanonicalEnsemble, and GrandCanonicalEnsemble.

◆ getLmu()

virtual std::list<ChemicalPotential>* Ensemble::getLmu ( )
inlinevirtual

Returns _lmu pointer for processing by external plugins

Reimplemented in GrandCanonicalEnsemble.

◆ getType()

int Ensemble::getType ( )
inline

get Ensemble Type (NVT or muVT)

◆ initConfigXML()

virtual void Ensemble::initConfigXML ( ParticleContainer moleculeContainer)
inlinevirtual

runs steps only needed in GrandCanonicalEnsemble, does nothing for canonical

Reimplemented in GrandCanonicalEnsemble.

◆ mu()

virtual double Ensemble::mu ( )
pure virtual

Returns the global chemical potential of the ensemble.

Implemented in CanonicalEnsemble, and GrandCanonicalEnsemble.

◆ N()

virtual unsigned long Ensemble::N ( )
pure virtual

Returns the global number of Molecules of the ensemble.

Implemented in CanonicalEnsemble, and GrandCanonicalEnsemble.

◆ p()

virtual double Ensemble::p ( )
pure virtual

Returns the global presure of the ensemble.

Implemented in CanonicalEnsemble, and GrandCanonicalEnsemble.

◆ prepare_start()

virtual void Ensemble::prepare_start ( )
inlinevirtual

runs steps only needed in GrandCanonicalEnsemble, does nothing for canonical

Reimplemented in GrandCanonicalEnsemble.

◆ storeSample()

virtual void Ensemble::storeSample ( Molecule m,
uint32_t  componentid 
)
inlinevirtual

Store Sample molecule from old input readers in lmu

Reimplemented in GrandCanonicalEnsemble.

◆ T()

virtual double Ensemble::T ( )
pure virtual

Returns the global Temperature of the ensemble.

Implemented in CanonicalEnsemble, and GrandCanonicalEnsemble.

◆ updateGlobalVariable()

virtual void Ensemble::updateGlobalVariable ( ParticleContainer particleContainer,
GlobalVariable  variable 
)
pure virtual

Calculate global variables.

Parameters
variableVariable to be updated.

Implemented in CanonicalEnsemble, and GrandCanonicalEnsemble.

◆ V()

virtual double Ensemble::V ( )
pure virtual

Returns the global volume of the ensemble.

Implemented in CanonicalEnsemble, and GrandCanonicalEnsemble.


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