MaMiCo 1.2
Loading...
Searching...
No Matches
coupling::ParticleInsertion< LinkedCell, dim > Class Template Referenceabstract

interface for particle insertion/removal on coupling cell basis. More...

#include <ParticleInsertion.h>

Inheritance diagram for coupling::ParticleInsertion< LinkedCell, dim >:

Public Types

enum  Action { NoAction = 0 , Insertion = 1 , Deletion = 2 }
 

Public Member Functions

virtual coupling::ParticleInsertion< LinkedCell, dim >::Action insertDeleteMass (coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, const tarch::la::Vector< dim, double > &couplingCellPosition, const tarch::la::Vector< dim, double > &couplingCellSize, const tarch::la::Vector< dim, double > &meanVelocity, const double &temperature, const coupling::BoundaryForceController< LinkedCell, dim > &boundaryForceController)=0
 adds or removes particles to the coupling cell, simulates a mass flow.
 
virtual bool requiresPotentialEnergyLandscape ()=0
 returns true, if a potential energy landscape is needed for the insertion/removal.
 
 ParticleInsertion (unsigned int insertDeleteMassEveryTimestep)
 a simple constructor
 
virtual ~ParticleInsertion ()
 a simple destructor
 
bool insertDeleteMassAtTimestep (unsigned int t) const
 returns true if mass needs to be inserted or removed in a time step t
 

Private Attributes

const unsigned int _insertDeleteMassEveryTimestep
 

Detailed Description

template<class LinkedCell, unsigned int dim>
class coupling::ParticleInsertion< LinkedCell, dim >

interface for particle insertion/removal on coupling cell basis.

Author
Philipp Neumann
Template Parameters
LinkedCellthe LinkedCell class is given by the implementation of linked cells in the molecular dynamics simulation
dimrefers to the spacial dimension of the simulation, can be 1, 2, or 3

Member Enumeration Documentation

◆ Action

template<class LinkedCell, unsigned int dim>
enum coupling::ParticleInsertion::Action

this state is returned by the insertDeleteMass() function. To tell the program, which action happened through the application of the function

Enumerator
NoAction 

No action was taken / Nothing changed.

Insertion 

A molecule was inserted.

Deletion 

A molecule was deleted.

Constructor & Destructor Documentation

◆ ParticleInsertion()

template<class LinkedCell, unsigned int dim>
coupling::ParticleInsertion< LinkedCell, dim >::ParticleInsertion ( unsigned int insertDeleteMassEveryTimestep)
inline

a simple constructor

Parameters
insertDeleteMassAtTimestepinterval of time steps for the insertion/removal of particles

Member Function Documentation

◆ insertDeleteMass()

template<class LinkedCell, unsigned int dim>
virtual coupling::ParticleInsertion< LinkedCell, dim >::Action coupling::ParticleInsertion< LinkedCell, dim >::insertDeleteMass ( coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > & cell,
const tarch::la::Vector< dim, double > & couplingCellPosition,
const tarch::la::Vector< dim, double > & couplingCellSize,
const tarch::la::Vector< dim, double > & meanVelocity,
const double & temperature,
const coupling::BoundaryForceController< LinkedCell, dim > & boundaryForceController )
pure virtual

adds or removes particles to the coupling cell, simulates a mass flow.

Parameters
cellthe coupling cell to insert or delete mass
couplingCellPositionposition of the cell given as a vector
couplingCellSizesize of the coupling cell given as a vector
meanVelocitythe mean velocity in the cell as a vector
temperaturethe current temperature in the cell
boundaryForceControlleran instance of the boundaryForceController for the simulation
Returns
the type of coupling::ParticleInsertion::Action that was applied

Implemented in coupling::NoParticleInsertion< LinkedCell, dim >, and coupling::UsherParticleInsertion< LinkedCell, dim >.

◆ insertDeleteMassAtTimestep()

template<class LinkedCell, unsigned int dim>
bool coupling::ParticleInsertion< LinkedCell, dim >::insertDeleteMassAtTimestep ( unsigned int t) const
inline

returns true if mass needs to be inserted or removed in a time step t

Parameters
ttime step to check for the insertion/removal of mass
Returns
a bool that indicates if mass insertion/deletion shall be applied in this time step (true) or not (false)

◆ requiresPotentialEnergyLandscape()

template<class LinkedCell, unsigned int dim>
virtual bool coupling::ParticleInsertion< LinkedCell, dim >::requiresPotentialEnergyLandscape ( )
pure virtual

returns true, if a potential energy landscape is needed for the insertion/removal.

returns true, if the particle insertion requires information on the potential energy landscape. The USHER algorithm requires it. Other algorithms may not require it; the trivial NoParticleInsertion-implementation which does not do anything obviously does not require a valid potential energy landscape.

Returns
a bool that indicates if a potential energy landscape is neccessary (true) or not (false)

Implemented in coupling::NoParticleInsertion< LinkedCell, dim >, and coupling::UsherParticleInsertion< LinkedCell, dim >.

Member Data Documentation

◆ _insertDeleteMassEveryTimestep

template<class LinkedCell, unsigned int dim>
const unsigned int coupling::ParticleInsertion< LinkedCell, dim >::_insertDeleteMassEveryTimestep
private

interval of time steps for the insertion/removal of particles


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