8 #ifndef CT_IDA_SOLVER_H
9 #define CT_IDA_SOLVER_H
16 #if SUNDIALS_VERSION == 22
17 #include "nvector_serial.h"
19 #include "sundials/sundials_nvector.h"
28 #if SUNDIALS_VERSION >= 24
29 #define REAL_WORKSPACE_SIZE 0
59 virtual ~IDA_Solver();
61 virtual void setTolerances(doublereal reltol,
64 virtual void setTolerances(doublereal reltol, doublereal abstol);
66 virtual void setLinearSolverType(
int solverType);
69 virtual void setDenseLinearSolver();
76 virtual void setBandedLinearSolver(
int m_upper,
int m_lower);
78 virtual void setMaxOrder(
int n);
84 virtual void setMaxNumSteps(
int n);
90 virtual void setInitialStepSize(doublereal h0);
96 virtual void setStopTime(doublereal tstop);
102 virtual double getCurrentStepFromIDA();
113 virtual void setJacobianType(
int formJac);
116 virtual void setMaxErrTestFailures(
int n);
122 virtual void setMaxNonlinIterations(
int n);
128 virtual void setMaxNonlinConvFailures(
int n);
131 virtual void inclAlgebraicInErrorTest(
bool yesno);
136 virtual doublereal getOutputParameter(
int flag)
const;
138 virtual void correctInitial_Y_given_Yp(doublereal* y, doublereal* yp,
141 virtual void correctInitial_YaYp_given_Yd(doublereal* y, doublereal* yp, doublereal tout);
215 virtual int solve(doublereal tout);
217 virtual doublereal step(doublereal tout);
219 virtual void init(doublereal t0);
221 virtual doublereal solution(
int k)
const;
223 virtual const doublereal* solutionVector()
const;
225 virtual doublereal derivative(
int k)
const;
227 virtual const doublereal* derivativeVector()
const;
246 N_Vector m_constraints;
253 doublereal m_abstols;
284 doublereal m_told_old;
290 doublereal m_tcurrent;
296 int m_maxErrTestFails;
302 int m_maxNonlinIters;
305 int m_maxNonlinConvFails;
308 int m_setSuppressAlg;
A simple class to hold an array of parameter values and a pointer to an instance of a subclass of Res...
int solve(DenseMatrix &A, double *b)
Solve Ax = b. Array b is overwritten on exit with x.
Wrappers for the function evaluators for Nonlinear solvers and Time steppers.
Header file for class DAE_Solver.
Base class for exceptions thrown by Cantera classes.
CanteraError()
Protected default constructor discourages throwing errors containing no information.
Definitions for the classes that are thrown when Cantera experiences an error condition (also contain...
Exception thrown when a IDA error is encountered.