Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tempus_InterpolatorLagrange_decl.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ****************************************************************************
3 // Tempus: Copyright (2017) Sandia Corporation
4 //
5 // Distributed under BSD 3-clause license (See accompanying file Copyright.txt)
6 // ****************************************************************************
7 // @HEADER
8 
9 #ifndef Tempus_InterpolatorLagrange_decl_hpp
10 #define Tempus_InterpolatorLagrange_decl_hpp
11 
12 #include "Tempus_config.hpp"
13 #include "Tempus_Interpolator.hpp"
14 
15 namespace Tempus {
16 
20 template<class Scalar>
21 class InterpolatorLagrange : virtual public Interpolator<Scalar>
22 {
23 public:
24 
27 
30 
32 
33 
35  void setNodes(
36  const Teuchos::RCP<const std::vector<Teuchos::RCP<SolutionState<Scalar> > > > & nodes) { nodes_ = nodes; }
37 
39  void interpolate(const Scalar& t, SolutionState<Scalar>* state_out) const;
40 
42  int order() const { return order_; }
43 
45 
47 
48  std::string description() const { return "Tempus::InterpolatorLagrange"; }
50  const Teuchos::EVerbosityLevel /* verbLevel */) const
51  { out << description() << "::describe" << std::endl; }
53 
55 
61 
62 private:
63 
64  void lagrange(const int p, const Scalar& t,
65  SolutionState<Scalar>* state_out) const;
66 
69  int order_;
70 
71 };
72 
73 // Nonmember constructor
74 template<class Scalar>
76 {
78 }
79 
80 } // namespace Tempus
81 
82 #endif // Tempus_InterpolatorLagrange_decl_hpp
Teuchos::RCP< const std::vector< Teuchos::RCP< SolutionState< Scalar > > > > nodes_
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel) const
Teuchos::RCP< Teuchos::ParameterList > pl_
Teuchos::RCP< Teuchos::ParameterList > getNonconstParameterList()
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Base strategy class for interpolation functionality.
Teuchos::RCP< Teuchos::ParameterList > unsetParameterList()
void setNodes(const Teuchos::RCP< const std::vector< Teuchos::RCP< SolutionState< Scalar > > > > &nodes)
Store pointer to interpolation nodes.
Teuchos::RCP< InterpolatorLagrange< Scalar > > lagrangeInterpolator()
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
void lagrange(const int p, const Scalar &t, SolutionState< Scalar > *state_out) const
void interpolate(const Scalar &t, SolutionState< Scalar > *state_out) const
Perform an interpolation.
Concrete implemenation of Interpolator that does simple lagrange interpolation.
Solution state for integrators and steppers. SolutionState contains the metadata for solutions and th...
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > &paramList)
int order() const
Return the order of the interpolation.