# | 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, |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |