--- branches/development/src/brains/SimInfo.cpp 2011/01/17 21:34:36 1540 +++ branches/development/src/brains/SimInfo.cpp 2011/04/11 18:44:16 1547 @@ -824,16 +824,13 @@ namespace OpenMD { } } - //fill ident array of local atoms (it is actually ident of - //AtomType, it is so confusing !!!) - vector identArray; + // Build the identArray_ - //to avoid memory reallocation, reserve enough space identArray - identArray.reserve(getNAtoms()); - + identArray_.clear(); + identArray_.reserve(getNAtoms()); for(mol = beginMolecule(mi); mol != NULL; mol = nextMolecule(mi)) { for(atom = mol->beginAtom(ai); atom != NULL; atom = mol->nextAtom(ai)) { - identArray.push_back(atom->getIdent()); + identArray_.push_back(atom->getIdent()); } } @@ -856,7 +853,7 @@ namespace OpenMD { int* oneThreeList = oneThreeInteractions_.getPairList(); int* oneFourList = oneFourInteractions_.getPairList(); - setFortranSim( &fInfo_, &nGlobalAtoms_, &nAtoms_, &identArray[0], + setFortranSim( &fInfo_, &nGlobalAtoms_, &nAtoms_, &identArray_[0], &nExclude, excludeList, &nOneTwo, oneTwoList, &nOneThree, oneThreeList,