# | Line 88 | Line 88 | namespace OpenMD { | |
---|---|---|
88 | ||
89 | vector<Component*> components = simParams->getComponents(); | |
90 | ||
91 | < | for (vector<Component*>::iterator i = components.begin(); i !=components.end(); ++i) { |
91 | > | for (vector<Component*>::iterator i = components.begin(); |
92 | > | i !=components.end(); ++i) { |
93 | molStamp = (*i)->getMoleculeStamp(); | |
94 | nMolWithSameStamp = (*i)->getNMol(); | |
95 | ||
# | Line 781 | Line 782 | namespace OpenMD { | |
782 | ||
783 | void SimInfo::setupSimVariables() { | |
784 | useAtomicVirial_ = simParams_->getUseAtomicVirial(); | |
785 | < | // we only call setAccumulateBoxDipole if the accumulateBoxDipole parameter is true |
785 | > | // we only call setAccumulateBoxDipole if the accumulateBoxDipole |
786 | > | // parameter is true |
787 | calcBoxDipole_ = false; | |
788 | if ( simParams_->haveAccumulateBoxDipole() ) | |
789 | if ( simParams_->getAccumulateBoxDipole() ) { | |
# | Line 979 | Line 981 | namespace OpenMD { | |
981 | ||
982 | for (mol = beginMolecule(mi); mol != NULL; mol = nextMolecule(mi)) { | |
983 | ||
984 | < | for (atom = mol->beginAtom(atomIter); atom != NULL; atom = mol->nextAtom(atomIter)) { |
984 | > | for (atom = mol->beginAtom(atomIter); atom != NULL; |
985 | > | atom = mol->nextAtom(atomIter)) { |
986 | atom->setSnapshotManager(sman_); | |
987 | } | |
988 | ||
989 | < | for (rb = mol->beginRigidBody(rbIter); rb != NULL; rb = mol->nextRigidBody(rbIter)) { |
989 | > | for (rb = mol->beginRigidBody(rbIter); rb != NULL; |
990 | > | rb = mol->nextRigidBody(rbIter)) { |
991 | rb->setSnapshotManager(sman_); | |
992 | } | |
993 | ||
994 | < | for (cg = mol->beginCutoffGroup(cgIter); cg != NULL; cg = mol->nextCutoffGroup(cgIter)) { |
994 | > | for (cg = mol->beginCutoffGroup(cgIter); cg != NULL; |
995 | > | cg = mol->nextCutoffGroup(cgIter)) { |
996 | cg->setSnapshotManager(sman_); | |
997 | } | |
998 | } | |
# | Line 1002 | Line 1007 | namespace OpenMD { | |
1007 | ||
1008 | ||
1009 | StuntDouble* SimInfo::getIOIndexToIntegrableObject(int index) { | |
1010 | < | return IOIndexToIntegrableObject.at(index); |
1010 | > | if (index >= IOIndexToIntegrableObject.size()) { |
1011 | > | sprintf(painCave.errMsg, |
1012 | > | "SimInfo::getIOIndexToIntegrableObject Error: Integrable Object\n" |
1013 | > | "\tindex exceeds number of known objects!\n"); |
1014 | > | painCave.isFatal = 1; |
1015 | > | simError(); |
1016 | > | return NULL; |
1017 | > | } else |
1018 | > | return IOIndexToIntegrableObject.at(index); |
1019 | } | |
1020 | ||
1021 | void SimInfo::setIOIndexToIntegrableObject(const vector<StuntDouble*>& v) { | |
1022 | IOIndexToIntegrableObject= v; | |
1023 | } | |
1011 | – | /* |
1012 | – | void SimInfo::setStuntDoubleFromGlobalIndex(vector<StuntDouble*> v) { |
1013 | – | assert( v.size() == nAtoms_ + nRigidBodies_); |
1014 | – | sdByGlobalIndex_ = v; |
1015 | – | } |
1024 | ||
1017 | – | StuntDouble* SimInfo::getStuntDoubleFromGlobalIndex(int index) { |
1018 | – | //assert(index < nAtoms_ + nRigidBodies_); |
1019 | – | return sdByGlobalIndex_.at(index); |
1020 | – | } |
1021 | – | */ |
1025 | int SimInfo::getNGlobalConstraints() { | |
1026 | int nGlobalConstraints; | |
1027 | #ifdef IS_MPI |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |