|
MaMiCo 1.2
|
handles particle insertion (via Usher algorithm) and random particle deletion. More...
#include <UsherParticleInsertion.h>


Classes | |
| class | UsherParams |
| collects all the parameters necessary for the Usher algorithm More... | |
Public Member Functions | |
| UsherParticleInsertion (unsigned int insertDeleteMassEveryTimestep, double rSigmaCoeff, double meanPotentialEnergyFactor, double uOverlapCoeff, double stepRefCoeff, unsigned int iterMax, unsigned int restartMax, double tolerance, double offsetFromOuterBoundary, coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface) | |
| a simple constructor | |
| virtual | ~UsherParticleInsertion () |
| a dummy destructor | |
| 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) |
| checks if a particle needs to be inserted or deleted in a cell | |
| virtual bool | requiresPotentialEnergyLandscape () |
| since the Usher algorithm requires the potential energy landscape, the function returns true | |
Public Member Functions inherited from coupling::ParticleInsertion< LinkedCell, dim > | |
| 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 | |
Protected Member Functions | |
| virtual coupling::ParticleInsertion< LinkedCell, dim >::Action | findParticlePosition (coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &thisCell, const tarch::la::Vector< dim, double > &couplingCellPosition, const tarch::la::Vector< dim, double > &couplingCellSize, coupling::datastructures::Molecule< dim > &molecule, const coupling::BoundaryForceController< LinkedCell, dim > &boundaryForceController) |
| determines the position of a new particle within the coupling cell | |
Protected Attributes | |
| coupling::interface::MDSolverInterface< LinkedCell, dim > *const | _mdSolverInterface |
| interface to the md solver | |
| const UsherParams | _usherParams |
| instance of the UsherParams, stores all necessary parameters | |
Private Member Functions | |
| coupling::ParticleInsertion< LinkedCell, dim >::Action | insertParticle (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) |
| tries to insert a particle in the respective coupling cell. | |
| coupling::ParticleInsertion< LinkedCell, dim >::Action | deleteParticle (coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, const coupling::BoundaryForceController< LinkedCell, dim > &boundaryForceController) |
| tries to delete a particle from the coupling cell. | |
Additional Inherited Members | |
Public Types inherited from coupling::ParticleInsertion< LinkedCell, dim > | |
| enum | Action { NoAction = 0 , Insertion = 1 , Deletion = 2 } |
handles particle insertion (via Usher algorithm) and random particle deletion.
particles will be inserted or removed based on the microscopic mass of a cell The algorithm is only applied to outer boundary cells of the md (non ghost cells) We currently also allow particle insertion in energyy holes, i.e. for energy(particle)==0.0.
| LinkedCell | the LinkedCell class is given by the implementation of linked cells in the molecular dynamics simulation |
| dim | refers to the spacial dimension of the simulation, can be 1, 2, or 3 |
| coupling::UsherParticleInsertion< LinkedCell, dim >::UsherParticleInsertion | ( | unsigned int | insertDeleteMassEveryTimestep, |
| double | rSigmaCoeff, | ||
| double | meanPotentialEnergyFactor, | ||
| double | uOverlapCoeff, | ||
| double | stepRefCoeff, | ||
| unsigned int | iterMax, | ||
| unsigned int | restartMax, | ||
| double | tolerance, | ||
| double | offsetFromOuterBoundary, | ||
| coupling::interface::MDSolverInterface< LinkedCell, dim > *const | mdSolverInterface ) |
a simple constructor
| insertDeleteMassAtTimestep | the interval of time steps for the insertion/deletion of mass |
| rSigmaCoeff | coefficient to adapt r_sigma (see Usher algorithm for details,), r_sigma = sigma * rSigmaCoeff |
| meanPotentialEnergyFactor | scales for the U_0 value of the Usher algorithm |
| uOverlapCoeff | scales the overlap energy U_ovlp (refers to the Usher algorithm) |
| stepRefCoeff | the maximal displacment within the usher method |
| iterMax | maximal number of usher iterations per try |
| restartMax | maximal number of usher restarts |
| tolerance | sets the tolerance, between the reached energy level and the goal energy level |
| offsetFromOuterBoundary | offset of the md domain (difference between the left, lower, front corner to 0,0,0) |
| mdSolverInterface | interface for the md solver |
|
private |
tries to delete a particle from the coupling cell.
Returns Deletion on success and NoAction otherwise.
| cell | the coupling cell to check if an action is necessary |
| boundaryForceController | an instance of the boundary force controller in application |
|
protectedvirtual |
determines the position of a new particle within the coupling cell
the result is stored in the position entry of the molecule 'molecule'. The method returns Insertion if a position has been found and NoAction otherwise.
| thisCell | the coupling cell to check if an action is necessary |
| couplingCellPosition | the postion of the coupling cell |
| couplingCellSize | the size of the coupling cell per direction |
| molecule | the molecule which shall be inserted |
| boundaryForceController | an instance of the boundary force controller in application |
|
virtual |
checks if a particle needs to be inserted or deleted in a cell
the function checks for the value of the microscopic mass and calls upon this either the inserteParticle() er deleteParticle() method, or just returns without an action
| cell | the coupling cell to check if an action is necessary |
| couplingCellPosition | the postion of the coupling cell |
| couplingCellSize | the size of the coupling cell per direction |
| meanVelocity | the mean velocity of all particles in the cell |
| temperature | the temperature in the cell |
| boundaryForceController | an instance of the boundary force controller in application |
Implements coupling::ParticleInsertion< LinkedCell, dim >.
|
private |
tries to insert a particle in the respective coupling cell.
Returns Insertion on success and NoAction otherwise.
| cell | the coupling cell to check if an action is necessary |
| couplingCellPosition | the postion of the coupling cell |
| couplingCellSize | the size of the coupling cell per direction |
| meanVelocity | the mean velocity of all particles in the cell |
| temperature | the temperature in the cell |
| boundaryForceController | an instance of the boundary force controller in application |
|
inlinevirtual |
since the Usher algorithm requires the potential energy landscape, the function returns true
Implements coupling::ParticleInsertion< LinkedCell, dim >.