OpenMD 3.1
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
OpenMD::ForceDecomposition Class Referenceabstract

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

#include <ForceDecomposition.hpp>

+ Inheritance diagram for OpenMD::ForceDecomposition:

Public Member Functions

 ForceDecomposition (SimInfo *info, InteractionManager *iMan)
 
virtual void setSnapshot (Snapshot *snap)
 
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 potVec getSelfPotential ()
 
virtual potVec getPairwisePotential ()
 
virtual potVec getExcludedPotential ()
 
virtual potVec getSelectedPotential ()
 
virtual potVec getExcludedSelfPotential ()
 
virtual potVec getSelectedSelfPotential ()
 
virtual bool checkNeighborList (vector< Vector3d > savedPositions)
 
virtual void buildNeighborList (vector< int > &neighborList, vector< int > &point, vector< Vector3d > &savedPositions)=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 unpackPrePairData (InteractionData &idat, int atom1, int atom2)=0
 
virtual void unpackInteractionData (InteractionData &idat, int atom1, int atom2)=0
 
virtual void fillSelfData (SelfData &sdat, int atom)
 
virtual void unpackSelfData (SelfData &sdat, int atom)
 
virtual void fillPreForceData (SelfData &sdat, int atom)
 
virtual void unpackPreForceData (SelfData &sdat, int atom)
 
virtual void addToHeatFlux (Vector3d hf)
 
virtual void setHeatFlux (Vector3d hf)
 

Protected Attributes

SimInfoinfo_ {nullptr}
 
SnapshotManagersman_
 
Snapshotsnap_
 
ForceFieldff_
 
InteractionManagerinteractionMan_
 
int atomStorageLayout_
 
int rigidBodyStorageLayout_
 
int cutoffGroupStorageLayout_
 
bool needVelocities_
 
bool usePeriodicBoundaryConditions_
 
RealType skinThickness_
 Verlet neighbor list skin thickness.
 
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
 The topological distance between two atomic sites is handled via two vector structures for speed.
 
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_
 

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 94 of file ForceDecomposition.hpp.

Constructor & Destructor Documentation

◆ ForceDecomposition()

OpenMD::ForceDecomposition::ForceDecomposition ( SimInfo * info,
InteractionManager * iMan )

Definition at line 56 of file ForceDecomposition.cpp.

◆ ~ForceDecomposition()

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

Definition at line 97 of file ForceDecomposition.hpp.

Member Function Documentation

◆ addToHeatFlux()

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

Definition at line 204 of file ForceDecomposition.cpp.

◆ checkNeighborList()

bool OpenMD::ForceDecomposition::checkNeighborList ( vector< Vector3d > savedPositions)
virtual

Definition at line 176 of file ForceDecomposition.cpp.

◆ collectSelfData()

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

◆ distributeInitialData()

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

◆ excludeAtomPair()

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

◆ fillPreForceData()

void OpenMD::ForceDecomposition::fillPreForceData ( SelfData & sdat,
int atom )
virtual

Definition at line 113 of file ForceDecomposition.cpp.

◆ fillSelfData()

void OpenMD::ForceDecomposition::fillSelfData ( SelfData & sdat,
int atom )
virtual

Definition at line 127 of file ForceDecomposition.cpp.

◆ getAtomsInGroupRow()

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

◆ getExcludedPotential()

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

Definition at line 110 of file ForceDecomposition.hpp.

◆ getExcludedSelfPotential()

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

Definition at line 112 of file ForceDecomposition.hpp.

◆ getPairwisePotential()

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

Definition at line 109 of file ForceDecomposition.hpp.

◆ getSelectedPotential()

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

Definition at line 111 of file ForceDecomposition.hpp.

◆ getSelectedSelfPotential()

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

Definition at line 113 of file ForceDecomposition.hpp.

◆ getSelfPotential()

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

Definition at line 108 of file ForceDecomposition.hpp.

◆ setCutoffRadius()

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

Definition at line 107 of file ForceDecomposition.cpp.

◆ setHeatFlux()

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

Definition at line 209 of file ForceDecomposition.cpp.

◆ setSnapshot()

virtual void OpenMD::ForceDecomposition::setSnapshot ( Snapshot * snap)
inlinevirtual

Definition at line 99 of file ForceDecomposition.hpp.

◆ skipAtomPair()

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

◆ unpackPreForceData()

void OpenMD::ForceDecomposition::unpackPreForceData ( SelfData & sdat,
int atom )
virtual

Definition at line 149 of file ForceDecomposition.cpp.

◆ unpackSelfData()

void OpenMD::ForceDecomposition::unpackSelfData ( SelfData & sdat,
int atom )
virtual

Definition at line 167 of file ForceDecomposition.cpp.

Member Data Documentation

◆ atomStorageLayout_

int OpenMD::ForceDecomposition::atomStorageLayout_
protected

Definition at line 178 of file ForceDecomposition.hpp.

◆ atypesLocal

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

Definition at line 210 of file ForceDecomposition.hpp.

◆ cellList_

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

Definition at line 214 of file ForceDecomposition.hpp.

◆ cellOffsets_

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

Definition at line 212 of file ForceDecomposition.hpp.

◆ cutoffGroupStorageLayout_

int OpenMD::ForceDecomposition::cutoffGroupStorageLayout_
protected

Definition at line 180 of file ForceDecomposition.hpp.

◆ excludedPot

potVec OpenMD::ForceDecomposition::excludedPot
protected

Definition at line 192 of file ForceDecomposition.hpp.

◆ excludedSelfPot

potVec OpenMD::ForceDecomposition::excludedSelfPot
protected

Definition at line 193 of file ForceDecomposition.hpp.

◆ excludesForAtom

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

Definition at line 207 of file ForceDecomposition.hpp.

◆ ff_

ForceField* OpenMD::ForceDecomposition::ff_
protected

Definition at line 175 of file ForceDecomposition.hpp.

◆ groupList_

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

Definition at line 208 of file ForceDecomposition.hpp.

◆ idents

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

Definition at line 188 of file ForceDecomposition.hpp.

◆ info_

SimInfo* OpenMD::ForceDecomposition::info_ {nullptr}
protected

Definition at line 172 of file ForceDecomposition.hpp.

◆ interactionMan_

InteractionManager* OpenMD::ForceDecomposition::interactionMan_
protected

Definition at line 176 of file ForceDecomposition.hpp.

◆ massFactors

vector<RealType> OpenMD::ForceDecomposition::massFactors
protected

Definition at line 209 of file ForceDecomposition.hpp.

◆ nCells_

Vector3i OpenMD::ForceDecomposition::nCells_
protected

Definition at line 213 of file ForceDecomposition.hpp.

◆ needVelocities_

bool OpenMD::ForceDecomposition::needVelocities_
protected

Definition at line 181 of file ForceDecomposition.hpp.

◆ pairwisePot

potVec OpenMD::ForceDecomposition::pairwisePot
protected

Definition at line 190 of file ForceDecomposition.hpp.

◆ rCut_

RealType OpenMD::ForceDecomposition::rCut_
protected

Definition at line 184 of file ForceDecomposition.hpp.

◆ regions

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

Definition at line 189 of file ForceDecomposition.hpp.

◆ rigidBodyStorageLayout_

int OpenMD::ForceDecomposition::rigidBodyStorageLayout_
protected

Definition at line 179 of file ForceDecomposition.hpp.

◆ rList_

RealType OpenMD::ForceDecomposition::rList_
protected

Definition at line 185 of file ForceDecomposition.hpp.

◆ rListSq_

RealType OpenMD::ForceDecomposition::rListSq_
protected

Definition at line 186 of file ForceDecomposition.hpp.

◆ selectedPot

potVec OpenMD::ForceDecomposition::selectedPot
protected

Definition at line 194 of file ForceDecomposition.hpp.

◆ selectedSelfPot

potVec OpenMD::ForceDecomposition::selectedSelfPot
protected

Definition at line 195 of file ForceDecomposition.hpp.

◆ selfPot

potVec OpenMD::ForceDecomposition::selfPot
protected

Definition at line 191 of file ForceDecomposition.hpp.

◆ skinThickness_

RealType OpenMD::ForceDecomposition::skinThickness_
protected

Verlet neighbor list skin thickness.

Definition at line 183 of file ForceDecomposition.hpp.

◆ sman_

SnapshotManager* OpenMD::ForceDecomposition::sman_
protected

Definition at line 173 of file ForceDecomposition.hpp.

◆ snap_

Snapshot* OpenMD::ForceDecomposition::snap_
protected

Definition at line 174 of file ForceDecomposition.hpp.

◆ topoDist

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

Definition at line 206 of file ForceDecomposition.hpp.

◆ 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 205 of file ForceDecomposition.hpp.

Referenced by OpenMD::ForceMatrixDecomposition::distributeInitialData().

◆ usePeriodicBoundaryConditions_

bool OpenMD::ForceDecomposition::usePeriodicBoundaryConditions_
protected

Definition at line 182 of file ForceDecomposition.hpp.


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