[1D] Adds getRefineCriteria function
This commit is contained in:
parent
572af616e7
commit
bce4210e1b
3 changed files with 24 additions and 0 deletions
|
|
@ -139,6 +139,13 @@ public:
|
||||||
void setRefineCriteria(int dom = -1, doublereal ratio = 10.0,
|
void setRefineCriteria(int dom = -1, doublereal ratio = 10.0,
|
||||||
doublereal slope = 0.8, doublereal curve = 0.8, doublereal prune = -0.1);
|
doublereal slope = 0.8, doublereal curve = 0.8, doublereal prune = -0.1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the grid refinement criteria. dom must be greater than
|
||||||
|
* or equal to zero (i.e., the domain must be specified).
|
||||||
|
* @see Refiner::getCriteria
|
||||||
|
*/
|
||||||
|
vector_fp getRefineCriteria(int dom);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the maximum number of grid points in the domain. If dom >= 0,
|
* Set the maximum number of grid points in the domain. If dom >= 0,
|
||||||
* then the settings apply only to the specified domain. If dom < 0,
|
* then the settings apply only to the specified domain. If dom < 0,
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,12 @@ public:
|
||||||
doublereal curve = 0.8,
|
doublereal curve = 0.8,
|
||||||
doublereal prune = -0.1);
|
doublereal prune = -0.1);
|
||||||
|
|
||||||
|
//! Get the grid refinement criteria. @see Refiner::setCriteria
|
||||||
|
vector_fp getCriteria()
|
||||||
|
{
|
||||||
|
return {m_ratio, m_slope, m_curve, m_prune};
|
||||||
|
}
|
||||||
|
|
||||||
void setActive(int comp, bool state = true) {
|
void setActive(int comp, bool state = true) {
|
||||||
m_active[comp] = state;
|
m_active[comp] = state;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -525,6 +525,17 @@ void Sim1D::setRefineCriteria(int dom, doublereal ratio,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vector_fp Sim1D::getRefineCriteria(int dom)
|
||||||
|
{
|
||||||
|
if (dom >= 0) {
|
||||||
|
Refiner& r = domain(dom).refiner();
|
||||||
|
return r.getCriteria();
|
||||||
|
} else {
|
||||||
|
throw CanteraError("Sim1D::getRefineCriteria",
|
||||||
|
"Must specify domain to get criteria from");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Sim1D::setGridMin(int dom, double gridmin)
|
void Sim1D::setGridMin(int dom, double gridmin)
|
||||||
{
|
{
|
||||||
if (dom >= 0) {
|
if (dom >= 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue