--- branches/development/src/parallel/ForceDecomposition.hpp 2011/01/17 21:34:36 1540 +++ branches/development/src/parallel/ForceDecomposition.hpp 2011/03/18 19:31:52 1544 @@ -43,14 +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(); @@ -66,20 +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; - + + vector > pot_row; + vector > pot_col; + vector identRow; + vector identCol; + + vector AtomLocalToGlobal; + vector AtomRowToGlobal; + vector AtomColToGlobal; + vector cgLocalToGlobal; + vector cgRowToGlobal; + vector cgColToGlobal; #endif + vector pot_local; }; }