Cantera
2.0
|
Wrapper for DAE solvers. More...
#include <DAE_Solver.h>
Public Member Functions | |
DAE_Solver (ResidJacEval &f) | |
virtual void | setTolerances (doublereal reltol, doublereal *abstol) |
Set error tolerances. | |
virtual void | setTolerances (doublereal reltol, doublereal abstol) |
Set error tolerances. | |
void | setJacobian (Jacobian &jac) |
Specify a Jacobian evaluator. | |
virtual void | setLinearSolverType (int solverType) |
virtual void | setDenseLinearSolver () |
virtual void | setBandedLinearSolver (int m_upper, int m_lower) |
virtual void | setMaxStepSize (doublereal dtmax) |
virtual void | setMaxOrder (int n) |
virtual void | setMaxNumSteps (int n) |
virtual void | setInitialStepSize (doublereal h0) |
virtual void | setStopTime (doublereal tstop) |
virtual void | setMaxErrTestFailures (int n) |
virtual void | setMaxNonlinIterations (int n) |
virtual void | setMaxNonlinConvFailures (int n) |
virtual void | inclAlgebraicInErrorTest (bool yesno) |
virtual void | correctInitial_Y_given_Yp (doublereal *y, doublereal *yp, doublereal tout) |
This method may be called if the initial conditions do not satisfy the residual equation F = 0. | |
virtual void | correctInitial_YaYp_given_Yd (doublereal *y, doublereal *yp, doublereal tout) |
This method may be called if the initial conditions do not satisfy the residual equation F = 0. | |
virtual int | solve (doublereal tout) |
Solve the system of equations up to time tout. | |
virtual doublereal | step (doublereal tout) |
Take one internal step. | |
int | nEquations () const |
Number of equations. | |
virtual void | init (doublereal t0) |
initialize. | |
virtual void | setInputParameter (int flag, doublereal value) |
Set a solver-specific input parameter. | |
virtual doublereal | getOutputParameter (int flag) const |
Get the value of a solver-specific output parameter. | |
virtual doublereal | solution (int k) const |
the current value of solution component k. | |
virtual const doublereal * | solutionVector () const |
virtual doublereal | derivative (int k) const |
the current value of the derivative of solution component k. | |
virtual const doublereal * | derivativeVector () const |
Protected Attributes | |
doublereal | m_dummy |
ResidJacEval & | m_resid |
integer | m_neq |
Number of total equations in the system. | |
doublereal | m_time |
Private Member Functions | |
void | warn (std::string msg) const |
Wrapper for DAE solvers.
Definition at line 73 of file DAE_Solver.h.
|
inlinevirtual |
Set error tolerances.
This version specifies a scalar relative tolerance, and a vector absolute tolerance.
Definition at line 89 of file DAE_Solver.h.
|
inlinevirtual |
Set error tolerances.
This version specifies a scalar relative tolerance, and a scalar absolute tolerance.
Definition at line 98 of file DAE_Solver.h.
|
inline |
Specify a Jacobian evaluator.
If this method is not called, the Jacobian will be computed by finite difference.
Definition at line 106 of file DAE_Solver.h.
|
inlinevirtual |
This method may be called if the initial conditions do not satisfy the residual equation F = 0.
Given the derivatives of all variables, this method computes the initial y values.
Definition at line 155 of file DAE_Solver.h.
|
inlinevirtual |
This method may be called if the initial conditions do not satisfy the residual equation F = 0.
Given the initial values of all differential variables, it computes the initial values of all algebraic variables and the initial derivatives of all differential variables.
Definition at line 167 of file DAE_Solver.h.
|
inlinevirtual |
Solve the system of equations up to time tout.
Definition at line 175 of file DAE_Solver.h.
|
inlinevirtual |
Take one internal step.
Definition at line 183 of file DAE_Solver.h.
|
inline |
Number of equations.
Definition at line 189 of file DAE_Solver.h.
References ResidJacEval::nEquations().
|
inlinevirtual |
|
inlinevirtual |
Set a solver-specific input parameter.
Definition at line 201 of file DAE_Solver.h.
|
inlinevirtual |
Get the value of a solver-specific output parameter.
Definition at line 208 of file DAE_Solver.h.
|
inlinevirtual |
the current value of solution component k.
Definition at line 214 of file DAE_Solver.h.
|
inlinevirtual |
the current value of the derivative of solution component k.
Definition at line 225 of file DAE_Solver.h.
|
protected |
Number of total equations in the system.
Definition at line 242 of file DAE_Solver.h.