Added: Attribute default="x" on the <nGauss> input tag,

to specify the default Gauss scheme, relative to the actual polynomial order
This commit is contained in:
Knut Morten Okstad 2018-04-05 15:57:09 +02:00
parent 3c4cde49f0
commit 9db398f095

View File

@ -120,13 +120,18 @@ bool SIMoptions::parseDiscretizationTag (const TiXmlElement* elem)
discretization = ASM::LRSpline;
}
else if (!strcasecmp(elem->Value(),"nGauss") && elem->FirstChild()) {
else if (!strcasecmp(elem->Value(),"nGauss")) {
int defaultG = 0;
if (utl::getAttribute(elem,"default",defaultG))
nGauss[0] = nGauss[1] = defaultG > 0 ? 10+defaultG : defaultG;
else if (elem->FirstChild()) {
std::string value(elem->FirstChild()->Value());
char* cval = strtok(const_cast<char*>(value.c_str())," ");
for (int i = 0; i < 2 && cval; i++, cval = strtok(nullptr," "))
for (int j = i; j < 2; j++)
nGauss[j] = atoi(cval);
}
}
return true;
}
@ -409,7 +414,8 @@ utl::LogStream& SIMoptions::print (utl::LogStream& os, bool addBlankLine) const
if (format >= 0) {
os <<"\nVTF file format: "<< (format ? "BINARY":"ASCII")
<<"\nNumber of visualization points: "<< nViz[0];
for (int j = 1; j < 3 && nViz[j] > 1; j++) os <<" "<< nViz[j];
for (int j = 1; j < 3 && nViz[j] > 1; j++)
os <<" "<< nViz[j];
}
if (!hdf5.empty())