9 #ifndef Tempus_InterpolatorFactory_hpp
10 #define Tempus_InterpolatorFactory_hpp
13 #include "Tempus_config.hpp"
14 #include "Tempus_InterpolatorLagrange.hpp"
23 template <
class Scalar>
28 std::string interpolatorType =
"")
30 if (interpolatorType ==
"") interpolatorType =
"Lagrange";
38 std::string interpolatorType =
39 interpolatorPL->
get<std::string>(
"Interpolator Type",
"Lagrange");
46 const std::string& interpolatorType,
52 if (interpolatorType ==
"Lagrange")
56 true, std::logic_error,
57 "Unknown 'Interpolator Type' = " << interpolatorType);
59 interpolator->setParameterList(interpolatorPL);
66 #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.