ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/brains/SimInfo.cpp
(Generate patch)

Comparing branches/development/src/brains/SimInfo.cpp (file contents):
Revision 1569 by gezelter, Thu May 26 13:55:04 2011 UTC vs.
Revision 1577 by gezelter, Wed Jun 8 20:26:56 2011 UTC

# Line 125 | Line 125 | namespace OpenMD {
125      //equal to the total number of atoms minus number of atoms belong to
126      //cutoff group defined in meta-data file plus the number of cutoff
127      //groups defined in meta-data file
128    std::cerr << "nGA = " << nGlobalAtoms_ << "\n";
129    std::cerr << "nCA = " << nCutoffAtoms << "\n";
130    std::cerr << "nG = " << nGroups << "\n";
128  
129      nGlobalCutoffGroups_ = nGlobalAtoms_ - nCutoffAtoms + nGroups;
133
134    std::cerr << "nGCG = " << nGlobalCutoffGroups_ << "\n";
130      
131      //every free atom (atom does not belong to rigid bodies) is an
132      //integrable object therefore the total number of integrable objects
# Line 273 | Line 268 | namespace OpenMD {
268      fdf_ = fdf_local;
269   #endif
270      return fdf_;
271 +  }
272 +  
273 +  unsigned int SimInfo::getNLocalCutoffGroups(){
274 +    int nLocalCutoffAtoms = 0;
275 +    Molecule* mol;
276 +    MoleculeIterator mi;
277 +    CutoffGroup* cg;
278 +    Molecule::CutoffGroupIterator ci;
279 +    
280 +    for (mol = beginMolecule(mi); mol != NULL; mol  = nextMolecule(mi)) {
281 +      
282 +      for (cg = mol->beginCutoffGroup(ci); cg != NULL;
283 +           cg = mol->nextCutoffGroup(ci)) {
284 +        nLocalCutoffAtoms += cg->getNumAtom();
285 +        
286 +      }        
287 +    }
288 +    
289 +    return nAtoms_ - nLocalCutoffAtoms + nCutoffGroups_;
290    }
291      
292    void SimInfo::calcNdfRaw() {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines