cantera/src/numerics/ODE_integrators.cpp
Ray Speth 2528df0f75 Reorganized source tree structure
These changes make it unnecessary to copy header files around during
the build process, which tends to confuse IDEs and debuggers. The
headers which comprise Cantera's external C++ interface are now in
the 'include' directory.

All of the samples and demos are now in the 'samples' subdirectory.
2012-02-12 02:27:14 +00:00

33 lines
533 B
C++

#include "ct_defs.h"
#include "Integrator.h"
#ifdef HAS_SUNDIALS
#include "CVodesIntegrator.h"
#else
#include "CVodeInt.h"
#endif
namespace Cantera
{
Integrator* newIntegrator(std::string itype)
{
if (itype == "CVODE") {
#ifdef HAS_SUNDIALS
return new CVodesIntegrator();
#else
return new CVodeInt();
#endif
} else {
throw CanteraError("newIntegrator",
"unknown ODE integrator: "+itype);
}
return 0;
}
void deleteIntegrator(Integrator* cv)
{
delete cv;
}
}