9#ifndef Tempus_InterpolatorFactory_hpp
10#define Tempus_InterpolatorFactory_hpp
12#include "Teuchos_ParameterList.hpp"
13#include "Tempus_config.hpp"
14#include "Tempus_InterpolatorLagrange.hpp"
29 static Teuchos::RCP<Interpolator<Scalar> >
32 if (interpolatorType ==
"")
33 interpolatorType =
"Lagrange";
38 static Teuchos::RCP<Interpolator<Scalar> >
41 std::string interpolatorType =
42 interpolatorPL->get<std::string>(
"Interpolator Type",
"Lagrange");
49 static Teuchos::RCP<Interpolator<Scalar> >
51 const Teuchos::RCP<Teuchos::ParameterList>& interpolatorPL)
55 Teuchos::RCP<Interpolator<Scalar> > interpolator;
56 if (interpolatorType ==
"Lagrange")
59 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
60 "Unknown 'Interpolator Type' = " << interpolatorType);
62 interpolator->setParameterList(interpolatorPL);
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").
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.