ls1-MarDyn
ls1-MarDyn molecular dynamics code
Classes | Public Member Functions | Static Public Member Functions | List of all members
Mirror Class Reference
Inheritance diagram for Mirror:
PluginBase ObserverBase ControlInstance

Public Member Functions

void readXML (XMLfileUnits &xmlconfig) override
 Read in XML configuration for Mirror and all its included objects. More...
 
void init (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain) override
 Method init will be called at the begin of the simulation. More...
 
void beforeForces (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep) override
 Method beforeForces will be called before forcefields have been applied no alterations w.r.t. Forces shall be made here. More...
 
void afterForces (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep) override
 Method afterForces will be called after forcefields have been applied. More...
 
void endStep (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain, unsigned long simstep) override
 Method endStep will be called at the end of each time step. More...
 
void finish (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain) override
 Method finish will be called at the end of the simulation. More...
 
std::string getPluginName () override
 return the name of the plugin More...
 
uint64_t getReflectedParticlesCountLocal (const uint16_t &componentid)
 
uint64_t getDeletedParticlesCountLocal (const uint16_t &componentid)
 
uint32_t getPluginID ()
 
void setPluginID (const uint32_t &id)
 
double getPosition ()
 
SubjectBasegetSubject ()
 
void update (SubjectBase *subject) override
 
std::string getShortName () override
 
- Public Member Functions inherited from PluginBase
 PluginBase ()
 Subclasses should use their constructur to pass parameters (e.g. filenames)
 
virtual void beforeEventNewTimestep (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep)
 Method will be called first thing in a new timestep. More...
 
virtual void siteWiseForces (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep)
 Method siteWiseForces will be called before forcefields have been applied alterations to sitewise forces and fullMolecule forces can be made here. More...
 
virtual void registerCallbacks (std::map< std::string, FunctionWrapper > &callbackMap)
 
virtual void accessAllCallbacks (const std::map< std::string, FunctionWrapper > &callbackMap)
 

Static Public Member Functions

static PluginBasecreateInstance ()
 

Member Function Documentation

◆ afterForces()

void Mirror::afterForces ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
unsigned long  simstep 
)
overridevirtual

Method afterForces will be called after forcefields have been applied.

make pure Virtual ?

Reimplemented from PluginBase.

◆ beforeForces()

void Mirror::beforeForces ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
unsigned long  simstep 
)
overridevirtual

Method beforeForces will be called before forcefields have been applied no alterations w.r.t. Forces shall be made here.

Diffuse Mirror

Reimplemented from PluginBase.

◆ endStep()

void Mirror::endStep ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
Domain domain,
unsigned long  simstep 
)
inlineoverridevirtual

Method endStep will be called at the end of each time step.

This method will be called every time step passing the simstep as an additional parameter. It can be used e.g. to write per time step data to a file or perform additional computations.

Parameters
particleContainerparticle container storing the (local) molecules
domainDecompdomain decomposition in use
domain

Implements PluginBase.

◆ finish()

void Mirror::finish ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
Domain domain 
)
inlineoverridevirtual

Method finish will be called at the end of the simulation.

This method will be called once at the end of the simulation. It can be used e.g. to closing output files or writing final statistics.

Parameters
particleContainerparticle container storing the (local) molecules
domainDecompdomain decomposition in use
domain

Implements PluginBase.

◆ getPluginName()

std::string Mirror::getPluginName ( )
inlineoverridevirtual

return the name of the plugin

Implements PluginBase.

◆ getShortName()

std::string Mirror::getShortName ( )
inlineoverridevirtual

Implements ControlInstance.

◆ init()

void Mirror::init ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
Domain domain 
)
overridevirtual

Method init will be called at the begin of the simulation.

This method will be called once at the begin of the simulation just right before the main time step loop. It can be used e.g. to open output files or initialize statistics.

Parameters
particleContainerparticle container storing the (local) molecules
domainDecompdomain decomposition in use
domain

Implements PluginBase.

◆ readXML()

void Mirror::readXML ( XMLfileUnits xmlconfig)
overridevirtual

Read in XML configuration for Mirror and all its included objects.

The following XML object structure is handled by this method:

<plugin name="Mirror" type="5" dir="o-|"> <!-- Mirror type and direction, dir="o-|" or dir="|-o" reflecting particles to the left or right side -->
<pluginID>INT</pluginID> <!-- plugin id to enable communication with other plugins -->
<cid>INT</cid> <!-- only apply mirror to specified components; 0: all (Default); 1: component 1; etc. -->
<position>
<refID>INT</refID> <!-- coordinate relative to reference point, 1:left interface | 2:right interface
<coord>FLOAT</coord> <!-- coordinate of Mirror position -->
</position>
<forceConstant>0.</forceConstant> <!-- force added to particles in order to reflect them from Mirror plane -->
<meland>
<use_probability>INT</use_probability> <!-- 0:disable | 1:enable probability factor in case of Mirror type MT_MELAND_2004 -->
<velo_target>FLOAT</velo_target> <!-- target hydrodynamic velocity -->
<fixed_probability>FLOAT</fixed_probability> <!-- (optional) fixed probability for reflection in Meland2004 mirror -->
</meland>
<diffuse> <!-- particles will not sharply be reflected at mirror position x, but at x + dx, where dx is a random number between 0 and <width> -->
<width>FLOAT</width> <!-- width of region behind mirror in which particles will be reflected -->
</diffuse>
<ramping>
<start>UNSIGNED_LONG</start> <!-- Timestep until all particles are reflected -->
<stop>UNSIGNED_LONG</stop> <!-- As from this timestep all particles are treated as set in "treatment" -->
<treatment>INT</treatment> <!-- When not reflected, the particles are deleted (0) or transmitted (1) -->
</ramping>
</plugin>

mirror type

mirror direction

constant force

zero gradient

normal distributions

Meland2004

Diffuse mirror

Implements PluginBase.

◆ update()

void Mirror::update ( SubjectBase subject)
overridevirtual

Implements ObserverBase.


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