ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/parallel/ForceMatrixDecomposition.hpp
(Generate patch)

Comparing:
branches/development/src/parallel/ForceDecomposition.hpp (file contents), Revision 1544 by gezelter, Fri Mar 18 19:31:52 2011 UTC vs.
branches/development/src/parallel/ForceMatrixDecomposition.hpp (file contents), Revision 1551 by gezelter, Thu Apr 28 18:38:21 2011 UTC

# Line 39 | Line 39
39   * [4]  Vardeman & Gezelter, in progress (2009).                        
40   */
41  
42 < #ifndef PARALLEL_FORCEDECOMPOSITION_HPP
43 < #define PARALLEL_FORCEDECOMPOSITION_HPP
42 > #ifndef PARALLEL_FORCEMATRIXDECOMPOSITION_HPP
43 > #define PARALLEL_FORCEMATRIXDECOMPOSITION_HPP
44  
45 < #include "Parallel/Decomposition.hpp"
45 > #include "Parallel/ForceDecomposition.hpp"
46   #include "math/SquareMatrix3.hpp"
47 + #include "brains/Snapshot.hpp"
48  
49   #ifdef IS_MPI
50   #include "Parallel/Communicator.hpp"
# Line 52 | Line 53 | namespace OpenMD {
53   using namespace std;
54   namespace OpenMD {
55    
56 <  class ForceDecomposition : public Decomposition {
56 >  class ForceMatrixDecomposition : public ForceDecomposition {
57    public:
58 <    ForceDecomposition(SimInfo* info) : Decomposition(info) {sman_ = info_->getSnapshotManager();}
58 >    ForceMatrixDecomposition(SimInfo* info) : ForceDecomposition(info) {sman_ = info_->getSnapshotManager();}
59      void distributeInitialData();
60      void distributeData();
61      void collectIntermediateData();
62      void distributeIntermediateData();
63      void collectData();
64  
65 <    unsigned int getNcutoffGroupsI();
66 <    unsigned int getNcutoffGroupsJ();
65 >    // neighbor list routines
66 >    bool checkNeighborList();
67 >    vector<pair<int, int> >  buildNeighborList();
68  
69 <    vector<int> getAtomsInGroupI(int whichCGI);
70 <    vector<int> getAtomsInGroupJ(int whichCGJ);
69 >    // group bookkeeping
70 >    pair<int, int> getGroupTypes(int cg1, int cg2);
71  
72 <    AtomType* getAtomTypeI(int whichAtomI);
73 <    AtomType* getAtomTypeJ(int whichAtomJ);  
72 >    // Group->atom bookkeeping
73 >    vector<int> getAtomsInGroupRow(int cg1);
74 >    vector<int> getAtomsInGroupColumn(int cg2);
75 >    Vector3d getAtomToGroupVectorRow(int atom1, int cg1);
76 >    Vector3d getAtomToGroupVectorColumn(int atom2, int cg2);
77 >    RealType getMfactRow(int atom1);
78 >    RealType getMfactColumn(int atom2);
79  
80 +    // spatial data
81 +    Vector3d getIntergroupVector(int cg1, int cg2);
82 +    Vector3d getInteratomicVector(int atom1, int atom2);
83 +      
84 +    // atom bookkeeping
85 +    vector<int> getAtomList();
86 +    vector<int> getSkipsForAtom(int atom1);
87 +    bool skipAtomPair(int atom1, int atom2);
88 +    void addForceToAtomRow(int atom1, Vector3d fg);
89 +    void addForceToAtomColumn(int atom2, Vector3d fg);
90 +
91 +    // filling interaction blocks with pointers
92 +    InteractionData fillInteractionData(int atom1, int atom2);
93 +    InteractionData fillSkipData(int atom1, int atom2);
94 +    SelfData fillSelfData(int atom1);
95 +
96    private:
97      SnapshotManager* sman_;    
98 +    Snapshot* snap_;
99 +    int storageLayout_;
100   #ifdef IS_MPI    
76    Communicator<Row, int>* AtomCommIntI;
77    Communicator<Row, RealType>* AtomCommRealI;
78    Communicator<Row, Vector3d>* AtomCommVectorI;
79    Communicator<Row, Mat3x3d>*  AtomCommMatrixI;
101  
102 <    Communicator<Column, int>* AtomCommIntJ;
103 <    Communicator<Column, RealType>* AtomCommRealJ;
104 <    Communicator<Column, Vector3d>* AtomCommVectorJ;
105 <    Communicator<Column, Mat3x3d>*  AtomCommMatrixJ;
102 >    DataStorage atomRowData;
103 >    DataStorage atomColData;
104 >    DataStorage cgRowData;
105 >    DataStorage cgColData;
106  
107 <    Communicator<Row, int>* cgCommIntI;
108 <    Communicator<Row, Vector3d>* cgCommVectorI;
109 <    Communicator<Column, int>* cgCommIntJ;
110 <    Communicator<Column, Vector3d>* cgCommVectorJ;
107 >    Communicator<Row, int>* AtomCommIntRow;
108 >    Communicator<Row, RealType>* AtomCommRealRow;
109 >    Communicator<Row, Vector3d>* AtomCommVectorRow;
110 >    Communicator<Row, Mat3x3d>*  AtomCommMatrixRow;
111  
112 +    Communicator<Column, int>* AtomCommIntColumn;
113 +    Communicator<Column, RealType>* AtomCommRealColumn;
114 +    Communicator<Column, Vector3d>* AtomCommVectorColumn;
115 +    Communicator<Column, Mat3x3d>*  AtomCommMatrixColumn;
116 +
117 +    Communicator<Row, int>* cgCommIntRow;
118 +    Communicator<Row, Vector3d>* cgCommVectorRow;
119 +    Communicator<Column, int>* cgCommIntColumn;
120 +    Communicator<Column, Vector3d>* cgCommVectorColumn;
121 +
122      vector<vector<RealType> > pot_row;
123      vector<vector<RealType> > pot_col;
124 <    vector<int> identRow;
125 <    vector<int> identCol;
124 >    vector<int> identsRow;
125 >    vector<int> identsCol;
126  
127      vector<int> AtomLocalToGlobal;
128      vector<int> AtomRowToGlobal;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines