fixed: do not reset nGlPatches if no partitioning info is parsed

we end up parsing the partitioning information twice with model
generators. since myPatches is filled at this point, the second
block won't recalculate the proper nGlPatches for us. fix this
by not reseting nGlPatches unless we hit the <part> block.
This commit is contained in:
Arne Morten Kvarving 2016-09-19 09:38:34 +02:00
parent 5870c5d8f2
commit 952bb20bd7

View File

@ -169,8 +169,9 @@ bool SIMbase::parseGeometryTag (const TiXmlElement* elem)
return true; return true;
IFEM::cout <<"\tNumber of partitions: "<< proc << std::endl; IFEM::cout <<"\tNumber of partitions: "<< proc << std::endl;
nGlPatches = 0;
const TiXmlElement* part = elem->FirstChildElement("part"); const TiXmlElement* part = elem->FirstChildElement("part");
if (part)
nGlPatches = 0;
for (; part; part = part->NextSiblingElement("part")) { for (; part; part = part->NextSiblingElement("part")) {
int first = -2, last = -2; int first = -2, last = -2;
utl::getAttribute(part,"proc",proc); utl::getAttribute(part,"proc",proc);