OpenMD  2.5
Molecular Dynamics in the Open
OpenMD::ForceDecomposition Class Referenceabstract

#include <ForceDecomposition.hpp>

Inheritance diagram for OpenMD::ForceDecomposition:
OpenMD::ForceMatrixDecomposition

Public Member Functions

 ForceDecomposition (SimInfo *info, InteractionManager *iMan)
 
virtual ~ForceDecomposition ()
 
virtual void distributeInitialData ()=0
 
virtual void distributeData ()=0
 
virtual void zeroWorkArrays ()=0
 
virtual void collectIntermediateData ()=0
 
virtual void distributeIntermediateData ()=0
 
virtual void collectData ()=0
 
virtual void collectSelfData ()=0
 
virtual potVecgetSelfPotential ()
 
virtual potVecgetPairwisePotential ()
 
virtual potVecgetExcludedPotential ()
 
virtual potVecgetSelectedPotential ()
 
virtual potVecgetExcludedSelfPotential ()
 
virtual potVecgetSelectedSelfPotential ()
 
virtual bool checkNeighborList ()
 
virtual void buildNeighborList (vector< int > &neighborList, vector< int > &point)=0
 
void setCutoffRadius (RealType rCut)
 
virtual Vector3dgetGroupVelocityColumn (int atom2)=0
 
virtual vector< int > & getAtomsInGroupRow (int cg1)=0
 
virtual vector< int > & getAtomsInGroupColumn (int cg2)=0
 
virtual Vector3d getAtomToGroupVectorRow (int atom1, int cg1)=0
 
virtual Vector3d getAtomToGroupVectorColumn (int atom2, int cg2)=0
 
virtual RealType & getMassFactorRow (int atom1)=0
 
virtual RealType & getMassFactorColumn (int atom2)=0
 
virtual Vector3d getIntergroupVector (int cg1, int cg2)=0
 
virtual Vector3d getInteratomicVector (int atom1, int atom2)=0
 
virtual int & getNAtomsInRow ()=0
 
virtual vector< int > & getExcludesForAtom (int atom1)=0
 
virtual bool skipAtomPair (int atom1, int atom2, int cg1, int cg2)=0
 
virtual bool excludeAtomPair (int atom1, int atom2)=0
 
virtual int getGlobalIDRow (int atom1)=0
 
virtual int getGlobalIDCol (int atom2)=0
 
virtual int getGlobalID (int atom1)=0
 
virtual int getTopologicalDistance (int atom1, int atom2)=0
 
virtual void addForceToAtomRow (int atom1, Vector3d fg)=0
 
virtual void addForceToAtomColumn (int atom2, Vector3d fg)=0
 
virtual Vector3dgetAtomVelocityColumn (int atom2)=0
 
virtual void fillInteractionData (InteractionData &idat, int atom1, int atom2, bool newAtom1=true)=0
 
virtual void unpackInteractionData (InteractionData &idat, int atom1, int atom2)=0
 
virtual void fillSelfData (SelfData &sdat, int atom1)
 
virtual void addToHeatFlux (Vector3d hf)
 
virtual void setHeatFlux (Vector3d hf)
 

Protected Attributes

SimInfoinfo_
 
SnapshotManagersman_
 
Snapshotsnap_
 
ForceFieldff_
 
InteractionManagerinteractionMan_
 
int storageLayout_
 
bool needVelocities_
 
bool usePeriodicBoundaryConditions_
 
RealType skinThickness_
 
RealType rCut_
 
RealType rList_
 
RealType rListSq_
 
vector< int > idents
 
vector< int > regions
 
potVec pairwisePot
 
potVec selfPot
 
potVec excludedPot
 
potVec excludedSelfPot
 
potVec selectedPot
 
potVec selectedSelfPot
 
vector< vector< int > > toposForAtom
 
vector< vector< int > > topoDist
 
vector< vector< int > > excludesForAtom
 
vector< vector< int > > groupList_
 
vector< RealType > massFactors
 
vector< AtomType * > atypesLocal
 
vector< Vector3icellOffsets_
 
Vector3i nCells_
 
vector< vector< int > > cellList_
 
vector< Vector3dsaved_CG_positions_
 

Detailed Description

ForceDecomposition is an interface for passing out and collecting information from many processors at various stages of the main non-bonded ForceLoop.

The pairwise force calculation has an outer-running loop (the "I" loop) and an inner-running loop (the "J" loop). In parallel decompositions, these loop over different groups of atoms on different processors. Between each set of computations on the local processor, data must be exchanged among the processors. This can happen at different times in the calculation:

distributeInitialData (parallel communication - one time only) distributeData (parallel communication - every ForceLoop)

loop iLoop over nLoops (nLoops may be 1, 2, or until self consistent) | loop over i | | loop over j | | | localComputation | | end | end | if (nLoops > 1): | | collectIntermediateData (parallel communication) | | distributeIntermediateData (parallel communication) | endif end collectData (parallel communication) loop over i | localComputation end collectSelfData (parallel communication)

ForceDecomposition provides the interface for ForceLoop to do the communication steps and to iterate using the correct set of atoms and cutoff groups.

Definition at line 93 of file ForceDecomposition.hpp.

Constructor & Destructor Documentation

◆ ForceDecomposition()

◆ ~ForceDecomposition()

virtual OpenMD::ForceDecomposition::~ForceDecomposition ( )
inlinevirtual

Definition at line 97 of file ForceDecomposition.hpp.

Member Function Documentation

◆ addForceToAtomColumn()

virtual void OpenMD::ForceDecomposition::addForceToAtomColumn ( int  atom2,
Vector3d  fg 
)
pure virtual

◆ addForceToAtomRow()

virtual void OpenMD::ForceDecomposition::addForceToAtomRow ( int  atom1,
Vector3d  fg 
)
pure virtual

◆ addToHeatFlux()

void OpenMD::ForceDecomposition::addToHeatFlux ( Vector3d  hf)
virtual

◆ buildNeighborList()

virtual void OpenMD::ForceDecomposition::buildNeighborList ( vector< int > &  neighborList,
vector< int > &  point 
)
pure virtual

◆ checkNeighborList()

◆ collectData()

virtual void OpenMD::ForceDecomposition::collectData ( )
pure virtual

◆ collectIntermediateData()

virtual void OpenMD::ForceDecomposition::collectIntermediateData ( )
pure virtual

◆ collectSelfData()

virtual void OpenMD::ForceDecomposition::collectSelfData ( )
pure virtual

◆ distributeData()

virtual void OpenMD::ForceDecomposition::distributeData ( )
pure virtual

◆ distributeInitialData()

virtual void OpenMD::ForceDecomposition::distributeInitialData ( )
pure virtual

◆ distributeIntermediateData()

virtual void OpenMD::ForceDecomposition::distributeIntermediateData ( )
pure virtual

◆ excludeAtomPair()

virtual bool OpenMD::ForceDecomposition::excludeAtomPair ( int  atom1,
int  atom2 
)
pure virtual

◆ fillInteractionData()

virtual void OpenMD::ForceDecomposition::fillInteractionData ( InteractionData idat,
int  atom1,
int  atom2,
bool  newAtom1 = true 
)
pure virtual

◆ fillSelfData()

◆ getAtomsInGroupColumn()

virtual vector<int>& OpenMD::ForceDecomposition::getAtomsInGroupColumn ( int  cg2)
pure virtual

◆ getAtomsInGroupRow()

virtual vector<int>& OpenMD::ForceDecomposition::getAtomsInGroupRow ( int  cg1)
pure virtual

◆ getAtomToGroupVectorColumn()

virtual Vector3d OpenMD::ForceDecomposition::getAtomToGroupVectorColumn ( int  atom2,
int  cg2 
)
pure virtual

◆ getAtomToGroupVectorRow()

virtual Vector3d OpenMD::ForceDecomposition::getAtomToGroupVectorRow ( int  atom1,
int  cg1 
)
pure virtual

◆ getAtomVelocityColumn()

virtual Vector3d& OpenMD::ForceDecomposition::getAtomVelocityColumn ( int  atom2)
pure virtual

◆ getExcludedPotential()

virtual potVec* OpenMD::ForceDecomposition::getExcludedPotential ( )
inlinevirtual

Definition at line 108 of file ForceDecomposition.hpp.

Referenced by OpenMD::ForceManager::longRangeInteractions().

◆ getExcludedSelfPotential()

virtual potVec* OpenMD::ForceDecomposition::getExcludedSelfPotential ( )
inlinevirtual

Definition at line 110 of file ForceDecomposition.hpp.

Referenced by OpenMD::ForceManager::longRangeInteractions().

◆ getExcludesForAtom()

virtual vector<int>& OpenMD::ForceDecomposition::getExcludesForAtom ( int  atom1)
pure virtual

◆ getGlobalID()

virtual int OpenMD::ForceDecomposition::getGlobalID ( int  atom1)
pure virtual

◆ getGlobalIDCol()

virtual int OpenMD::ForceDecomposition::getGlobalIDCol ( int  atom2)
pure virtual

◆ getGlobalIDRow()

virtual int OpenMD::ForceDecomposition::getGlobalIDRow ( int  atom1)
pure virtual

◆ getGroupVelocityColumn()

virtual Vector3d& OpenMD::ForceDecomposition::getGroupVelocityColumn ( int  atom2)
pure virtual

◆ getInteratomicVector()

virtual Vector3d OpenMD::ForceDecomposition::getInteratomicVector ( int  atom1,
int  atom2 
)
pure virtual

◆ getIntergroupVector()

virtual Vector3d OpenMD::ForceDecomposition::getIntergroupVector ( int  cg1,
int  cg2 
)
pure virtual

◆ getMassFactorColumn()

virtual RealType& OpenMD::ForceDecomposition::getMassFactorColumn ( int  atom2)
pure virtual

◆ getMassFactorRow()

virtual RealType& OpenMD::ForceDecomposition::getMassFactorRow ( int  atom1)
pure virtual

◆ getNAtomsInRow()

virtual int& OpenMD::ForceDecomposition::getNAtomsInRow ( )
pure virtual

◆ getPairwisePotential()

virtual potVec* OpenMD::ForceDecomposition::getPairwisePotential ( )
inlinevirtual

Definition at line 107 of file ForceDecomposition.hpp.

Referenced by OpenMD::ForceManager::longRangeInteractions().

◆ getSelectedPotential()

virtual potVec* OpenMD::ForceDecomposition::getSelectedPotential ( )
inlinevirtual

Definition at line 109 of file ForceDecomposition.hpp.

Referenced by OpenMD::ForceManager::longRangeInteractions().

◆ getSelectedSelfPotential()

virtual potVec* OpenMD::ForceDecomposition::getSelectedSelfPotential ( )
inlinevirtual

Definition at line 111 of file ForceDecomposition.hpp.

Referenced by OpenMD::ForceManager::longRangeInteractions().

◆ getSelfPotential()

virtual potVec* OpenMD::ForceDecomposition::getSelfPotential ( )
inlinevirtual

Definition at line 106 of file ForceDecomposition.hpp.

Referenced by OpenMD::ForceManager::longRangeInteractions().

◆ getTopologicalDistance()

virtual int OpenMD::ForceDecomposition::getTopologicalDistance ( int  atom1,
int  atom2 
)
pure virtual

◆ setCutoffRadius()

void OpenMD::ForceDecomposition::setCutoffRadius ( RealType  rCut)

Definition at line 100 of file ForceDecomposition.cpp.

References rCut_, rList_, rListSq_, and skinThickness_.

Referenced by OpenMD::ForceManager::setupCutoffs().

◆ setHeatFlux()

void OpenMD::ForceDecomposition::setHeatFlux ( Vector3d  hf)
virtual

◆ skipAtomPair()

virtual bool OpenMD::ForceDecomposition::skipAtomPair ( int  atom1,
int  atom2,
int  cg1,
int  cg2 
)
pure virtual

◆ unpackInteractionData()

virtual void OpenMD::ForceDecomposition::unpackInteractionData ( InteractionData idat,
int  atom1,
int  atom2 
)
pure virtual

◆ zeroWorkArrays()

virtual void OpenMD::ForceDecomposition::zeroWorkArrays ( )
pure virtual

Member Data Documentation

◆ atypesLocal

vector<AtomType*> OpenMD::ForceDecomposition::atypesLocal
protected

◆ cellList_

vector<vector<int> > OpenMD::ForceDecomposition::cellList_
protected

◆ cellOffsets_

vector<Vector3i> OpenMD::ForceDecomposition::cellOffsets_
protected

◆ excludedPot

◆ excludedSelfPot

potVec OpenMD::ForceDecomposition::excludedSelfPot
protected

◆ excludesForAtom

vector<vector<int> > OpenMD::ForceDecomposition::excludesForAtom
protected

◆ ff_

ForceField* OpenMD::ForceDecomposition::ff_
protected

◆ groupList_

◆ idents

vector<int> OpenMD::ForceDecomposition::idents
protected

◆ info_

◆ interactionMan_

InteractionManager* OpenMD::ForceDecomposition::interactionMan_
protected

Definition at line 163 of file ForceDecomposition.hpp.

◆ massFactors

◆ nCells_

Vector3i OpenMD::ForceDecomposition::nCells_
protected

◆ needVelocities_

bool OpenMD::ForceDecomposition::needVelocities_
protected

◆ pairwisePot

◆ rCut_

RealType OpenMD::ForceDecomposition::rCut_
protected

Definition at line 169 of file ForceDecomposition.hpp.

Referenced by setCutoffRadius().

◆ regions

vector<int> OpenMD::ForceDecomposition::regions
protected

◆ rList_

RealType OpenMD::ForceDecomposition::rList_
protected

◆ rListSq_

RealType OpenMD::ForceDecomposition::rListSq_
protected

◆ saved_CG_positions_

vector<Vector3d> OpenMD::ForceDecomposition::saved_CG_positions_
protected

◆ selectedPot

◆ selectedSelfPot

potVec OpenMD::ForceDecomposition::selectedSelfPot
protected

◆ selfPot

potVec OpenMD::ForceDecomposition::selfPot
protected

◆ skinThickness_

RealType OpenMD::ForceDecomposition::skinThickness_
protected

Verlet neighbor list skin thickness

Definition at line 168 of file ForceDecomposition.hpp.

Referenced by checkNeighborList(), ForceDecomposition(), and setCutoffRadius().

◆ sman_

◆ snap_

◆ storageLayout_

◆ topoDist

vector<vector<int> > OpenMD::ForceDecomposition::topoDist
protected

◆ toposForAtom

vector<vector<int> > OpenMD::ForceDecomposition::toposForAtom
protected

The topological distance between two atomic sites is handled via two vector structures for speed. These structures agnostic regarding the parallel decomposition. The index for toposForAtom could be local or row, while the values could be local or column. It will be up to the specific decomposition method to fill these.

Definition at line 191 of file ForceDecomposition.hpp.

Referenced by OpenMD::ForceMatrixDecomposition::distributeInitialData(), and OpenMD::ForceMatrixDecomposition::getTopologicalDistance().

◆ usePeriodicBoundaryConditions_


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