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 1535 by gezelter, Fri Dec 31 18:31:56 2010 UTC vs.
Revision 1544 by gezelter, Fri Mar 18 19:31:52 2011 UTC

# Line 55 | Line 55
55   #include "primitives/Molecule.hpp"
56   #include "primitives/StuntDouble.hpp"
57   #include "UseTheForce/DarkSide/neighborLists_interface.h"
58 + #include "UseTheForce/doForces_interface.h"
59   #include "utils/MemoryUtils.hpp"
60   #include "utils/simError.h"
61   #include "selection/SelectionManager.hpp"
# Line 131 | Line 132 | namespace OpenMD {
132      //equal to the total number of atoms minus number of atoms belong to
133      //cutoff group defined in meta-data file plus the number of cutoff
134      //groups defined in meta-data file
135 +    std::cerr << "nGA = " << nGlobalAtoms_ << "\n";
136 +    std::cerr << "nCA = " << nCutoffAtoms << "\n";
137 +    std::cerr << "nG = " << nGroups << "\n";
138 +
139      nGlobalCutoffGroups_ = nGlobalAtoms_ - nCutoffAtoms + nGroups;
140 +
141 +    std::cerr << "nGCG = " << nGlobalCutoffGroups_ << "\n";
142      
143      //every free atom (atom does not belong to rigid bodies) is an
144      //integrable object therefore the total number of integrable objects
# Line 817 | Line 824 | namespace OpenMD {
824        }      
825      }
826  
827 <    //fill ident array of local atoms (it is actually ident of
821 <    //AtomType, it is so confusing !!!)
822 <    vector<int> identArray;
827 >    // Build the identArray_
828  
829 <    //to avoid memory reallocation, reserve enough space identArray
830 <    identArray.reserve(getNAtoms());
826 <    
829 >    identArray_.clear();
830 >    identArray_.reserve(getNAtoms());    
831      for(mol = beginMolecule(mi); mol != NULL; mol = nextMolecule(mi)) {        
832        for(atom = mol->beginAtom(ai); atom != NULL; atom = mol->nextAtom(ai)) {
833 <        identArray.push_back(atom->getIdent());
833 >        identArray_.push_back(atom->getIdent());
834        }
835      }    
836  
# Line 924 | Line 928 | namespace OpenMD {
928      sprintf(checkPointMsg, " mpiRefresh successful.\n");
929      errorCheckPoint();
930   #endif
931 +
932 +    initFortranFF(&isError);
933 +    if (isError) {
934 +      sprintf(painCave.errMsg,
935 +              "initFortranFF errror: fortran didn't like something we gave it.\n");
936 +      painCave.isFatal = 1;
937 +      simError();
938 +    }
939      fortranInitialized_ = true;
940    }
941  
# Line 961 | Line 973 | namespace OpenMD {
973      Molecule* mol;
974      RigidBody* rb;
975      Atom* atom;
976 +    CutoffGroup* cg;
977      SimInfo::MoleculeIterator mi;
978      Molecule::RigidBodyIterator rbIter;
979 <    Molecule::AtomIterator atomIter;;
979 >    Molecule::AtomIterator atomIter;
980 >    Molecule::CutoffGroupIterator cgIter;
981  
982      for (mol = beginMolecule(mi); mol != NULL; mol = nextMolecule(mi)) {
983          
# Line 973 | Line 987 | namespace OpenMD {
987          
988        for (rb = mol->beginRigidBody(rbIter); rb != NULL; rb = mol->nextRigidBody(rbIter)) {
989          rb->setSnapshotManager(sman_);
990 +      }
991 +
992 +      for (cg = mol->beginCutoffGroup(cgIter); cg != NULL; cg = mol->nextCutoffGroup(cgIter)) {
993 +        cg->setSnapshotManager(sman_);
994        }
995      }    
996      

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines