Cantera  2.1.2
DAE_solvers.cpp
Go to the documentation of this file.
1 /**
2  * @file DAE_solvers.cpp Factory routine for picking the DAE solver package
3  */
4 
5 /*
6  * Copyright 2004 Sandia Corporation. Under the terms of Contract
7  * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government
8  * retains certain rights in this software.
9  * See file License.txt for licensing information.
10  */
11 
12 #include "cantera/base/ct_defs.h"
15 
16 // DAE_DEVEL is turned off at the current time
17 #define DAE_DEVEL
18 #ifdef DAE_DEVEL
19 
20 namespace Cantera
21 {
22 DAE_Solver* newDAE_Solver(const std::string& itype, ResidJacEval& f)
23 {
24  if (itype == "IDA") {
25 #ifdef HAS_SUNDIALS
26  return new IDA_Solver(f);
27 #else
28  throw CanteraError("newDAE_Solver","IDA solver requires sundials"
29  " package, but Cantera was not built with sundials.");
30 #endif
31  } else {
32  throw CanteraError("newDAE_Solver",
33  "unknown DAE solver: "+itype);
34  }
35 }
36 }
37 
38 #
39 #endif
This file contains definitions of terms that are used in internal routines and are unlikely to need m...
Wrappers for the function evaluators for Nonlinear solvers and Time steppers.
Definition: ResidJacEval.h:51
Header file for class DAE_Solver.
Base class for exceptions thrown by Cantera classes.
Definition: ctexceptions.h:68
DAE_Solver * newDAE_Solver(const std::string &itype, ResidJacEval &f)
Factor method for choosing a DAE solver.
Definition: DAE_solvers.cpp:22
Header file for class IDA_Solver.
Wrapper for DAE solvers.
Definition: DAE_Solver.h:70