23#ifdef MAIA_WRITE_ACCESS_PROPERTIES_FILE
26ofstream maia_properties;
29#ifdef MAIA_PRINT_PROPERTIES
31ofstream propsFromFile;
67 }
else if(fileType ==
TOML) {
86#ifdef MAIA_WRITE_ACCESS_PROPERTIES_FILE
105#ifdef MAIA_PRINT_PROPERTIES
106 cout <<
"WARNING: MAIA_PRINT_PROPERTIES is enabled. This can slow down the simulation extremely. Furthermore, this "
107 "should only be done for small testcases to reduce the output (every process needs to write out its "
108 "properties). If you dont want to print out the properties, disable MAIA_PRINT_PROPERTIES in config.h!!!"
110 propsFromFile.open(
"PropertiesFromFile.dat");
111 propsDefault.open(
"DefaultProperties.dat");
125template <
typename T,
typename F>
127 const T* defaultValue,
MInt position, F&& f) {
133#ifdef MAIA_WRITE_ACCESS_PROPERTIES_FILE
135 i->second->noAccesses++;
139 const T pValue = f(i->second, position);
141#ifdef MAIA_WRITE_ACCESS_PROPERTIES_FILE
144 const T dValue = *defaultValue;
150 std::cerr <<
"Property default value specified: " << name <<
" solverId=" << -1 <<
" pos=" << position
151 <<
" value=" << pValue <<
" default=" << *defaultValue <<
" " << nameOfCallingFunction
161 stringstream errormessage;
162 errormessage <<
" The solver property '" << name <<
"' is required for the simulation"
163 <<
", but was not set in the toml file!!!!";
166 mTerm(1, nameOfCallingFunction, errormessage.str());
168 return *defaultValue;
188#ifdef MAIA_PRINT_PROPERTIES
190 propsFromFile << name <<
" = " << propertyValue <<
", basic Property (MString)" << endl;
192 propsDefault << name <<
" = " << propertyValue <<
", basic Property (MString)" << endl;
194 return propertyValue;
198 const MInt* default_value,
MInt pos) {
202#ifdef MAIA_PRINT_PROPERTIES
204 propsFromFile << name <<
" = " << propertyValue <<
", basic Property (MInt)" << endl;
206 propsDefault << name <<
" = " << propertyValue <<
", basic Property (MInt)" << endl;
209 return propertyValue;
217#ifdef MAIA_PRINT_PROPERTIES
219 propsFromFile << name <<
" = " << propertyValue <<
", basic Property (MFloat)" << endl;
221 propsDefault << name <<
" = " << propertyValue <<
", basic Property (MFloat)" << endl;
224 return propertyValue;
237 tmpDef =
static_cast<MInt>(*default_value);
241 propertyValue = (tmp == 1);
243#ifdef MAIA_PRINT_PROPERTIES
245 propsFromFile << name <<
" = " << propertyValue <<
", basic Property (MBool)" << endl;
247 propsDefault << name <<
" = " << propertyValue <<
", basic Property (MBool)" << endl;
250 return propertyValue;
264template <
typename T,
typename F>
266 MBool has_default,
const T* defaultValue,
MInt position, F&& f) {
271 if(i->second->solverId == solverId) {
272#ifdef MAIA_WRITE_ACCESS_PROPERTIES_FILE
274 i->second->noAccesses++;
278 const T pValue = f(i->second, position);
280#ifdef MAIA_WRITE_ACCESS_PROPERTIES_FILE
283 const T dValue = *defaultValue;
289 std::cerr <<
"Property default value specified: " << name <<
" solverId=" << solverId <<
" pos=" << position
290 <<
" value=" << pValue <<
" default=" << *defaultValue <<
" " << nameOfCallingFunction
303 stringstream errormessage;
304 errormessage <<
" The solver property '" << name <<
"' is required for the simulation"
305 <<
", but was not set in the toml file!!!!";
307 mTerm(1, nameOfCallingFunction, errormessage.str());
309 return *defaultValue;
330#ifdef MAIA_PRINT_PROPERTIES
333 propsFromFile << name <<
" = " << propertyValue <<
", solver Property (solverId = " << solverId
334 <<
", type = MString)" << endl;
336 propsDefault << name <<
" = " << propertyValue <<
", solver Property (solverId = " << solverId
337 <<
", type = MString)" << endl;
340 return propertyValue;
348#ifdef MAIA_PRINT_PROPERTIES
351 propsFromFile << name <<
" = " << propertyValue <<
", solver Property (solverId = " << solverId
352 <<
", type = MInt)" << endl;
354 propsDefault << name <<
" = " << propertyValue <<
", solver Property (solverId = " << solverId <<
", type = MInt)"
358 return propertyValue;
367#ifdef MAIA_PRINT_PROPERTIES
370 propsFromFile << name <<
" = " << propertyValue <<
", solver Property (solverId = " << solverId
371 <<
", type = MFloat)" << endl;
373 propsDefault << name <<
" = " << propertyValue <<
", solver Property (solverId = " << solverId
374 <<
", type = MFloat)" << endl;
377 return propertyValue;
381 const MInt solverId,
MBool has_default,
const MBool* default_value,
391 tmpDef =
static_cast<MInt>(*default_value);
395 propertyValue = (tmp == 1);
398#ifdef MAIA_PRINT_PROPERTIES
401 propsFromFile << name <<
" = " << propertyValue <<
", solver Property (solverId = " << solverId
402 <<
", type = MBool)" << endl;
404 propsDefault << name <<
" = " << propertyValue <<
", solver Property (solverId = " << solverId
405 <<
", type = MBool)" << endl;
408 return propertyValue;
421 DEBUG(
"MProperty::clear: name " << i->second->name, MAIA_DEBUG_IO);
422 DEBUG(
"MProperty::clear: solverId " << i->second->solverId, MAIA_DEBUG_IO);
428 DEBUG(
"MProperty::clear: name " << i->second->name, MAIA_DEBUG_IO);
429 DEBUG(
"MProperty::clear: solverId " << i->second->solverId, MAIA_DEBUG_IO);
435 DEBUG(
"MProperty::clear() name : " << i->second->name, MAIA_DEBUG_IO);
436 DEBUG(
"MProperty::clear() noSolvers : " << i->second->noSolvers, MAIA_DEBUG_IO);
437 delete[] i->second->solvers;
439#ifdef MAIA_PRINT_PROPERTIES
440 propsFromFile.close();
441 propsDefault.close();
456 const pair<const MString, MProperty*> mp(p->name, p);
460 std::transform(nameL.begin(), nameL.end(), nameL.begin(), [](
unsigned char c) { return std::tolower(c); });
462 const pair<const MString, MProperty*> mpL(nameL, p);
468 "There are multiple occurrences of the property " + p->name
469 +
" with different cases. This should not happen!");
499 std::transform(nameL.begin(), nameL.end(), nameL.begin(), [](
unsigned char c) { return std::tolower(c); });
500 if(nameL ==
"postprocessing") {
504 if(existsCaseInsensitive) {
507 +
" not found, but there was a case-insensitive match. Are you sure you spelled it correctly?");
523 if(i->second->solverId == solverId) {
542 if(i->second->solverId == solverId) {
543 return i->second->count();
550 return i->second->count();
561 if(propLength != length) {
562 const MString isSolver = (solverId !=
m_noSolvers) ?
" for solver #" + std::to_string(solverId) :
"";
563 TERMM(1,
"Property '" + name +
"'" + isSolver +
" has the wrong length, it is of length "
580 if(i->second->solverId == solverId) {
581 return i->second->solverId;
588 return i->second->solverId;
607#ifdef MAIA_WRITE_ACCESS_PROPERTIES_FILE
608 maia_properties.close();
614 MInt maxNameLength, maxElementLength;
615 maxNameLength = maxElementLength = 0;
616 fprintf(datei,
"\n\n--------------------------property table--------------------------\n");
618 if(maxNameLength < ((
MInt)i.first.length())) {
619 maxNameLength = i.first.length();
621 for(
MInt j = 0; j < i.second->count(); j++) {
622 switch(i.second->type()) {
624 sprintf(buffer,
"%i", *i.second->asBool(j));
625 tester.append(buffer);
629 sprintf(buffer,
"%i", *i.second->asInt(j));
630 tester.append(buffer);
634 sprintf(buffer,
"%G", *i.second->asFloat(j));
635 tester.append(buffer);
639 tester.append(*i.second->asString(j));
644 mTerm(1, AT_,
"writePropertiesHumanReadable(): switch variable 'i->second->type' not matching any case");
649 if(maxElementLength < ((
MInt)tester.length())) {
650 maxElementLength = tester.length();
654 maxNameLength = maxNameLength + 1;
657 switch(i.second->type()) {
659 fprintf(datei,
"%s ",
"bool");
660 fprintf(datei,
"%s", i.first.c_str());
661 for(
MInt j = 0; j < ((
MInt)(maxNameLength - i.first.length())); j++)
663 fprintf(datei,
"= ");
664 for(
MInt j = 0; j < i.second->count(); j++) {
665 sprintf(buffer,
"%i; ", *i.second->asBool(j));
666 tester.append(buffer);
667 fprintf(datei,
"%i; ", i.second->boolField[j]);
669 for(
MInt k = 0; k < ((
MInt)(maxElementLength - tester.length())); k++)
674 fprintf(datei,
"%s ",
"int");
675 fprintf(datei,
"%s", i.first.c_str());
676 for(
MInt j = 0; j < ((
MInt)(maxNameLength - i.first.length())); j++)
678 fprintf(datei,
"= ");
679 for(
MInt j = 0; j < i.second->count(); j++) {
680 sprintf(buffer,
"%i; ", *i.second->asInt(j));
681 tester.append(buffer);
682 fprintf(datei,
"%i; ", i.second->intField[j]);
684 for(
MInt k = 0; k < ((
MInt)(maxElementLength - tester.length())); k++)
689 fprintf(datei,
"%s ",
"double");
690 fprintf(datei,
"%s", i.first.c_str());
691 for(
MInt j = 0; j < ((
MInt)(maxNameLength - i.first.length())); j++)
693 fprintf(datei,
"= ");
694 for(
MInt j = 0; j < i.second->count(); j++) {
695 sprintf(buffer,
"%G; ", *i.second->asFloat(j));
696 tester.append(buffer);
697 fprintf(datei,
"%G; ", i.second->floatField[j]);
699 for(
MInt k = 0; k < ((
MInt)(maxElementLength - tester.length())); k++)
704 fprintf(datei,
"%s ",
"char");
705 fprintf(datei,
"%s", i.first.c_str());
706 for(
MInt j = 0; j < ((
MInt)(maxNameLength - i.first.length())); j++)
708 fprintf(datei,
"= ");
709 for(
MInt j = 0; j < i.second->count(); j++) {
710 tester.append(*i.second->asString(j));
711 fprintf(datei,
"\"%s\"; ", i.second->asString(j)->c_str());
713 for(
MInt k = 0; k < ((
MInt)(maxElementLength - tester.length() - 4)); k++)
719 fprintf(datei,
"--------------ERROR--------------");
720 fprintf(datei,
"\n");
721 fprintf(datei,
"Undefined type of Property: ");
722 fprintf(datei,
"%s =", i.first.c_str());
723 fprintf(datei,
"\n");
727 const MInt solverId = (i.second->solverId <
m_noSolvers) ? i.second->solverId : -1;
728 fprintf(datei,
"SolverId %2i", solverId);
729 fprintf(datei,
" Accesses %i", i.second->noAccesses);
730 fprintf(datei,
" OldAccesses %i",
731 i.second->noOldAccesses);
732 fprintf(datei,
"\n");
748#ifdef MAIA_WRITE_ACCESS_PROPERTIES_FILE
749 maia_properties << endl <<
"--------------------------initialization process finshed--------------------------";
750 maia_properties << endl
751 <<
"--------------------------property access not allowed anymore--------------------------" << endl
776 NEW_TIMER_GROUP_STATIC(m_timerGroupId,
"Context");
777 NEW_TIMER(timerpcheck,
"Property Validity Check", m_timerGroupId);
778 RECORD_TIMER_START(timerpcheck);
780 m_log <<
"==============================================================" << endl;
781 m_log <<
" Checking property validity... ";
782#ifdef MAIA_WRITE_ACCESS_PROPERTIES_FILE
783 maia_properties <<
"==============================================================" << endl;
784 maia_properties <<
" Checking property validity... ";
811 MInt comm_partner = 0;
813 list<MProperty*>* left =
nullptr;
814 list<MProperty*>* right =
nullptr;
836 m_log <<
" ---> EVERYTHING IS FINE!!!!" << endl;
837 m_log <<
"==============================================================" << endl;
838#ifdef MAIA_WRITE_ACCESS_PROPERTIES_FILE
839 maia_properties <<
" ---> EVERYTHING IS FINE!!!!" << endl;
840 maia_properties <<
"==============================================================" << endl;
842 RECORD_TIMER_STOP(timerpcheck);
876 MPI_Recv(listSizes, 10, MPI_INT, rank, tag, MPI_COMM_WORLD, &status, AT_,
"listSizes");
879 auto* int_ar =
new MInt[listSizes[0]];
880 MPI_Recv(int_ar, listSizes[0], MPI_INT, rank, tag, MPI_COMM_WORLD, &status, AT_,
"int_ar");
883 auto* bool_ar =
new MBool[listSizes[1]];
884 MPI_Recv(bool_ar, listSizes[1], MPI_C_BOOL, rank, tag, MPI_COMM_WORLD, &status, AT_,
"bool_ar");
887 auto* float_ar =
new MFloat[listSizes[2]];
888 MPI_Recv(float_ar, listSizes[2], MPI_DOUBLE, rank, tag, MPI_COMM_WORLD, &status, AT_,
"float_ar");
892 MPI_Recv(char_ar, listSizes[3], MPI_CHAR, rank, tag, MPI_COMM_WORLD, &status, AT_,
"char_ar");
896 MPI_Recv(char_ar2, listSizes[4], MPI_CHAR, rank, tag, MPI_COMM_WORLD, &status, AT_,
"char_ar2");
899 MInt offset_sizes = listSizes[5] + listSizes[6] + listSizes[7] + listSizes[8] + listSizes[9];
900 auto* offset =
new MInt[offset_sizes];
901 MPI_Recv(offset, offset_sizes, MPI_INT, rank, tag, MPI_COMM_WORLD, &status, AT_,
"offset");
904 auto* solverIds =
new MInt[listSizes[9]];
905 MPI_Recv(solverIds, listSizes[9], MPI_INT, rank, tag, MPI_COMM_WORLD, &status, AT_,
"solverIds");
908 auto* proplist =
new list<MProperty*>();
910 MInt boolOffset = listSizes[5];
911 MInt floatOffset = listSizes[5] + listSizes[6];
912 MInt stringOffset = listSizes[5] + listSizes[6] + listSizes[7];
913 MInt nameOffset = listSizes[5] + listSizes[6] + listSizes[7] + listSizes[8];
917 for(; i < boolOffset; i++) {
919 MInt low_off_name = 0;
921 low_off = offset[i - 1];
922 low_off_name = offset[nameOffset + i - 1];
925 auto*
a =
new MInt[offset[i] - low_off];
926 for(
MInt j = low_off, l = 0; j < offset[i]; j++, l++) {
931 for(
MInt j = low_off_name; j < offset[nameOffset + i]; j++) {
936 proplist->push_back(prop);
941 for(; i < floatOffset; i++) {
943 MInt low_off_name = offset[nameOffset + i - 1];
945 low_off = offset[i - 1];
949 auto*
a =
new MBool[offset[i] - low_off];
950 for(
MInt j = low_off, l = 0; j < offset[i]; j++, l++) {
955 for(
MInt j = low_off_name; j < offset[nameOffset + i]; j++) {
960 proplist->push_back(prop);
965 for(; i < stringOffset; i++) {
967 MInt low_off_name = offset[nameOffset + i - 1];
968 if(i > floatOffset) low_off = offset[i - 1];
971 auto*
a =
new MFloat[offset[i] - low_off];
972 for(
MInt j = low_off, l = 0; j < offset[i]; j++, l++) {
977 for(
MInt j = low_off_name; j < offset[nameOffset + i]; j++)
981 proplist->push_back(prop);
986 for(; i < nameOffset; i++) {
988 MInt low_off_name = offset[nameOffset + i - 1];
989 if(i > stringOffset) low_off = offset[i - 1];
992 for(
MInt j = low_off, l = 0; j < offset[i]; j++, l++)
996 for(
MInt j = low_off_name; j < offset[nameOffset + i]; j++)
1000 proplist->push_back(prop);
1058 MInt listSizes[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
1060 list<MProperty*> intProperties;
1061 list<MProperty*> floatProperties;
1062 list<MProperty*> stringProperties;
1063 list<MProperty*> boolProperties;
1066 switch(i.second->type()) {
1068 intProperties.push_back(i.second);
1069 listSizes[0] += (i.second->elements);
1074 boolProperties.push_back(i.second);
1075 listSizes[1] += (i.second->elements);
1080 floatProperties.push_back(i.second);
1081 listSizes[2] += (i.second->elements);
1086 stringProperties.push_back(i.second);
1087 listSizes[3] += (i.second->stringField->size());
1092 mTerm(1, AT_,
"Context::sendProperties(): switch variable 'i->second->type' not matching any case");
1095 listSizes[4] += (i.second->name.size());
1099 MInt offset_sizes = listSizes[5] + listSizes[6] + listSizes[7] + listSizes[8] + listSizes[9];
1101 auto* offset =
new MInt[offset_sizes];
1102 auto* solverIds =
new MInt[listSizes[9]];
1111 auto* int_ar =
new MInt[listSizes[0]];
1112 MInt k = 0, m = 0, n = 0;
1113 for(
auto& intPropertie : intProperties) {
1114 for(
MInt j = 0; j < intPropertie->elements; j++) {
1115 int_ar[k] = intPropertie->intField[j];
1119 solverIds[m] = intPropertie->solverId;
1124 auto* bool_ar =
new MBool[listSizes[1]];
1126 for(
auto& boolPropertie : boolProperties) {
1127 for(
MInt j = 0; j < boolPropertie->elements; j++) {
1128 bool_ar[k] = boolPropertie->boolField[j];
1134 solverIds[m] = boolPropertie->solverId;
1139 auto* float_ar =
new MFloat[listSizes[2]];
1141 for(
auto& floatPropertie : floatProperties) {
1142 for(
MInt j = 0; j < floatPropertie->elements; j++) {
1143 float_ar[k] = floatPropertie->floatField[j];
1148 solverIds[m] = floatPropertie->solverId;
1155 for(
auto& stringPropertie : stringProperties) {
1156 MString a = *(stringPropertie->asString());
1157 for(
MInt j = 0; j < (
MInt)
a.size(); j++) {
1162 solverIds[m] = stringPropertie->solverId;
1169 for(
auto& intPropertie : intProperties) {
1178 for(
auto& boolPropertie : boolProperties) {
1187 for(
auto& floatPropertie : floatProperties) {
1196 for(
auto& stringPropertie : stringProperties) {
1208 MPI_Send(listSizes, 10, MPI_INT, rank, tag, MPI_COMM_WORLD, AT_,
"listSizes");
1211 MPI_Send(int_ar, listSizes[0], MPI_INT, rank, tag, MPI_COMM_WORLD, AT_,
"int_ar");
1214 MPI_Send(bool_ar, listSizes[1], MPI_C_BOOL, rank, tag, MPI_COMM_WORLD, AT_,
"bool_ar");
1217 MPI_Send(float_ar, listSizes[2], MPI_DOUBLE, rank, tag, MPI_COMM_WORLD, AT_,
"float_ar");
1220 MPI_Send(char_ar, listSizes[3], MPI_CHAR, rank, tag, MPI_COMM_WORLD, AT_,
"char_ar");
1223 MPI_Send(char_ar2, listSizes[4], MPI_CHAR, rank, tag, MPI_COMM_WORLD, AT_,
"char_ar2");
1226 MPI_Send(offset, offset_sizes, MPI_INT, rank, tag, MPI_COMM_WORLD, AT_,
"offset");
1229 MPI_Send(solverIds, listSizes[9], MPI_INT, rank, tag, MPI_COMM_WORLD, AT_,
"solverIds");
1239 intProperties.clear();
1240 floatProperties.clear();
1241 stringProperties.clear();
1242 boolProperties.clear();
1259 MInt defaultInt = -1;
1260 MFloat defaultFloat = -1.0;
1261 MBool defaultBool =
false;
1270 for(
auto& it : *prop) {
1272 switch(it->type()) {
1274 for(
MInt j = 0; j < it->elements; j++) {
1275 if(*(it->asInt(j)) != getSolverProperty<MInt>(it->name, it->solverId, AT_, &defaultInt, j)
1277 stringstream errorMessage;
1279 errorMessage <<
"Poperty violation for '" << it->name <<
"' on CPUs: " << rank <<
"," << partnerrank;
1285 mTerm(1, AT_, errorMessage.str());
1291 for(
MInt j = 0; j < it->elements; j++) {
1292 if(*(it->asBool(j)) != getSolverProperty<MBool>(it->name, it->solverId, AT_, &defaultBool, j)
1294 stringstream errorMessage;
1295 errorMessage <<
"Poperty violation for '" << it->name <<
"' on CPUs: " << rank <<
"," << partnerrank;
1296 mTerm(1, AT_, errorMessage.str());
1302 for(
MInt j = 0; j < it->elements; j++) {
1303 if(!
approx(*(it->asFloat(j)), getSolverProperty<MFloat>(it->name, it->solverId, AT_, &defaultFloat, j),
1306 stringstream errorMessage;
1307 errorMessage <<
"Poperty violation for '" << it->name <<
"' on CPUs: " << rank <<
"," << partnerrank;
1308 mTerm(1, AT_, errorMessage.str());
1314 for(
MInt j = 0; j < it->elements; j++) {
1315 if(*(it->asString(j)) != getSolverProperty<MString>(it->name, it->solverId, AT_, &defaultString, j)
1317 stringstream errorMessage;
1318 errorMessage <<
"Poperty violation for '" << it->name <<
"' on CPUs: " << rank <<
"," << partnerrank;
1319 mTerm(1, AT_, errorMessage.str());
1325 mTerm(1, AT_,
"Context::CheckPropertyViolation(): switch variable '(*it)->type' not matching any case");
1330 switch(it->type()) {
1332 a =
new MProperty(it->elements, it->name, it->solverId, it->intField);
1336 a =
new MProperty(it->elements, it->name, it->solverId, it->boolField);
1340 a =
new MProperty(it->elements, it->name, it->solverId, it->floatField);
1344 a =
new MProperty(it->elements, it->name, it->solverId, it->stringField);
1363 ofstream os(fileName);
1365 const auto name = pm.first;
1366 const auto prop = pm.second;
1368 switch(prop->propertyType) {
1382 TERMM(1,
"Bad type");
1385 for(
MInt i = 0; i < prop->count(); i++) {
1389 switch(prop->propertyType) {
1391 os << prop->intField[i];
1394 os << prop->floatField[i];
1397 os << prop->stringField[i];
1400 os << prop->boolField[i];
1403 TERMM(1,
"Bad type");
BinaryTreeIntNode * getMyMPIReceiver()
BinaryTreeIntNode * getMyLeftMPISender()
BinaryTreeIntNode * getMyRightMPISender()
static void communicateProperties()
Communicates properties to check if default falues match.
static MBool m_checkingProperties
static propertyMap * m_propertyMapLowercase
static void initializationProcessFinished()
Sets flag to forbide property access.
static MString m_propertyFileText
static void dump(const MString &fileName)
Dump all properties to text file.
static void init()
This intializes the property Map.
static void sendProperties(MInt rank)
Sends the property list to another cpu.
static void checkPropertyViolation(MInt partnerrank, std::list< MProperty * > *prop)
Checks if local properties differ from received properties.
static MInt propertySolverId(const MString &name, MInt solverId=m_noSolvers)
Returns the number of elements of a property.
static MInt propertyLength(const MString &name, MInt solverId=m_noSolvers)
Returns the number of elements of a property.
static std::pair< propertyMap::iterator, propertyMap::iterator > m_pair
static MInt getSolverPropertyOverloaded(const MString &nameOfCallingFunction, const MString &name, const MInt solverId, MBool has_default, const MInt *default_value, MInt pos)
static IONetcdf * m_IONetcdf
static MInt getBasicPropertyOverloaded(const MString &nameOfCallingFunction, const MString &name, MBool has_default, const MInt *default_value, MInt pos)
static void addProperty(MProperty *)
This method adds properties.
static void writePropertiesHumanReadable()
Write the properties into a text file.
static assembly * m_assembly
static T getBasicPropertyImplicit(const MString &nameOfCallingFunction, const MString &name, MBool has_default, const T *defaultValue, MInt position, F &&f)
Returns the value of the requested basic level property (implicit).
static void readPropertyFile(FileType, const MString &fileName)
static void assertPropertyLength(const MString &name, const MInt length, const MInt solverId=m_noSolvers)
Assert that the length of a property matches the given length.
static MBool solverPropertyExists(const MString &name, MInt solver)
Checks existence of a solver property details This function returns true, if the solver property with...
static T getSolverPropertyImplicit(const MString &nameOfCallingFunction, const MString &name, const MInt solverId, MBool has_default, const T *defaultValue, MInt position, F &&f)
Returns the value of the requested solver property (implicit).
static zoneMap * m_zoneMap
static MBool propertyExists(const MString &name, MInt solver=m_noSolvers)
This function checks if a property exists in general.
static propertyMap * m_propertyMap
static std::list< MProperty * > * receiveProperties(MInt rank)
Receives a property list from another cpu.
static MString m_propertyFileOutputName
static MBool isSameValue(const MFloat v1, const MFloat v2)
assembly * readPropertyFile(const MString &fileName)
assembly * readPropertyFile(const MString &fileName)
std::map< MString, MZone * > zoneMap
zoneMap::const_iterator zoneIterator
std::multimap< MString, MProperty * > propertyMap
propertyMap::const_iterator propertyIterator
void mTerm(const MInt errorCode, const MString &location, const MString &message)
MBool fileExists(const MString &fileName)
Returns true if the file fileName exists, false otherwise.
MBool approx(const T &, const U &, const T)
MInt globalNoDomains()
Return global number of domains.
MInt globalDomainId()
Return global domain id.
std::basic_string< char > MString
int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status *status, const MString &name, const MString &varname)
same as MPI_Recv
int MPI_Barrier(MPI_Comm comm, const MString &name)
same as MPI_Barrier
int MPI_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, const MString &name, const MString &varname)
same as MPI_Send
propertyMap * propertiesLowercase