A Quasi-Steady-State ODE Integrator based on CHEMEQ2.
More...
#include <qssintegrator.h>
|
double | tn |
| Internal integrator time (relative to tstart)
|
|
dvec | y |
| current state vector
|
|
bool | stabilityCheck |
| Flag to enable convergence-based stability check on timestep.
|
|
int | itermax |
| Number of corrector iterations to perform.
|
|
double | epsmin |
| Accuracy parameter for determining the next timestep.
|
|
double | epsmax |
| Repeat timestep if correction is greater than #epsmax * #epsmin * #y[i] for any i .
|
|
double | dtmin |
| Minimum timestep allowed.
|
|
double | dtmax |
| Maximum timestep allowed.
|
|
dvec | ymin |
| Minimum value allowed for each component.
|
|
dvec | enforce_ymin |
| Enforce the minimum value specified in ymin for each component.
|
|
double | abstol |
| Minimum component value to consider when determining stability / step size.
|
|
int | rcount |
| Total number of timestep repeats (after failed timesteps)
|
|
int | gcount |
| Total number of ODE function calls.
|
|
|
QssOde * | ode_ |
|
size_t | N |
| Number of state variables.
|
|
double | ts |
| Time at the start of the current internal timestep.
|
|
double | tfd |
| Round-off parameter used to determine when integration is complete.
|
|
double | dt |
| Integrator internal timestep.
|
|
double | tstart |
| Independent variable at the start of the global timestep.
|
|
dvec | ym1 |
| Previous corrector iterate.
|
|
dvec | ym2 |
| Second previous corrector iterate.
|
|
dvec | scratch |
| temporary array.
|
|
dvec | q |
| production rate
|
|
dvec | d |
| loss rate
|
|
dvec | rtau |
| ratio of timestep to timescale.
|
|
dvec | rtaus |
| ratio of timestep to initial timescale for current timestep
|
|
dvec | y1 |
| predicted value
|
|
dvec | ys |
| initial conditions for the chemical timestep
|
|
dvec | qs |
| initial production rate
|
|
bool | firstStep |
| Flag to trigger integrator restart on the next call to integrateToTime or integrateOneStep.
|
|
A Quasi-Steady-State ODE Integrator based on CHEMEQ2.
◆ QssIntegrator()
QssIntegrator::QssIntegrator |
( |
| ) |
|
◆ ~QssIntegrator()
virtual QssIntegrator::~QssIntegrator |
( |
| ) |
|
|
inlinevirtual |
◆ setOde()
void QssIntegrator::setOde |
( |
QssOde * |
ode | ) |
|
Set the ODE object to be integrated.
◆ initialize()
void QssIntegrator::initialize |
( |
size_t |
N | ) |
|
|
virtual |
Initialize integrator arrays (problem size of N)
◆ setState()
void QssIntegrator::setState |
( |
const dvec & |
yIn, |
|
|
double |
tStart |
|
) |
| |
Set state at the start of a global timestep.
◆ integrateToTime()
int QssIntegrator::integrateToTime |
( |
double |
tf | ) |
|
Take as many steps as needed to reach tf
.
Note that tf
is relative to tstart, not absolute.
◆ integrateOneStep()
int QssIntegrator::integrateOneStep |
( |
double |
tf | ) |
|
Take one step toward tf
without stepping past it.
◆ getInitialStepSize()
void QssIntegrator::getInitialStepSize |
( |
double |
tf | ) |
|
|
private |
Estimate the initial step size.
Strongly increasing functions(q >> d
assumed here) use a step- size estimate proportional to the step needed for the function to reach equilibrium where as functions decreasing or in equilibrium use a stepsize estimate directly proportional to the characteristic stepsize of the function. convergence of the integration scheme is likely since the smallest estimate is chosen for the initial stepsize.
◆ tn
Internal integrator time (relative to tstart)
◆ stabilityCheck
bool QssIntegrator::stabilityCheck |
Flag to enable convergence-based stability check on timestep.
◆ itermax
int QssIntegrator::itermax |
Number of corrector iterations to perform.
◆ epsmin
double QssIntegrator::epsmin |
Accuracy parameter for determining the next timestep.
◆ epsmax
double QssIntegrator::epsmax |
Repeat timestep if correction is greater than #epsmax * #epsmin * #y[i]
for any i
.
◆ dtmin
double QssIntegrator::dtmin |
Minimum timestep allowed.
◆ dtmax
double QssIntegrator::dtmax |
Maximum timestep allowed.
◆ ymin
Minimum value allowed for each component.
◆ enforce_ymin
dvec QssIntegrator::enforce_ymin |
Enforce the minimum value specified in ymin for each component.
◆ abstol
double QssIntegrator::abstol |
Minimum component value to consider when determining stability / step size.
◆ rcount
int QssIntegrator::rcount |
Total number of timestep repeats (after failed timesteps)
◆ gcount
int QssIntegrator::gcount |
Total number of ODE function calls.
◆ ode_
Number of state variables.
◆ ts
Time at the start of the current internal timestep.
◆ tfd
double QssIntegrator::tfd |
|
private |
Round-off parameter used to determine when integration is complete.
◆ dt
◆ tstart
double QssIntegrator::tstart |
|
private |
Independent variable at the start of the global timestep.
◆ ym1
Previous corrector iterate.
◆ ym2
Second previous corrector iterate.
◆ scratch
dvec QssIntegrator::scratch |
|
private |
◆ rtau
ratio of timestep to timescale.
◆ rtaus
dvec QssIntegrator::rtaus |
|
private |
ratio of timestep to initial timescale for current timestep
◆ y1
◆ ys
initial conditions for the chemical timestep
◆ qs
◆ firstStep
bool QssIntegrator::firstStep |
|
private |
The documentation for this class was generated from the following files: