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

Comparing:
branches/development/src/parallel/ForceMatrixDecomposition.hpp (file contents), Revision 1570 by gezelter, Thu May 26 21:56:04 2011 UTC vs.
branches/devel_omp/src/parallel/ForceMatrixDecomposition.hpp (file contents), Revision 1595 by chuckv, Tue Jul 19 18:50:04 2011 UTC

# Line 55 | Line 55 | namespace OpenMD {
55    
56    class ForceMatrixDecomposition : public ForceDecomposition {
57    public:
58 <    ForceMatrixDecomposition(SimInfo* info) : ForceDecomposition(info) {};
58 >    ForceMatrixDecomposition(SimInfo* info, InteractionManager* iMan);
59  
60      void distributeInitialData();
61 +    void zeroWorkArrays();
62      void distributeData();
63      void collectIntermediateData();
64      void distributeIntermediateData();
# Line 65 | Line 66 | namespace OpenMD {
66  
67      // neighbor list routines
68      vector<pair<int, int> >  buildNeighborList();
69 +    // neighbor list routines based on Rapaport
70 +    vector<vector<int> > buildLayerBasedNeighborList();
71  
72      // group bookkeeping
73 <    pair<int, int> getGroupTypes(int cg1, int cg2);
73 >    groupCutoffs getGroupCutoffs(int cg1, int cg2);
74  
75      // Group->atom bookkeeping
76      vector<int> getAtomsInGroupRow(int cg1);
# Line 83 | Line 86 | namespace OpenMD {
86        
87      // atom bookkeeping
88      int getNAtomsInRow();
89 <    vector<int> getSkipsForRowAtom(int atom1);
90 <    int getTopoDistance(int atom1, int atom2);
89 >    int getTopologicalDistance(int atom1, int atom2);
90 >    vector<int> getExcludesForAtom(int atom1);
91      bool skipAtomPair(int atom1, int atom2);
92 +    bool excludeAtomPair(int atom1, int atom2);
93      void addForceToAtomRow(int atom1, Vector3d fg);
94      void addForceToAtomColumn(int atom2, Vector3d fg);
95  
96      // filling interaction blocks with pointers
97 <    InteractionData fillInteractionData(int atom1, int atom2);
98 <    InteractionData fillSkipData(int atom1, int atom2);
97 >    void fillInteractionData(InteractionData &idat, int atom1, int atom2);
98 >    void unpackInteractionData(InteractionData &idat, int atom1, int atom2);
99  
100    private:
101 +    void createGtypeCutoffMap();
102 +
103      int nLocal_;
104      int nGroups_;
105      vector<int> AtomLocalToGlobal;
106      vector<int> cgLocalToGlobal;
107 <    vector<RealType> pot_local;
108 <    vector<RealType> massFactorsLocal;
103 <    vector<vector<int> > skipsForLocalAtom;
104 <    vector<vector<int> > toposForLocalAtom;
105 <    vector<vector<int> > topoDistLocal;
107 >    vector<RealType> groupCutoff;
108 >    vector<int> groupToGtype;
109  
110   #ifdef IS_MPI    
111      DataStorage atomRowData;
# Line 115 | Line 118 | namespace OpenMD {
118      int nGroupsInRow_;
119      int nGroupsInCol_;
120  
121 <    Communicator<Row, int>* AtomCommIntRow;
122 <    Communicator<Row, RealType>* AtomCommRealRow;
120 <    Communicator<Row, Vector3d>* AtomCommVectorRow;
121 <    Communicator<Row, Mat3x3d>*  AtomCommMatrixRow;
121 >    Communicator<Row> rowComm;
122 >    Communicator<Column> colComm;
123  
124 <    Communicator<Column, int>* AtomCommIntColumn;
125 <    Communicator<Column, RealType>* AtomCommRealColumn;
126 <    Communicator<Column, Vector3d>* AtomCommVectorColumn;
127 <    Communicator<Column, Mat3x3d>*  AtomCommMatrixColumn;
124 >    Plan<int>* AtomPlanIntRow;
125 >    Plan<RealType>* AtomPlanRealRow;
126 >    Plan<Vector3d>* AtomPlanVectorRow;
127 >    Plan<Mat3x3d>*  AtomPlanMatrixRow;
128 >    Plan<potVec>* AtomPlanPotRow;
129  
130 <    Communicator<Row, int>* cgCommIntRow;
131 <    Communicator<Row, Vector3d>* cgCommVectorRow;
132 <    Communicator<Column, int>* cgCommIntColumn;
133 <    Communicator<Column, Vector3d>* cgCommVectorColumn;
130 >    Plan<int>* AtomPlanIntColumn;
131 >    Plan<RealType>* AtomPlanRealColumn;
132 >    Plan<Vector3d>* AtomPlanVectorColumn;
133 >    Plan<Mat3x3d>*  AtomPlanMatrixColumn;
134 >    Plan<potVec>* AtomPlanPotColumn;
135  
136 <    vector<vector<RealType> > pot_row;
137 <    vector<vector<RealType> > pot_col;
136 >    Plan<int>* cgPlanIntRow;
137 >    Plan<Vector3d>* cgPlanVectorRow;
138 >    Plan<int>* cgPlanIntColumn;
139 >    Plan<Vector3d>* cgPlanVectorColumn;
140  
141 +    // work arrays for assembling potential energy
142 +    vector<potVec> pot_row;
143 +    vector<potVec> pot_col;
144 +
145      vector<int> identsRow;
146      vector<int> identsCol;
147  
148 +    vector<AtomType*> atypesRow;
149 +    vector<AtomType*> atypesCol;
150 +
151      vector<int> AtomRowToGlobal;
152      vector<int> AtomColToGlobal;
153  
154      vector<int> cgRowToGlobal;
155      vector<int> cgColToGlobal;
156  
157 +    vector<RealType> groupCutoffRow;
158 +    vector<RealType> groupCutoffCol;
159 +    vector<int> groupColToGtype;
160 +    vector<int> groupRowToGtype;
161 +
162      vector<vector<int> > cellListRow_;
163      vector<vector<int> > cellListCol_;
164  
# Line 150 | Line 167 | namespace OpenMD {
167  
168      vector<RealType> massFactorsRow;
169      vector<RealType> massFactorsCol;
153
154    vector<vector<int> > skipsForRowAtom;
155    vector<vector<int> > toposForRowAtom;
156    vector<vector<int> > topoDistRow;
157
158
170   #endif
171  
172    };

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines