Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Tempus_TimeDerivative.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_TimeDerivative_hpp
10 #define Tempus_TimeDerivative_hpp
11 
12 // Thrya
13 #include "Thyra_VectorBase.hpp"
14 #include "Thyra_VectorStdOps.hpp"
15 
16 
17 namespace Tempus {
18 
19 /** \brief This interface defines the time derivative connection between
20  * an implicit Stepper and WrapperModelEvaluator.
21  *
22  * For a WrapperModelEvaluator which uses an implicit Stepper, i.e.,
23  * uses the implicit ODE or DAE form, \f$\mathcal{F}(\ddot{x},\dot{x},x,t)\f$,
24  * requires definition of the time derivatives during the iterations of
25  * the nonlinear solve. Note that if the Stepper solves for a time
26  * derivative, e.g., \f$\ddot{x}\f$ for the Newmark-\f$\beta\f$ methods,
27  * definitions for \f$x\f$ and \f$\dot{x}\f$ are required in the function
28  * compute(). This interface defines the calling function to compute
29  * those derivatives and/or state.
30  */
31 template <typename Scalar>
33 {
34 public:
35 
36  /// Set the underlying application ModelEvaluator
37  virtual void compute(
38  Teuchos::RCP<const Thyra::VectorBase<Scalar> > x,
39  Teuchos::RCP< Thyra::VectorBase<Scalar> > xDot,
40  Teuchos::RCP< Thyra::VectorBase<Scalar> > xDotDot = Teuchos::null) = 0;
41 
42  // Derived classes may need an initialize, but the argument lists will vary.
43  // virtual void initialize(Scalar dt, ... ) = 0;
44 };
45 
46 
47 } // namespace Tempus
48 #endif // Tempus_TimeDerivative_hpp
virtual void compute(Teuchos::RCP< const Thyra::VectorBase< Scalar > > x, Teuchos::RCP< Thyra::VectorBase< Scalar > > xDot, Teuchos::RCP< Thyra::VectorBase< Scalar > > xDotDot=Teuchos::null)=0
Set the underlying application ModelEvaluator.
This interface defines the time derivative connection between an implicit Stepper and WrapperModelEva...