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

Comparing branches/development/src/parallel/ForceMatrixDecomposition.cpp (file contents):
Revision 1590 by gezelter, Mon Jul 11 01:39:49 2011 UTC vs.
Revision 1591 by gezelter, Tue Jul 12 15:25:07 2011 UTC

# Line 113 | Line 113 | namespace OpenMD {
113      AtomCommIntColumn->gather(idents, identsCol);
114      
115      // allocate memory for the parallel objects
116 <    AtomRowToGlobal.resize(nAtomsInRow_);
117 <    AtomColToGlobal.resize(nAtomsInCol_);
118 <    cgRowToGlobal.resize(nGroupsInRow_);
119 <    cgColToGlobal.resize(nGroupsInCol_);
120 <    massFactorsRow.resize(nAtomsInRow_);
121 <    massFactorsCol.resize(nAtomsInCol_);
116 >    atypesRow.resize(nAtomsInRow_);
117 >    atypesCol.resize(nAtomsInCol_);
118 >
119 >    for (int i = 0; i < nAtomsInRow_; i++)
120 >      atypesRow[i] = ff_->getAtomType(identsRow[i]);
121 >    for (int i = 0; i < nAtomsInCol_; i++)
122 >      atypesCol[i] = ff_->getAtomType(identsCol[i]);        
123 >
124      pot_row.resize(nAtomsInRow_);
125      pot_col.resize(nAtomsInCol_);
126  
127 +    AtomRowToGlobal.resize(nAtomsInRow_);
128 +    AtomColToGlobal.resize(nAtomsInCol_);
129      AtomCommIntRow->gather(AtomLocalToGlobal, AtomRowToGlobal);
130      AtomCommIntColumn->gather(AtomLocalToGlobal, AtomColToGlobal);
131      
132 +    cgRowToGlobal.resize(nGroupsInRow_);
133 +    cgColToGlobal.resize(nGroupsInCol_);
134      cgCommIntRow->gather(cgLocalToGlobal, cgRowToGlobal);
135      cgCommIntColumn->gather(cgLocalToGlobal, cgColToGlobal);
136  
137 +    massFactorsRow.resize(nAtomsInRow_);
138 +    massFactorsCol.resize(nAtomsInCol_);
139      AtomCommRealRow->gather(massFactors, massFactorsRow);
140      AtomCommRealColumn->gather(massFactors, massFactorsCol);
141  
# Line 187 | Line 195 | namespace OpenMD {
195  
196   #endif
197  
198 +    // allocate memory for the parallel objects
199 +    atypesLocal.resize(nLocal_);
200 +
201 +    for (int i = 0; i < nLocal_; i++)
202 +      atypesLocal[i] = ff_->getAtomType(idents[i]);
203 +
204      groupList_.clear();
205      groupList_.resize(nGroups_);
206      for (int i = 0; i < nGroups_; i++) {
# Line 836 | Line 850 | namespace OpenMD {
850      idat.excluded = excludeAtomPair(atom1, atom2);
851    
852   #ifdef IS_MPI
853 <    
854 <    idat.atypes = make_pair( ff_->getAtomType(identsRow[atom1]),
855 <                             ff_->getAtomType(identsCol[atom2]) );
853 >    idat.atypes = make_pair( atypesRow[atom1], atypesCol[atom2]);
854 >    //idat.atypes = make_pair( ff_->getAtomType(identsRow[atom1]),
855 >    //                         ff_->getAtomType(identsCol[atom2]) );
856      
857      if (storageLayout_ & DataStorage::dslAmat) {
858        idat.A1 = &(atomRowData.aMat[atom1]);
# Line 882 | Line 896 | namespace OpenMD {
896  
897   #else
898  
899 <    idat.atypes = make_pair( ff_->getAtomType(idents[atom1]),
900 <                             ff_->getAtomType(idents[atom2]) );
899 >    idat.atypes = make_pair( atypesLocal[atom1], atypesLocal[atom2]);
900 >    //idat.atypes = make_pair( ff_->getAtomType(idents[atom1]),
901 >    //                         ff_->getAtomType(idents[atom2]) );
902  
903      if (storageLayout_ & DataStorage::dslAmat) {
904        idat.A1 = &(snap_->atomData.aMat[atom1]);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines