# | Line 43 | Line 43 | |
---|---|---|
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(); | |
# | Line 66 | Line 70 | namespace OpenMD { | |
70 | AtomType* getAtomTypeI(int whichAtomI); | |
71 | AtomType* getAtomTypeJ(int whichAtomJ); | |
72 | ||
73 | < | #ifdef IS_MPI |
74 | < | |
75 | < | Comm<I, RealType>* AtomCommRealI; |
76 | < | Comm<I, Vector3d>* AtomCommVectorI; |
77 | < | Comm<I, Mat3x3d>* AtomCommMatrixI; |
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 | < | Comm<J, RealType>* AtomCommRealJ; |
82 | < | Comm<J, Vector3d>* AtomCommVectorJ; |
83 | < | Comm<J, Mat3x3d>* AtomCommMatrixJ; |
81 | > | Communicator<Column, int>* AtomCommIntJ; |
82 | > | Communicator<Column, RealType>* AtomCommRealJ; |
83 | > | Communicator<Column, Vector3d>* AtomCommVectorJ; |
84 | > | Communicator<Column, Mat3x3d>* AtomCommMatrixJ; |
85 | ||
86 | < | Comm<I, Vector3d>* cgCommVectorI; |
87 | < | Comm<J, Vector3d>* cgCommVectorJ; |
88 | < | |
86 | > | Communicator<Row, int>* cgCommIntI; |
87 | > | Communicator<Row, Vector3d>* cgCommVectorI; |
88 | > | Communicator<Column, int>* cgCommIntJ; |
89 | > | Communicator<Column, Vector3d>* cgCommVectorJ; |
90 | > | |
91 | > | vector<vector<RealType> > pot_row; |
92 | > | vector<vector<RealType> > pot_col; |
93 | > | vector<int> identRow; |
94 | > | vector<int> identCol; |
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 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |