Refine Domain1D grids so that profiles satisfy adaptation tolerances.
More...
#include <refine.h>
Refine Domain1D grids so that profiles satisfy adaptation tolerances.
Definition at line 16 of file refine.h.
|
| Refiner (Domain1D &domain) |
|
| Refiner (const Refiner &)=delete |
|
Refiner & | operator= (const Refiner &)=delete |
|
void | setCriteria (double ratio=10.0, double slope=0.8, double curve=0.8, double prune=-0.1) |
| Set grid refinement criteria.
|
|
vector< double > | getCriteria () |
| Get the grid refinement criteria.
|
|
void | setActive (int comp, bool state=true) |
|
void | setMaxPoints (int npmax) |
| Set the maximum number of points allowed in the domain.
|
|
size_t | maxPoints () const |
| Returns the maximum number of points allowed in the domain.
|
|
void | setGridMin (double gridmin) |
| Set the minimum allowable spacing between adjacent grid points [m].
|
|
double | gridMin () const |
| Returns the the minimum allowable spacing between adjacent grid points [m].
|
|
int | analyze (size_t n, const double *z, const double *x) |
|
int | getNewGrid (int n, const double *z, int nn, double *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 () |
|
◆ Refiner()
◆ ~Refiner()
◆ setCriteria()
void setCriteria |
( |
double |
ratio = 10.0 , |
|
|
double |
slope = 0.8 , |
|
|
double |
curve = 0.8 , |
|
|
double |
prune = -0.1 |
|
) |
| |
Set grid refinement criteria.
- Parameters
-
ratio | Maximum ratio between grid spacing at adjacent intervals. That is, (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 21 of file refine.cpp.
◆ getCriteria()
vector< double > getCriteria |
( |
| ) |
|
|
inline |
◆ setActive()
void setActive |
( |
int |
comp, |
|
|
bool |
state = true |
|
) |
| |
|
inline |
◆ setMaxPoints()
void setMaxPoints |
( |
int |
npmax | ) |
|
|
inline |
Set the maximum number of points allowed in the domain.
Definition at line 52 of file refine.h.
◆ maxPoints()
size_t maxPoints |
( |
| ) |
const |
|
inline |
Returns the maximum number of points allowed in the domain.
Definition at line 57 of file refine.h.
◆ setGridMin()
void setGridMin |
( |
double |
gridmin | ) |
|
|
inline |
Set the minimum allowable spacing between adjacent grid points [m].
Definition at line 62 of file refine.h.
◆ gridMin()
Returns the the minimum allowable spacing between adjacent grid points [m].
Definition at line 68 of file refine.h.
◆ analyze()
int analyze |
( |
size_t |
n, |
|
|
const double * |
z, |
|
|
const double * |
x |
|
) |
| |
◆ getNewGrid()
int getNewGrid |
( |
int |
n, |
|
|
const double * |
z, |
|
|
int |
nn, |
|
|
double * |
znew |
|
) |
| |
◆ nNewPoints()
◆ show()
◆ newPointNeeded()
bool newPointNeeded |
( |
size_t |
j | ) |
|
|
inline |
◆ keepPoint()
bool keepPoint |
( |
size_t |
j | ) |
|
|
inline |
◆ value()
double value |
( |
const double * |
x, |
|
|
size_t |
i, |
|
|
size_t |
j |
|
) |
| |
◆ maxRatio()
◆ maxDelta()
◆ maxSlope()
◆ prune()
◆ m_loc
Indices of grid points that need new grid points added after them.
Definition at line 101 of file refine.h.
◆ m_keep
◆ m_c
Names of components that require the addition of new grid points.
Definition at line 104 of file refine.h.
◆ m_active
◆ m_ratio
◆ m_slope
◆ m_curve
◆ m_prune
◆ m_min_range
double m_min_range = 0.01 |
|
protected |
◆ m_domain
◆ m_nv
◆ m_npmax
◆ m_thresh
double m_thresh = std::sqrt(std::numeric_limits<double>::epsilon()) |
|
protected |
◆ m_gridmin
minimum grid spacing [m]
Definition at line 115 of file refine.h.
The documentation for this class was generated from the following files: