Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Tempus_SensitivityModelEvaluatorBase.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_SensitivityModelEvaluatorBase_hpp
10 #define Tempus_SensitivityModelEvaluatorBase_hpp
11 
12 #include "Thyra_ModelEvaluatorDefaultBase.hpp"
13 #include "Thyra_NonlinearSolverBase.hpp"
14 #include "Tempus_SolutionHistory.hpp"
15 
16 namespace Tempus {
17 
18 /** \brief A ModelEvaluator decorator for sensitivity analysis
19  *
20  * Used in sensitivity analysis model evaluators for interpolating from a
21  * previous solution and such. All additional methods have default, empty
22  * implementations, since different sensitivity model evaluators need slightly
23  * different capabilities.
24  */
25 template <typename Scalar>
27  public virtual Thyra::ModelEvaluatorDefaultBase<Scalar> {
28 public:
29 
30  //! Constructor
32 
33  //! Destructor
35 
36  //! Get the underlying forward model
37  virtual Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >
38  getForwardModel() const { return Teuchos::null; }
39 
40  //! Set solution history from forward state evaluation (for interpolation)
42  const Teuchos::RCP<const Tempus::SolutionHistory<Scalar> >& /* sh */) {}
43 
44  //! Set solution state from forward state evaluation (for frozen state)
46  const Teuchos::RCP<const Tempus::SolutionState<Scalar> >& /* s */) {}
47 
48  //! Set the solver of the underlying model if you want to reuse it
49  virtual void setSolver(
50  const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& /* solver */,
51  const bool /* force_W_update */) {}
52 };
53 
54 } // namespace Tempus
55 
56 #endif
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
virtual Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > getForwardModel() const
Get the underlying forward model.
virtual void setSolver(const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &, const bool)
Set the solver of the underlying model if you want to reuse it.
virtual void setForwardSolutionState(const Teuchos::RCP< const Tempus::SolutionState< Scalar > > &)
Set solution state from forward state evaluation (for frozen state)
A ModelEvaluator decorator for sensitivity analysis.
virtual void setForwardSolutionHistory(const Teuchos::RCP< const Tempus::SolutionHistory< Scalar > > &)
Set solution history from forward state evaluation (for interpolation)
Solution state for integrators and steppers. SolutionState contains the metadata for solutions and th...