| Cantera 3.0.0

Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
Refiner Class Reference
One-Dimensional Reacting Flows » Utilities

Refine Domain1D grids so that profiles satisfy adaptation tolerances. More...

`#include <refine.h>`

## Detailed Description

Refine Domain1D grids so that profiles satisfy adaptation tolerances.

Definition at line 16 of file refine.h.

## Public Member Functions
| 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 ()

## Protected Attributes
set< size_t > | m_loc
| Indices of grid points that need new grid points added after them.
map< size_t, int > | m_keep
set< string > | m_c
| Names of components that require the addition of new grid points.
vector< bool > | m_active
double | m_ratio = 10.0
double | m_slope = 0.8
double | m_curve = 0.8
double | m_prune = -0.001
double | m_min_range = 0.01
Domain1D * | m_domain
size_t | m_nv
size_t | m_npmax = 1000
double | m_thresh = std::sqrt(std::numeric_limits<double>::epsilon())
double | m_gridmin = 1e-10
| minimum grid spacing [m]

## Constructor & Destructor Documentation

## ◆ Refiner()

Refiner | ( | Domain1D & | domain | ) |

Definition at line 14 of file refine.cpp.

## ◆ ~Refiner()

virtual ~Refiner | ( |  | ) |
| inline virtual

Definition at line 20 of file refine.h.

## Member Function Documentation

## ◆ 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

Get the grid refinement criteria.

See also
  Refiner::setCriteria

Definition at line 42 of file refine.h.

## ◆ setActive()

void setActive | ( | int | comp,
|  | bool | state = `true`
| ) |  |
| inline

Definition at line 47 of file refine.h.

## ◆ 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()

double gridMin | ( |  | ) | const
| inline

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
| ) |  |

Definition at line 43 of file refine.cpp.

## ◆ getNewGrid()

int getNewGrid | ( | int | n,
|  | const double * | z,
|  | int | nn,
|  | double * | znew
| ) |  |

Definition at line 227 of file refine.cpp.

## ◆ nNewPoints()

int nNewPoints | ( |  | ) |
| inline

Definition at line 74 of file refine.h.

## ◆ show()

void show | ( |  | ) |

Definition at line 205 of file refine.cpp.

## ◆ newPointNeeded()

bool newPointNeeded | ( | size_t | j | ) |
| inline

Definition at line 78 of file refine.h.

## ◆ keepPoint()

bool keepPoint | ( | size_t | j | ) |
| inline

Definition at line 81 of file refine.h.

## ◆ value()

double value | ( | const double * | x,
|  | size_t | i,
|  | size_t | j
| ) |  |

Definition at line 200 of file refine.cpp.

## ◆ maxRatio()

double maxRatio | ( |  | ) |
| inline

Definition at line 86 of file refine.h.

## ◆ maxDelta()

double maxDelta | ( |  | ) |
| inline

Definition at line 89 of file refine.h.

## ◆ maxSlope()

double maxSlope | ( |  | ) |
| inline

Definition at line 92 of file refine.h.

## ◆ prune()

double prune | ( |  | ) |
| inline

Definition at line 95 of file refine.h.

## Member Data Documentation

## ◆ m_loc

set<size_t> m_loc
| protected

Indices of grid points that need new grid points added after them.

Definition at line 101 of file refine.h.

## ◆ m_keep

map<size_t, int> m_keep
| protected

Definition at line 102 of file refine.h.

## ◆ m_c

set<string> m_c
| protected

Names of components that require the addition of new grid points.

Definition at line 104 of file refine.h.

## ◆ m_active

vector<bool> m_active
| protected

Definition at line 105 of file refine.h.

## ◆ m_ratio

double m_ratio = 10.0
| protected

Definition at line 106 of file refine.h.

## ◆ m_slope

double m_slope = 0.8
| protected

Definition at line 107 of file refine.h.

## ◆ m_curve

double m_curve = 0.8
| protected

Definition at line 108 of file refine.h.

## ◆ m_prune

double m_prune = -0.001
| protected

Definition at line 109 of file refine.h.

## ◆ m_min_range

double m_min_range = 0.01
| protected

Definition at line 110 of file refine.h.

## ◆ m_domain

Domain1D* m_domain
| protected

Definition at line 111 of file refine.h.

## ◆ m_nv

size_t m_nv
| protected

Definition at line 112 of file refine.h.

## ◆ m_npmax

size_t m_npmax = 1000
| protected

Definition at line 113 of file refine.h.

## ◆ m_thresh

double m_thresh = std::sqrt(std::numeric_limits<double>::epsilon())
| protected

Definition at line 114 of file refine.h.

## ◆ m_gridmin

double m_gridmin = 1e-10
| protected

minimum grid spacing [m]

Definition at line 115 of file refine.h.

The documentation for this class was generated from the following files:

- refine.h
- refine.cpp