Cantera
2.2.1
|
Refine Domain1D grids so that profiles satisfy adaptation tolerances. More...
#include <refine.h>
Public Member Functions | |
Refiner (Domain1D &domain) | |
void | setCriteria (doublereal ratio=10.0, doublereal slope=0.8, doublereal curve=0.8, doublereal prune=-0.1) |
Set grid refinement criteria. More... | |
void | setActive (int comp, bool state=true) |
void | setMaxPoints (int npmax) |
Set the maximum number of points allowed in the domain. More... | |
void | setGridMin (double gridmin) |
Set the minimum allowable spacing between adjacent grid points [m]. More... | |
double | gridMin () const |
Returns the the minimum allowable spacing between adjacent grid points [m]. More... | |
int | analyze (size_t n, const doublereal *z, const doublereal *x) |
int | getNewGrid (int n, const doublereal *z, int nn, doublereal *znew) |
int | nNewPoints () |
void | show () |
bool | newPointNeeded (size_t j) |
bool | keepPoint (size_t j) |
double | value (const double *x, size_t i, size_t j) |
double | maxRatio () |
double | maxDelta () |
double | maxSlope () |
double | prune () |
Protected Attributes | |
std::map< size_t, int > | m_loc |
std::map< size_t, int > | m_keep |
std::map< std::string, int > | m_c |
std::vector< bool > | m_active |
doublereal | m_ratio |
doublereal | m_slope |
doublereal | m_curve |
doublereal | m_prune |
doublereal | m_min_range |
Domain1D * | m_domain |
size_t | m_nv |
size_t | m_npmax |
doublereal | m_thresh |
doublereal | m_gridmin |
minimum grid spacing [m] More... | |
Refine Domain1D grids so that profiles satisfy adaptation tolerances.
void setCriteria | ( | doublereal | ratio = 10.0 , |
doublereal | slope = 0.8 , |
||
doublereal | curve = 0.8 , |
||
doublereal | prune = -0.1 |
||
) |
Set grid refinement criteria.
ratio | Maximum ratio between grid spacing at adjacent intervals. E.g. (x[j+1] - x[j]) / (x[j] - x[j-1]) < ratio |
slope | Maximum fractional change in the value of each solution component between adjacent grid points |
curve | Maximum fractional change in the derivative of each solution component between adjacent grid points. |
prune | Threshold for removing unnecessary grid points. prune should be smaller than both slope and curve . Set prune <= 0 to disable pruning. |
Definition at line 19 of file refine.cpp.
References Cantera::fp2str().
Referenced by StFlow::restore(), and Sim1D::setRefineCriteria().
|
inline |
|
inline |
Set the minimum allowable spacing between adjacent grid points [m].
Definition at line 46 of file refine.h.
References Refiner::m_gridmin.
Referenced by StFlow::restore(), and Sim1D::setGridMin().
|
inline |
Returns the the minimum allowable spacing between adjacent grid points [m].
Definition at line 52 of file refine.h.
References Refiner::m_gridmin.
|
protected |
minimum grid spacing [m]
Definition at line 93 of file refine.h.
Referenced by Refiner::gridMin(), and Refiner::setGridMin().