106 int analyze(
size_t n,
const double* z,
const double* x);
129 int getNewGrid(
int n,
const double* z,
int nn,
double* znew);
163 return (
m_keep[j] != REMOVE);
173 double value(
const double* x,
size_t n,
size_t j);
200 enum GridPointStatus {
231 double m_thresh = std::sqrt(std::numeric_limits<double>::epsilon());
Base class for one-dimensional domains.
Refine Domain1D grids so that profiles satisfy adaptation tolerances.
double maxSlope()
Returns the maximum allowable difference in the derivative between adjacent points.
double value(const double *x, size_t n, size_t j)
Returns the value of the solution component, n, at grid point j.
set< string > m_componentNames
Names of components that require the addition of new grid points.
bool newPointNeeded(size_t j)
Returns true if a new grid point is needed to the right of grid index j.
size_t maxPoints() const
Returns the maximum number of points allowed in the domain.
void setActive(int comp, bool state=true)
Set the active state for a component.
double m_thresh
Absolute tolerance threshold for solution components in the domain.
double m_ratio
grid spacing refinement criteria
int nNewPoints()
Returns the number of new grid points that were needed.
void show()
Displays the results of the grid refinement analysis.
size_t m_nv
Number of components in the domain.
double maxRatio()
Returns the maximum allowable ratio of grid spacing between adjacent intervals.
vector< double > getCriteria()
Get the grid refinement criteria.
double m_prune
pruning refinement criteria
double m_min_range
Threshold for ignoring small changes around a constant during refinement.
double maxDelta()
Returns the maximum allowable difference in value between adjacent points.
void setMaxPoints(int npmax)
Set the maximum number of points allowed in the domain.
set< size_t > m_insertPts
Indices of grid points that need new grid points added after them.
void setCriteria(double ratio=10.0, double slope=0.8, double curve=0.8, double prune=-0.1)
Set grid refinement criteria.
double m_curve
function slope refinement criteria
vector< bool > m_active
Flags for whether each component should be considered for grid refinement.
size_t m_npmax
Maximum number of grid points.
int analyze(size_t n, const double *z, const double *x)
Determine locations in the grid that need additional grid points and update the internal state of the...
bool keepPoint(size_t j)
Returns true if the grid point at index j should be kept.
double gridMin() const
Returns the the minimum allowable spacing between adjacent grid points [m].
double m_slope
function change refinement criteria
double prune()
Returns the threshold for removing unnecessary grid points.
double m_gridmin
minimum grid spacing [m]
int getNewGrid(int n, const double *z, int nn, double *znew)
Constructs a new grid based on refinement locations determined by the analyze() method.
map< size_t, GridPointStatus > m_keep
Status of whether each grid point should be kept or removed.
void setGridMin(double gridmin)
Set the minimum allowable spacing between adjacent grid points [m].
Domain1D * m_domain
Pointer to the domain to be refined.
This file contains definitions of constants, types and terms that are used in internal routines and a...
Namespace for the Cantera kernel.