Skip to content
Snippets Groups Projects
Commit 0667b3e6 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

trying to fix loading of view without partition, if view with identical name...

trying to fix loading of view without partition, if view with identical name without partition already exists
parent f2c0369b
No related branches found
No related tags found
No related merge requests found
...@@ -39,7 +39,8 @@ bool PViewDataGModel::addData(GModel *model, std::map<int, std::vector<double> > ...@@ -39,7 +39,8 @@ bool PViewDataGModel::addData(GModel *model, std::map<int, std::vector<double> >
for(int j = 0; j < numComp * mult; j++) for(int j = 0; j < numComp * mult; j++)
d[j] = it->second[j]; d[j] = it->second[j];
} }
_steps[step]->getPartitions().insert(partition); if(partition >= 0)
_steps[step]->getPartitions().insert(partition);
finalize(); finalize();
return true; return true;
} }
...@@ -112,7 +113,8 @@ bool PViewDataGModel::readMSH(std::string fileName, int fileIndex, FILE *fp, ...@@ -112,7 +113,8 @@ bool PViewDataGModel::readMSH(std::string fileName, int fileIndex, FILE *fp,
Msg::ProgressMeter(i + 1, numEnt, "Reading data"); Msg::ProgressMeter(i + 1, numEnt, "Reading data");
} }
_steps[step]->getPartitions().insert(partition); if(partition >= 0)
_steps[step]->getPartitions().insert(partition);
finalize(false); finalize(false);
return true; return true;
......
...@@ -159,7 +159,7 @@ bool PView::readMSH(std::string fileName, int fileIndex) ...@@ -159,7 +159,7 @@ bool PView::readMSH(std::string fileName, int fileIndex)
} }
} }
// integer tags // 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(!fgets(str, sizeof(str), fp)) return false;
if(sscanf(str, "%d", &numTags) != 1) return false; if(sscanf(str, "%d", &numTags) != 1) return false;
for(int i = 0; i < numTags; i++){ for(int i = 0; i < numTags; i++){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment