--- branches/development/src/parallel/ForceMatrixDecomposition.hpp 2011/04/27 18:38:15 1549 +++ branches/development/src/parallel/ForceMatrixDecomposition.hpp 2011/05/26 13:55:04 1569 @@ -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,8 +74,8 @@ 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); @@ -90,11 +91,26 @@ 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; + #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 +128,27 @@ 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; + #endif - vector pot_local; + }; }