8 #ifndef CT_IDA_SOLVER_H
9 #define CT_IDA_SOLVER_H
15 #include "sundials/sundials_nvector.h"
23 #define REAL_WORKSPACE_SIZE 0
52 virtual ~IDA_Solver();
54 virtual void setTolerances(doublereal reltol,
57 virtual void setTolerances(doublereal reltol, doublereal abstol);
59 virtual void setLinearSolverType(
int solverType);
62 virtual void setDenseLinearSolver();
69 virtual void setBandedLinearSolver(
int m_upper,
int m_lower);
71 virtual void setMaxOrder(
int n);
77 virtual void setMaxNumSteps(
int n);
83 virtual void setInitialStepSize(doublereal h0);
89 virtual void setStopTime(doublereal tstop);
95 virtual double getCurrentStepFromIDA();
106 virtual void setJacobianType(
int formJac);
109 virtual void setMaxErrTestFailures(
int n);
115 virtual void setMaxNonlinIterations(
int n);
121 virtual void setMaxNonlinConvFailures(
int n);
124 virtual void inclAlgebraicInErrorTest(
bool yesno);
129 virtual doublereal getOutputParameter(
int flag)
const;
131 virtual void correctInitial_Y_given_Yp(doublereal* y, doublereal* yp,
134 virtual void correctInitial_YaYp_given_Yd(doublereal* y, doublereal* yp, doublereal tout);
208 virtual int solve(doublereal tout);
210 virtual doublereal step(doublereal tout);
212 virtual void init(doublereal t0);
214 virtual doublereal solution(
int k)
const;
216 virtual const doublereal* solutionVector()
const;
218 virtual doublereal derivative(
int k)
const;
220 virtual const doublereal* derivativeVector()
const;
239 N_Vector m_constraints;
246 doublereal m_abstols;
277 doublereal m_told_old;
283 doublereal m_tcurrent;
289 int m_maxErrTestFails;
295 int m_maxNonlinIters;
298 int m_maxNonlinConvFails;
301 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, size_t nrhs, size_t ldb)
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.
Exception thrown when a IDA error is encountered.