--- branches/development/src/parallel/ForceMatrixDecomposition.hpp 2011/04/27 18:38:15 1549 +++ branches/development/src/parallel/ForceMatrixDecomposition.hpp 2011/05/26 21:56:04 1570 @@ -42,11 +42,12 @@ #ifndef PARALLEL_FORCEMATRIXDECOMPOSITION_HPP #define PARALLEL_FORCEMATRIXDECOMPOSITION_HPP -#include "Parallel/ForceDecomposition.hpp" +#include "parallel/ForceDecomposition.hpp" #include "math/SquareMatrix3.hpp" +#include "brains/Snapshot.hpp" #ifdef IS_MPI -#include "Parallel/Communicator.hpp" +#include "parallel/Communicator.hpp" #endif using namespace std; @@ -54,7 +55,8 @@ namespace OpenMD { class ForceMatrixDecomposition : public ForceDecomposition { public: - ForceMatrixDecomposition(SimInfo* info) : ForceDecomposition(info) {sman_ = info_->getSnapshotManager();} + ForceMatrixDecomposition(SimInfo* info) : ForceDecomposition(info) {}; + void distributeInitialData(); void distributeData(); void collectIntermediateData(); @@ -62,7 +64,6 @@ namespace OpenMD { void collectData(); // neighbor list routines - bool checkNeighborList(); vector > buildNeighborList(); // group bookkeeping @@ -73,16 +74,17 @@ namespace OpenMD { vector getAtomsInGroupColumn(int cg2); Vector3d getAtomToGroupVectorRow(int atom1, int cg1); Vector3d getAtomToGroupVectorColumn(int atom2, int cg2); - RealType getMfactRow(int atom1); - RealType getMfactColumn(int atom2); + RealType getMassFactorRow(int atom1); + RealType getMassFactorColumn(int atom2); // spatial data Vector3d getIntergroupVector(int cg1, int cg2); Vector3d getInteratomicVector(int atom1, int atom2); // atom bookkeeping - vector getAtomList(); - vector getSkipsForAtom(int atom1); + int getNAtomsInRow(); + vector getSkipsForRowAtom(int atom1); + int getTopoDistance(int atom1, int atom2); bool skipAtomPair(int atom1, int atom2); void addForceToAtomRow(int atom1, Vector3d fg); void addForceToAtomColumn(int atom2, Vector3d fg); @@ -90,11 +92,29 @@ namespace OpenMD { // filling interaction blocks with pointers InteractionData fillInteractionData(int atom1, int atom2); InteractionData fillSkipData(int atom1, int atom2); - SelfData fillSelfData(int atom1); private: - SnapshotManager* sman_; + int nLocal_; + int nGroups_; + vector AtomLocalToGlobal; + vector cgLocalToGlobal; + vector pot_local; + vector massFactorsLocal; + vector > skipsForLocalAtom; + vector > toposForLocalAtom; + vector > topoDistLocal; + #ifdef IS_MPI + DataStorage atomRowData; + DataStorage atomColData; + DataStorage cgRowData; + DataStorage cgColData; + + int nAtomsInRow_; + int nAtomsInCol_; + int nGroupsInRow_; + int nGroupsInCol_; + Communicator* AtomCommIntRow; Communicator* AtomCommRealRow; Communicator* AtomCommVectorRow; @@ -112,17 +132,32 @@ namespace OpenMD { vector > pot_row; vector > pot_col; + vector identsRow; vector identsCol; - vector AtomLocalToGlobal; vector AtomRowToGlobal; vector AtomColToGlobal; - vector cgLocalToGlobal; + vector cgRowToGlobal; vector cgColToGlobal; + + vector > cellListRow_; + vector > cellListCol_; + + vector > groupListRow_; + vector > groupListCol_; + + vector massFactorsRow; + vector massFactorsCol; + + vector > skipsForRowAtom; + vector > toposForRowAtom; + vector > topoDistRow; + + #endif - vector pot_local; + }; }