9 #ifndef Tempus_InterpolatorFactory_hpp
10 #define Tempus_InterpolatorFactory_hpp
13 #include "Tempus_config.hpp"
14 #include "Tempus_InterpolatorLagrange.hpp"
23 template<
class Scalar>
32 if (interpolatorType ==
"")
33 interpolatorType =
"Lagrange";
41 std::string interpolatorType =
42 interpolatorPL->
get<std::string>(
"Interpolator Type",
"Lagrange");
56 if (interpolatorType ==
"Lagrange")
60 "Unknown 'Interpolator Type' = " << interpolatorType);
62 interpolator->setParameterList(interpolatorPL);
70 #endif // Tempus_InterpolatorFactory_hpp
T & get(const std::string &name, T def_value)
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
static Teuchos::RCP< Interpolator< Scalar > > createInterpolator(const Teuchos::RCP< Teuchos::ParameterList > &interpolatorPL)
Create interpolator from ParameterList with its details.
static Teuchos::RCP< Interpolator< Scalar > > createInterpolator(std::string interpolatorType="")
Create default interpolator from interpolator type (e.g., "Linear").
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
static Teuchos::RCP< Interpolator< Scalar > > createInterpolator(const std::string &interpolatorType, const Teuchos::RCP< Teuchos::ParameterList > &interpolatorPL)
Very simple factory method.
Concrete implemenation of Interpolator that does simple lagrange interpolation.