# | Line 25 | Line 25 | mpiSimulation::mpiSimulation(SimInfo* the_entryPlug) | |
---|---|---|
25 | ||
26 | MolToProcMap = new int[entryPlug->n_mol]; | |
27 | MolComponentType = new int[entryPlug->n_mol]; | |
28 | – | |
28 | AtomToProcMap = new int[entryPlug->n_atoms]; | |
29 | ||
30 | mpiSim = this; | |
# | Line 150 | Line 149 | int* mpiSimulation::divideLabor( void ){ | |
149 | MolToProcMap[i] = which_proc; | |
150 | AtomsPerProc[which_proc] += add_atoms; | |
151 | for (j = 0 ; j < add_atoms; j++ ) { | |
152 | < | atomIndex++; |
153 | < | AtomToProcMap[atomIndex] = which_proc; |
152 | > | AtomToProcMap[atomIndex] = which_proc; |
153 | > | atomIndex++; |
154 | } | |
155 | done = 1; | |
156 | continue; | |
# | Line 173 | Line 172 | int* mpiSimulation::divideLabor( void ){ | |
172 | MolToProcMap[i] = which_proc; | |
173 | AtomsPerProc[which_proc] += add_atoms; | |
174 | for (j = 0 ; j < add_atoms; j++ ) { | |
175 | < | atomIndex++; |
176 | < | AtomToProcMap[atomIndex] = which_proc; |
175 | > | AtomToProcMap[atomIndex] = which_proc; |
176 | > | atomIndex++; |
177 | } | |
178 | done = 1; | |
179 | continue; | |
# | Line 195 | Line 194 | int* mpiSimulation::divideLabor( void ){ | |
194 | MolToProcMap[i] = which_proc; | |
195 | AtomsPerProc[which_proc] += add_atoms; | |
196 | for (j = 0 ; j < add_atoms; j++ ) { | |
197 | < | atomIndex++; |
198 | < | AtomToProcMap[atomIndex] = which_proc; |
199 | < | } |
197 | > | AtomToProcMap[atomIndex] = which_proc; |
198 | > | atomIndex++; |
199 | > | } |
200 | done = 1; | |
201 | continue; | |
202 | } else { | |
# | Line 286 | Line 285 | int* mpiSimulation::divideLabor( void ){ | |
285 | local_index = 0; | |
286 | for (i = 0; i < mpiPlug->nAtomsGlobal; i++) { | |
287 | if (AtomToProcMap[i] == mpiPlug->myNode) { | |
289 | – | local_index++; |
288 | globalIndex[local_index] = i; | |
289 | + | local_index++; |
290 | } | |
291 | } | |
292 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |