Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tempus_WrapperModelEvaluatorPairIMEX_StaggeredFSA.hpp
Go to the documentation of this file.
1 //@HEADER
2 // *****************************************************************************
3 // Tempus: Time Integration and Sensitivity Analysis Package
4 //
5 // Copyright 2017 NTESS and the Tempus contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 //@HEADER
9 
10 #ifndef Tempus_ModelEvaluatorPairIMEX_StaggeredFSA_hpp
11 #define Tempus_ModelEvaluatorPairIMEX_StaggeredFSA_hpp
12 
13 #include "Tempus_config.hpp"
15 #include "Tempus_WrapperModelEvaluatorPairIMEX_Basic.hpp"
16 #include "Tempus_StaggeredForwardSensitivityModelEvaluator.hpp"
17 
18 namespace Tempus {
19 
26 template <typename Scalar>
28  : public SensitivityModelEvaluatorBase<Scalar>,
30  public:
34  forwardModel,
35  const bool is_pseudotransient,
36  const Teuchos::RCP<const Teuchos::ParameterList>& pList = Teuchos::null)
37  {
38  forwardModel_ = forwardModel;
39  appExplicitModel_ = forwardModel_->getExplicitModel();
40  appImplicitModel_ = forwardModel_->getImplicitModel();
43  is_pseudotransient, pList));
46  is_pseudotransient, pList));
48  }
49 
52 
54 
55 
58  const
59  {
60  return forwardModel_;
61  }
62 
66  {
67  fsaExplicitModel_->setForwardSolutionHistory(sh);
68  fsaImplicitModel_->setForwardSolutionHistory(sh);
69  }
70 
74  {
75  fsaExplicitModel_->setForwardSolutionState(s);
76  fsaImplicitModel_->setForwardSolutionState(s);
77  }
78 
80  virtual void setSolver(
82  const bool force_W_update)
83  {
84  fsaImplicitModel_->setSolver(solver, force_W_update);
85  }
86 
88 
89  private:
92 
93  protected:
96 
103 };
104 
105 } // namespace Tempus
106 
107 #endif // Tempus_ModelEvaluatorPairIMEX_StaggeredFSA_hpp
ModelEvaluator pair for implicit and explicit (IMEX) evaulations.
Specialization of IMEX ME for &quot;staggered&quot; FSA method.
void setup(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &explicitModel, const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &implicitModel)
Setup ME when using default constructor – for derived classes.
virtual void setForwardSolutionState(const Teuchos::RCP< const Tempus::SolutionState< Scalar > > &s)
Set solution state from forward state evaluation (for frozen state)
virtual void setForwardSolutionHistory(const Teuchos::RCP< const Tempus::SolutionHistory< Scalar > > &sh)
Set solution history from forward state evaluation (for interpolation)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
WrapperModelEvaluatorPairIMEX_StaggeredFSA(const Teuchos::RCP< const WrapperModelEvaluatorPairIMEX_Basic< Scalar > > &forwardModel, const bool is_pseudotransient, const Teuchos::RCP< const Teuchos::ParameterList > &pList=Teuchos::null)
Constructor.
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.
Teuchos::RCP< const WrapperModelEvaluatorPairIMEX_Basic< Scalar > > forwardModel_
Transform a ModelEvaluator&#39;s sensitivity equations to its residual.
virtual void setSolver(const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, const bool force_W_update)
Set the solver of the underlying model if you want to reuse it.
A ModelEvaluator decorator for sensitivity analysis.
Solution state for integrators and steppers.