[1D] Save and restore grid refinement parameters
This commit is contained in:
parent
302ebb2c7e
commit
86ce3da4ef
1 changed files with 14 additions and 0 deletions
|
|
@ -909,6 +909,13 @@ void StFlow::restore(const XML_Node& dom, doublereal* soln, int loglevel)
|
|||
int2str(x.size()) + "but should be length" +
|
||||
int2str(m_nsp));
|
||||
}
|
||||
|
||||
if (dom.hasChild("refine_criteria")) {
|
||||
XML_Node& ref = dom.child("refine_criteria");
|
||||
refiner().setCriteria(getFloat(ref, "ratio"), getFloat(ref, "slope"),
|
||||
getFloat(ref, "curve"), getFloat(ref, "prune"));
|
||||
refiner().setGridMin(getFloat(ref, "grid_min"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -967,6 +974,13 @@ XML_Node& StFlow::save(XML_Node& o, const doublereal* const sol)
|
|||
}
|
||||
addNamedFloatArray(flow, "species_enabled", m_nsp, &values[0]);
|
||||
|
||||
XML_Node& ref = flow.addChild("refine_criteria");
|
||||
addFloat(ref, "ratio", refiner().maxRatio());
|
||||
addFloat(ref, "slope", refiner().maxDelta());
|
||||
addFloat(ref, "curve", refiner().maxSlope());
|
||||
addFloat(ref, "prune", refiner().prune());
|
||||
addFloat(ref, "grid_min", refiner().gridMin());
|
||||
|
||||
return flow;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue