Reads in the geometry property file on rank 0 and distributes the information among the processes.
339 {
340 TRACE();
341
343 m_log <<
" * reading rest of the properties" << endl;
344
345
347 TERMM(1, "Body consistency check failed");
348 }
349
350 for(auto&& prop : properties) {
351
352 const MString varName = prop.name();
353
354
355 if(!strstr(varName.c_str(), ".")) {
356
357
358
359
360 DEBUG("GeometryIOToml::readPropertyFile default property : " << varName, MAIA_DEBUG_USER1);
363 p->name.append(varName);
365 }
366
367 else {
368 if(strstr(varName.c_str(), "_bodies.")) {
369 DEBUG("GeometryIOToml::readPropertyFile normal property: " << varName, MAIA_DEBUG_USER1);
370 MInt noBodies = prop.size();
372 copy(prop.asString().begin(), prop.asString().end(), bodies);
373
374
375 list<MInt> segmentList;
376 for(
MInt i = 0; i != noBodies; i++) {
377 DEBUG("GeometryIOToml::readPropertyFile definition for body " << bodies[i], MAIA_DEBUG_USER1);
379
381
382 for(
MInt j = 0; j < zI->second->noSegments; j++)
383 segmentList.push_back(zI->second->segments[j]);
384 }
385
386 char* du;
387 du = strrchr(
const_cast<MChar*
>(varName.c_str()),
'.');
389
390 dummy.replace(dummy.find("_bodies."), dummy.size(), du);
391 DEBUG("GeometryIOToml::readPropertyFile found property : " << dummy, MAIA_DEBUG_USER1);
392
393
394 list<MInt>::const_iterator it = segmentList.begin();
395 dummy.erase(dummy.find("."));
396
397 for(; it != segmentList.end(); it++) {
400 p->name.append(dummy);
402 DEBUG("GeometryIOToml::readPropertyFile created property for solver " << *it, MAIA_DEBUG_USER1);
403 }
404 }
405 else {
406
407 char* du;
408 du = strrchr(
const_cast<MChar*
>(varName.c_str()),
'.') + 1;
409 MInt singleSegmentId = atoi(du);
410
412
413 if(singleSegmentId || *du == '0') {
414 DEBUG("Found single segment property definition for segment " << singleSegmentId, MAIA_DEBUG_IO);
416 p->segmentId = singleSegmentId;
417
419
420 dummyName.erase(dummyName.find("."));
421 p->name.append(dummyName);
423 }
424 }
425 }
426 }
427
429 DEBUG("GeometryIOToml::readPropertyFile ** Property check successful \n", MAIA_DEBUG_USER1);
430 }
431}
MBool checkGeometryPropertyConsistency()
bodyMap::const_iterator bodyIterator