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

calculate pair forces and collect macroscopic values More...

#include <ParticlePairs2PotForceAdapter.h>

Inheritance diagram for ParticlePairs2PotForceAdapter:
ParticlePairsHandler

Classes

struct  PP2PFAThreadData
 

Public Member Functions

 ParticlePairs2PotForceAdapter (Domain &domain)
 Constructor.
 
 ~ParticlePairs2PotForceAdapter ()
 Destructor.
 
void init ()
 initialize macroscopic values More...
 
void finish ()
 calculate macroscopic values More...
 
double processPair (Molecule &molecule1, Molecule &molecule2, double distanceVector[3], PairType pairType, double dd, bool calculateLJ=true)
 
- Public Member Functions inherited from ParticlePairsHandler
 ParticlePairsHandler ()
 Constructor.
 
virtual ~ParticlePairsHandler ()
 Destructor.
 

Public Attributes

std::vector< PP2PFAThreadData * > _threadData
 

Detailed Description

calculate pair forces and collect macroscopic values

Author
Martin Bernreuther bernr.nosp@m.euth.nosp@m.er@hl.nosp@m.rs.d.nosp@m.e et al. (2010)

used to calculate the force between all pairs and sum up macroscopic values (e.g. Upot) The idea is, that after the call of init(), processPair(...) is called for all particle pairs in the datastructure. processPair(...) calculates the interaction of the two particles and collects macroscopic values in local member variables. At the end (all pairs have been processed), finish() is called, which stores the macroscopic values in _domain.

Member Function Documentation

◆ finish()

void ParticlePairs2PotForceAdapter::finish ( )
inlinevirtual

calculate macroscopic values

After all pairs have been processes, Upot and Virial can be calculated and stored in _domain

Implements ParticlePairsHandler.

◆ init()

void ParticlePairs2PotForceAdapter::init ( )
inlinevirtual

initialize macroscopic values

each pair contributes to the macroscopic values (potential energy,...) All those values are initialized with zero, and then for each pair, they are increased by the pairs contribution

Implements ParticlePairsHandler.

◆ processPair()

double ParticlePairs2PotForceAdapter::processPair ( Molecule molecule1,
Molecule molecule2,
double  distanceVector[3],
PairType  pairType,
double  dd,
bool  calculateLJ = true 
)
inlinevirtual

calculate force between pairs and collect macroscopic contribution

For all pairs, the force between the two Molecules has to be calculated and stored in the molecules. For original pairs(pairType 0), the contributions to the macroscopic values have to be collected

Parameters
molecule1molecule 1
molecule2molecule 2
distanceVectordistance vector from molecule 2 to molecule 1
pairTypemolecule pair type (see PairType)
ddsquare of the distance between the two molecules
calculateLJtrue if we shall calculate the LJ interaction, otherwise false (default true)
Returns
interaction energy

Implements ParticlePairsHandler.


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