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 1584 by gezelter, Fri Jun 17 20:16:35 2011 UTC vs.
Revision 1586 by gezelter, Tue Jun 21 06:34:35 2011 UTC

# Line 59 | Line 59 | namespace OpenMD {
59      nLocal_ = snap_->getNumberOfAtoms();
60  
61      nGroups_ = info_->getNLocalCutoffGroups();
62    cerr << "in dId, nGroups = " << nGroups_ << "\n";
62      // gather the information for atomtype IDs (atids):
63      idents = info_->getIdentArray();
64      AtomLocalToGlobal = info_->getGlobalAtomIndices();
65      cgLocalToGlobal = info_->getGlobalGroupIndices();
66      vector<int> globalGroupMembership = info_->getGlobalGroupMembership();
67 +
68      massFactors = info_->getMassFactors();
69  
70      PairList excludes = info_->getExcludedInteractions();
# Line 226 | Line 226 | namespace OpenMD {
226    }
227    
228    void ForceMatrixDecomposition::createGtypeCutoffMap() {
229 <
229 >    
230      RealType tol = 1e-6;
231      RealType rc;
232      int atid;
# Line 304 | Line 304 | namespace OpenMD {
304      vector<RealType> groupCutoff(nGroups_, 0.0);
305      groupToGtype.resize(nGroups_);
306  
307    cerr << "nGroups = " << nGroups_ << "\n";
307      for (int cg1 = 0; cg1 < nGroups_; cg1++) {
308  
309        groupCutoff[cg1] = 0.0;
# Line 333 | Line 332 | namespace OpenMD {
332      }
333   #endif
334  
336    cerr << "gTypeCutoffs.size() = " << gTypeCutoffs.size() << "\n";
335      // Now we find the maximum group cutoff value present in the simulation
336  
337      RealType groupMax = *max_element(gTypeCutoffs.begin(), gTypeCutoffs.end());
# Line 454 | Line 452 | namespace OpenMD {
452             atomRowData.functionalDerivative.end(), 0.0);
453        fill(atomColData.functionalDerivative.begin(),
454             atomColData.functionalDerivative.end(), 0.0);
455 +    }
456 +
457 +    if (storageLayout_ & DataStorage::dslSkippedCharge) {      
458 +      fill(atomRowData.skippedCharge.begin(), atomRowData.skippedCharge.end(), 0.0);
459 +      fill(atomColData.skippedCharge.begin(), atomColData.skippedCharge.end(), 0.0);
460      }
461  
462   #else
# Line 474 | Line 477 | namespace OpenMD {
477      if (storageLayout_ & DataStorage::dslFunctionalDerivative) {      
478        fill(snap_->atomData.functionalDerivative.begin(),
479             snap_->atomData.functionalDerivative.end(), 0.0);
480 +    }
481 +    if (storageLayout_ & DataStorage::dslSkippedCharge) {      
482 +      fill(snap_->atomData.skippedCharge.begin(),
483 +           snap_->atomData.skippedCharge.end(), 0.0);
484      }
485   #endif
486      
# Line 691 | Line 698 | namespace OpenMD {
698   #ifdef IS_MPI
699      return massFactorsRow[atom1];
700   #else
694    cerr << "mfs = " << massFactors.size() << " atom1 = " << atom1 << "\n";
701      return massFactors[atom1];
702   #endif
703    }
# Line 877 | Line 883 | namespace OpenMD {
883      snap_->atomData.force[atom1] += *(idat.f1);
884      snap_->atomData.force[atom2] -= *(idat.f1);
885   #endif
886 <
886 >    
887    }
888  
889  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines