| 43 |  | #define PARALLEL_FORCEDECOMPOSITION_HPP | 
| 44 |  |  | 
| 45 |  | #include "Parallel/Decomposition.hpp" | 
| 46 | – | #include "Parallel/Communicator.hpp" | 
| 46 |  | #include "math/SquareMatrix3.hpp" | 
| 47 |  |  | 
| 48 | + | #ifdef IS_MPI | 
| 49 | + | #include "Parallel/Communicator.hpp" | 
| 50 | + | #endif | 
| 51 | + |  | 
| 52 |  | using namespace std; | 
| 53 |  | namespace OpenMD { | 
| 54 |  |  | 
| 55 |  | class ForceDecomposition : public Decomposition { | 
| 56 |  | public: | 
| 57 | < | ForceDecomposition(Snapshot* sman); | 
| 57 | > | ForceDecomposition(SimInfo* info) : Decomposition(info) {sman_ = info_->getSnapshotManager();} | 
| 58 |  | void distributeInitialData(); | 
| 59 |  | void distributeData(); | 
| 60 |  | void collectIntermediateData(); | 
| 70 |  | AtomType* getAtomTypeI(int whichAtomI); | 
| 71 |  | AtomType* getAtomTypeJ(int whichAtomJ); | 
| 72 |  |  | 
| 73 | < | #ifdef IS_MPI | 
| 74 | < |  | 
| 73 | > | private: | 
| 74 | > | SnapshotManager* sman_; | 
| 75 | > | #ifdef IS_MPI | 
| 76 | > | Communicator<Row, int>* AtomCommIntI; | 
| 77 |  | Communicator<Row, RealType>* AtomCommRealI; | 
| 78 |  | Communicator<Row, Vector3d>* AtomCommVectorI; | 
| 79 |  | Communicator<Row, Mat3x3d>*  AtomCommMatrixI; | 
| 80 |  |  | 
| 81 | + | Communicator<Column, int>* AtomCommIntJ; | 
| 82 |  | Communicator<Column, RealType>* AtomCommRealJ; | 
| 83 |  | Communicator<Column, Vector3d>* AtomCommVectorJ; | 
| 84 |  | Communicator<Column, Mat3x3d>*  AtomCommMatrixJ; | 
| 85 |  |  | 
| 86 | + | Communicator<Row, int>* cgCommIntI; | 
| 87 |  | Communicator<Row, Vector3d>* cgCommVectorI; | 
| 88 | + | Communicator<Column, int>* cgCommIntJ; | 
| 89 |  | Communicator<Column, Vector3d>* cgCommVectorJ; | 
| 90 |  |  | 
| 83 | – | private: | 
| 91 |  | vector<vector<RealType> > pot_row; | 
| 92 |  | vector<vector<RealType> > pot_col; | 
| 93 | < | vector<vector<RealType> > pot_local; | 
| 93 | > | vector<int> identsRow; | 
| 94 | > | vector<int> identsCol; | 
| 95 | > |  | 
| 96 | > | vector<int> AtomLocalToGlobal; | 
| 97 | > | vector<int> AtomRowToGlobal; | 
| 98 | > | vector<int> AtomColToGlobal; | 
| 99 | > | vector<int> cgLocalToGlobal; | 
| 100 | > | vector<int> cgRowToGlobal; | 
| 101 | > | vector<int> cgColToGlobal; | 
| 102 |  | #endif | 
| 103 | + | vector<RealType> pot_local; | 
| 104 |  | }; | 
| 105 |  |  | 
| 106 |  | } |