8 #ifndef CT_INTEGRATOR_H
9 #define CT_INTEGRATOR_H
62 warn(
"setTolerances");
71 warn(
"setTolerances");
87 warn(
"setLinearSolverType");
132 warn(
"linearSolverType");
146 virtual void reinitialize(
double t0,
FuncEval& func) {
147 warn(
"reinitialize");
164 virtual double step(
double tout) {
205 virtual int maxOrder()
const {
217 warn(
"setMethodType");
222 warn(
"setMaxStepSize");
227 warn(
"setMinStepSize");
232 warn(
"setMaxErrTestFails");
250 virtual void setBandwidth(
int N_Upper,
int N_Lower) {
251 warn(
"setBandwidth");
254 virtual int nSensParams() {
255 warn(
"nSensParams()");
259 virtual double sensitivity(
size_t k,
size_t p) {
271 virtual int maxNonlinIterations()
const {
272 warn(
"maxNonlinIterations");
275 virtual void setMaxNonlinIterations(
int n) {
276 warn(
"setMaxNonlinIterations");
279 virtual int maxNonlinConvFailures()
const {
280 warn(
"maxNonlinConvFailures");
283 virtual void setMaxNonlinConvFailures(
int n) {
284 warn(
"setMaxNonlinConvFailures");
287 virtual bool algebraicInErrorTest()
const {
288 warn(
"algebraicInErrorTest");
291 virtual void includeAlgebraicInErrorTest(
bool yesno) {
292 warn(
"includeAlgebraicInErrorTest");
306 void warn(
const string& msg)
const {
307 writelog(
">>>> Warning: method "+msg+
" of base class "
308 +
"Integrator called. Nothing done.\n");
Declarations for the class PreconditionerBase which is a virtual base class for preconditioning syste...
A map of string keys to values whose type can vary at runtime.
Base class for exceptions thrown by Cantera classes.
Virtual base class for ODE/DAE right-hand-side function evaluators.
Abstract base class for ODE system integrators.
virtual void setMaxStepSize(double hmax)
Set the maximum step size.
virtual double * solution()
The current value of the solution of the system of equations.
virtual void setTolerances(double reltol, size_t n, double *abstol)
Set error tolerances.
virtual void setMaxSteps(int nmax)
Set the maximum number of time-steps the integrator can take before reaching the next output time.
virtual int maxSteps()
Returns the maximum number of time-steps the integrator can take before reaching the next output time...
virtual void setPreconditioner(shared_ptr< PreconditionerBase > preconditioner)
Set preconditioner used by the linear solver.
shared_ptr< PreconditionerBase > m_preconditioner
Pointer to preconditioner object used in integration which is set by setPreconditioner and initialize...
Integrator()
Default Constructor.
virtual double & solution(size_t k)
The current value of the solution of equation k.
virtual void setMaxErrTestFails(int n)
Set the maximum permissible number of error test failures.
virtual AnyMap solverStats() const
Get solver stats from integrator.
virtual void initialize(double t0, FuncEval &func)
Initialize the integrator for a new problem.
virtual void setLinearSolverType(const string &linSolverType)
Set the linear solver type.
virtual PreconditionerSide preconditionerSide()
Return the side of the system on which the preconditioner is applied.
virtual void setTolerances(double reltol, double abstol)
Set error tolerances.
virtual double * derivative(double tout, int n)
n-th derivative of the output function at time tout.
virtual void setMinStepSize(double hmin)
Set the minimum step size.
virtual double step(double tout)
Integrate the system of equations.
virtual void setSensitivityTolerances(double reltol, double abstol)
Set the sensitivity error tolerances.
virtual string linearSolverType() const
Return the integrator problem type.
virtual void integrate(double tout)
Integrate the system of equations.
PreconditionerSide m_prec_side
Type of preconditioning used in applyOptions.
virtual int lastOrder() const
Order used during the last solution step.
virtual int nEvals() const
The number of function evaluations.
virtual int nEquations() const
The number of equations.
virtual ~Integrator()
Destructor.
virtual void setMethod(MethodType t)
Set the solution method.
virtual void preconditionerSolve(size_t stateSize, double *rhs, double *output)
Solve a linear system Ax=b where A is the preconditioner.
virtual shared_ptr< PreconditionerBase > preconditioner()
Return preconditioner reference to object.
virtual void setMaxOrder(int n)
Set the maximum integration order that will be used.
This file contains definitions for utility functions and text for modules, inputfiles and logging,...
void writelog(const string &fmt, const Args &... args)
Write a formatted message to the screen.
Integrator * newIntegrator(const string &itype)
Create new Integrator object.
Namespace for the Cantera kernel.
MethodType
Specifies the method used to integrate the system of equations.
@ BDF_Method
Backward Differentiation.
PreconditionerSide
Specifies the side of the system on which the preconditioner is applied.
@ LEFT_PRECONDITION
No preconditioning.
@ BOTH_PRECONDITION
Right side preconditioning.
@ RIGHT_PRECONDITION
Left side preconditioning.
IterType
Specifies the method used for iteration.
@ Functional_Iter
Functional Iteration.
@ Newton_Iter
Newton Iteration.