ls1-MarDyn
ls1-MarDyn molecular dynamics code
|
calculate pair forces and collect macroscopic values More...
#include <ParticlePairs2PotForceAdapter.h>
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) |
![]() | |
ParticlePairsHandler () | |
Constructor. | |
virtual | ~ParticlePairsHandler () |
Destructor. | |
Public Attributes | |
std::vector< PP2PFAThreadData * > | _threadData |
calculate pair forces and collect macroscopic values
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.
|
inlinevirtual |
calculate macroscopic values
After all pairs have been processes, Upot and Virial can be calculated and stored in _domain
Implements ParticlePairsHandler.
|
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.
|
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
molecule1 | molecule 1 |
molecule2 | molecule 2 |
distanceVector | distance vector from molecule 2 to molecule 1 |
pairType | molecule pair type (see PairType) |
dd | square of the distance between the two molecules |
calculateLJ | true if we shall calculate the LJ interaction, otherwise false (default true) |
Implements ParticlePairsHandler.