| Cantera 3.0.0

Loading...
Searching...
No Matches
Integrators.cpp
Go to the documentation of this file.
1//! @file Integrators.cpp
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/Integrator.h"
8#include "cantera/numerics/CVodesIntegrator.h"
9#include "cantera/numerics/IdasIntegrator.h"
10
11 namespace Cantera
12{
13
14 Integrator* newIntegrator(const string& itype)
15{
16 if (itype == "CVODE") {
17 return new CVodesIntegrator();
18 } else if (itype == "IDA") {
19 return new IdasIntegrator();
20 } else {
21 throw CanteraError("newIntegrator",
22 "unknown integrator: "+itype);
23 }
24 return 0;
25}
26
27}
CVodesIntegrator.h
IdasIntegrator.h
Header file for class IdasIntegrator.
Integrator.h
Cantera::CVodesIntegrator
Wrapper class for 'cvodes' integrator from LLNL.
Definition CVodesIntegrator.h:27
Cantera::CanteraError
Base class for exceptions thrown by Cantera classes.
Definition ctexceptions.h:66
Cantera::IdasIntegrator
Wrapper for Sundials IDAS solver.
Definition IdasIntegrator.h:26
Cantera::Integrator
Abstract base class for ODE system integrators.
Definition Integrator.h:51
ct_defs.h
This file contains definitions of constants, types and terms that are used in internal routines and a...
Cantera::newIntegrator
Integrator * newIntegrator(const string &itype)
Create new Integrator object.
Definition Integrators.cpp:14
Cantera
Namespace for the Cantera kernel.
Definition AnyMap.cpp:564