Cantera 2.6.0

DAE_solvers.cpp
Go to the documentation of this file.
1//! @file DAE_solvers.cpp Factory routine for picking the DAE solver package
2
3// This file is part of Cantera. See License.txt in the top-level directory or
4// at https://cantera.org/license.txt for license and copyright information.
5
6#include "cantera/base/ct_defs.h"
7#include "cantera/numerics/DAE_Solver.h"
8#include "cantera/numerics/IDA_Solver.h"
9
10// DAE_DEVEL is turned off at the current time
11#define DAE_DEVEL
12#ifdef DAE_DEVEL
13
14 namespace Cantera
15{
16 DAE_Solver* newDAE_Solver(const std::string& itype, ResidJacEval& f)
17{
18 if (itype == "IDA") {
19 return new IDA_Solver(f);
20 } else {
21 throw CanteraError("newDAE_Solver",
22 "unknown DAE solver: "+itype);
23 }
24}
25}
26
27#endif
DAE_Solver.h
Header file for class DAE_Solver.
IDA_Solver.h
Header file for class IDA_Solver.
Cantera::CanteraError
Base class for exceptions thrown by Cantera classes.
Definition: ctexceptions.h:61
Cantera::DAE_Solver
Wrapper for DAE solvers.
Definition: DAE_Solver.h:76
Cantera::IDA_Solver
Wrapper for Sundials IDA solver.
Definition: IDA_Solver.h:42
Cantera::ResidJacEval
Wrappers for the function evaluators for Nonlinear solvers and Time steppers.
Definition: ResidJacEval.h:56
ct_defs.h
This file contains definitions of constants, types and terms that are used in internal routines and a...
Cantera
Namespace for the Cantera kernel.
Definition: AnyMap.cpp:557
Cantera::newDAE_Solver
DAE_Solver * newDAE_Solver(const std::string &itype, ResidJacEval &f)
Factor method for choosing a DAE solver.
Definition: DAE_solvers.cpp:16