diff --git a/Post/PViewDataGModelIO.cpp b/Post/PViewDataGModelIO.cpp index 1ac5bf2c64c960968e148275eba751bba258502d..7010f499e5cd13c91b3b67675e97d5694907f39b 100644 --- a/Post/PViewDataGModelIO.cpp +++ b/Post/PViewDataGModelIO.cpp @@ -39,7 +39,8 @@ bool PViewDataGModel::addData(GModel *model, std::map<int, std::vector<double> > for(int j = 0; j < numComp * mult; j++) d[j] = it->second[j]; } - _steps[step]->getPartitions().insert(partition); + if(partition >= 0) + _steps[step]->getPartitions().insert(partition); finalize(); return true; } @@ -112,7 +113,8 @@ bool PViewDataGModel::readMSH(std::string fileName, int fileIndex, FILE *fp, Msg::ProgressMeter(i + 1, numEnt, "Reading data"); } - _steps[step]->getPartitions().insert(partition); + if(partition >= 0) + _steps[step]->getPartitions().insert(partition); finalize(false); return true; diff --git a/Post/PViewIO.cpp b/Post/PViewIO.cpp index fc616284705102fceb3c7521427134a42a78ae5d..58211a8c5fb771ec55b8883d1502729ef828e739 100644 --- a/Post/PViewIO.cpp +++ b/Post/PViewIO.cpp @@ -159,7 +159,7 @@ bool PView::readMSH(std::string fileName, int fileIndex) } } // integer tags - int timeStep = 0, numComp = 0, numEnt = 0, partition = 0; + int timeStep = 0, numComp = 0, numEnt = 0, partition = -1; if(!fgets(str, sizeof(str), fp)) return false; if(sscanf(str, "%d", &numTags) != 1) return false; for(int i = 0; i < numTags; i++){