| 33 |
|
|
| 34 |
|
} |
| 35 |
|
else{ |
| 36 |
+ |
|
| 37 |
|
indexOfAllZConsMols = index->getIndexData(); |
| 38 |
+ |
|
| 39 |
+ |
//the maximum value of index is the last one(we sorted the index data in SimSetup.cpp) |
| 40 |
+ |
int maxIndex; |
| 41 |
+ |
int totalNumMol; |
| 42 |
+ |
|
| 43 |
+ |
maxIndex = indexOfAllZConsMols[indexOfAllZConsMols.size() - 1]; |
| 44 |
+ |
|
| 45 |
+ |
#ifndef IS_MPI |
| 46 |
+ |
totalNumMol = nMols; |
| 47 |
+ |
#else |
| 48 |
+ |
totalNumMol = mpiSim->getTotNmol(); |
| 49 |
+ |
#endif |
| 50 |
+ |
|
| 51 |
+ |
if(maxIndex > totalNumMol - 1){ |
| 52 |
+ |
sprintf( painCave.errMsg, |
| 53 |
+ |
"ZConstraint error: index is out of range\n"); |
| 54 |
+ |
painCave.isFatal = 1; |
| 55 |
+ |
simError(); |
| 56 |
+ |
|
| 57 |
+ |
} |
| 58 |
+ |
|
| 59 |
|
} |
| 60 |
|
|
| 61 |
|
} |