--- branches/development/src/parallel/ForceDecomposition.hpp 2011/02/04 20:04:56 1541 +++ branches/development/src/parallel/ForceDecomposition.hpp 2011/03/18 19:31:52 1544 @@ -43,15 +43,18 @@ #define PARALLEL_FORCEDECOMPOSITION_HPP #include "Parallel/Decomposition.hpp" -#include "Parallel/Communicator.hpp" #include "math/SquareMatrix3.hpp" +#ifdef IS_MPI +#include "Parallel/Communicator.hpp" +#endif + using namespace std; namespace OpenMD { class ForceDecomposition : public Decomposition { public: - ForceDecomposition(Snapshot* sman); + ForceDecomposition(SimInfo* info) : Decomposition(info) {sman_ = info_->getSnapshotManager();} void distributeInitialData(); void distributeData(); void collectIntermediateData(); @@ -67,24 +70,37 @@ namespace OpenMD { AtomType* getAtomTypeI(int whichAtomI); AtomType* getAtomTypeJ(int whichAtomJ); -#ifdef IS_MPI - + private: + SnapshotManager* sman_; +#ifdef IS_MPI + Communicator* AtomCommIntI; Communicator* AtomCommRealI; Communicator* AtomCommVectorI; Communicator* AtomCommMatrixI; + Communicator* AtomCommIntJ; Communicator* AtomCommRealJ; Communicator* AtomCommVectorJ; Communicator* AtomCommMatrixJ; + Communicator* cgCommIntI; Communicator* cgCommVectorI; + Communicator* cgCommIntJ; Communicator* cgCommVectorJ; - private: vector > pot_row; vector > pot_col; - vector > pot_local; + vector identRow; + vector identCol; + + vector AtomLocalToGlobal; + vector AtomRowToGlobal; + vector AtomColToGlobal; + vector cgLocalToGlobal; + vector cgRowToGlobal; + vector cgColToGlobal; #endif + vector pot_local; }; }