ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/mpiSimulation.cpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/mpiSimulation.cpp (file contents):
Revision 1203 by gezelter, Thu May 27 18:59:17 2004 UTC vs.
Revision 1214 by gezelter, Tue Jun 1 18:42:58 2004 UTC

# Line 394 | Line 394 | void mpiSimulation::mpiRefresh( void ){
394   void mpiSimulation::mpiRefresh( void ){
395  
396    int isError, i;
397 <  int *globalAtomIndex = new int[parallelData->nAtomsLocal];
397 >  int *localToGlobalAtomIndex = new int[parallelData->nAtomsLocal];
398 >  int *localToGlobalGroupIndex = new int[parallelData->nGroupsLocal];
399  
400 <  // Fortran indexing needs to be increased by 1 in order to get the 2 languages to
401 <  // not barf
400 >  // Fortran indexing needs to be increased by 1 in order to get the 2
401 >  // languages to not barf
402  
403 <  for(i=0; i<parallelData->nAtomsLocal; i++) globalAtomIndex[i] = entryPlug->atoms[i]->getGlobalIndex()+1;
403 >  for(i = 0; i < parallelData->nAtomsLocal; i++)
404 >    localToGlobalAtomIndex[i] = globalAtomIndex[i] + 1;
405 >
406 >  for(i = 0; i < parallelData->nGroupsLocal; i++)
407 >    localToGlobalGroupIndex[i] = globalGroupIndex[i] + 1;
408    
409    isError = 0;
410 <  setFsimParallel( parallelData, &(entryPlug->n_atoms), globalAtomIndex, &isError );
410 >
411 >  setFsimParallel( parallelData,
412 >                   &(parallelData->nAtomsLocal), localToGlobalAtomIndex,
413 >                   &(parallelData->nGroupsLocal),  localToGlobalGroupIndex,
414 >                   &isError );
415 >
416    if( isError ){
417  
418      sprintf( painCave.errMsg,
# Line 411 | Line 421 | void mpiSimulation::mpiRefresh( void ){
421      simError();
422    }
423  
424 <  delete[] globalAtomIndex;
424 >  delete[] localToGlobalGroupIndex;
425 >  delete[] localToGlobalAtomIndex;
426  
427  
428    sprintf( checkPointMsg,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines