Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tempus_IntegratorPseudoTransientAdjointSensitivity_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_IntegratorPseudoTransientAdjointSensitivity_decl_hpp
10 #define Tempus_IntegratorPseudoTransientAdjointSensitivity_decl_hpp
11 
12 #include "Tempus_config.hpp"
13 #include "Tempus_IntegratorBasicOld.hpp"
14 #include "Tempus_AdjointSensitivityModelEvaluator.hpp"
15 
16 
17 namespace Tempus {
18 
19 
51 template<class Scalar>
53  : virtual public Tempus::Integrator<Scalar>,
54  virtual public Teuchos::ParameterListAcceptor
55 {
56 public:
57 
79 
83  std::string stepperType);
84 
86 
88 
91 
93 
94 
96  virtual bool advanceTime();
98  virtual bool advanceTime(const Scalar timeFinal) override;
100  virtual Scalar getTime() const override;
102  virtual int getIndex() const override;
104  virtual Status getStatus() const override;
106  virtual Teuchos::RCP<Stepper<Scalar> > getStepper() const override;
117  {return state_integrator_->getIntegratorTimer();}
119  {return state_integrator_->getStepperTimer();}
120 
122 
124  virtual void initializeSolutionHistory(
125  Scalar t0,
127  Teuchos::RCP<const Thyra::VectorBase<Scalar> > xdot0 = Teuchos::null,
128  Teuchos::RCP<const Thyra::VectorBase<Scalar> > xdotdot0 = Teuchos::null,
129  Teuchos::RCP<const Thyra::MultiVectorBase<Scalar> > y0 = Teuchos::null,
130  Teuchos::RCP<const Thyra::MultiVectorBase<Scalar> > ydot0 = Teuchos::null,
131  Teuchos::RCP<const Thyra::MultiVectorBase<Scalar> > ydotdot0 = Teuchos::null);
132 
139 
142 
144 
146  override;
149 
151  const override;
153 
155 
156  std::string description() const override;
157  void describe(Teuchos::FancyOStream & out,
158  const Teuchos::EVerbosityLevel verbLevel) const override;
160 
161 protected:
163 
164  // Create sensitivity model evaluator from application model
168  const Teuchos::RCP<Teuchos::ParameterList>& inputPL);
169 
170  void buildSolutionHistory();
171 
178 };
179 
181 template<class Scalar>
186 
188 template<class Scalar>
192  std::string stepperType);
193 
195 template<class Scalar>
198 
199 } // namespace Tempus
200 
201 #endif // Tempus_IntegratorPseudoTransientAdjointSensitivity_decl_hpp
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > &pl) override
virtual Teuchos::RCP< Teuchos::Time > getIntegratorTimer() const override
Returns the IntegratorTimer_ for this Integrator.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const override
virtual void setTempusParameterList(Teuchos::RCP< Teuchos::ParameterList > pl) override
virtual Teuchos::RCP< const Thyra::VectorBase< Scalar > > getXDot() const
Get current the time derivative of the solution, xdot.
Teuchos::RCP< Tempus::IntegratorPseudoTransientAdjointSensitivity< Scalar > > integratorPseudoTransientAdjointSensitivity(Teuchos::RCP< Teuchos::ParameterList > pList, const Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > &model)
Nonmember constructor.
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const override
virtual Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > getDgDp() const
Return adjoint sensitivity stored in gradient format.
Time integrator suitable for pseudotransient adjoint sensitivity analysis.
virtual Teuchos::RCP< TimeStepControl< Scalar > > getNonConstTimeStepControl() override
Status
Status for the Integrator, the Stepper and the SolutionState.
virtual Teuchos::RCP< const Thyra::VectorBase< Scalar > > getXDotDot() const
Get current the second time derivative of the solution, xdotdot.
virtual void initializeSolutionHistory(Scalar t0, Teuchos::RCP< const Thyra::VectorBase< Scalar > > x0, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xdot0=Teuchos::null, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xdotdot0=Teuchos::null, Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > y0=Teuchos::null, Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > ydot0=Teuchos::null, Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > ydotdot0=Teuchos::null)
Set the initial state from Thyra::VectorBase(s)
Teuchos::RCP< AdjointSensitivityModelEvaluator< Scalar > > createSensitivityModel(const Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > &model, const Teuchos::RCP< Teuchos::ParameterList > &inputPL)
virtual Teuchos::RCP< Teuchos::ParameterList > getTempusParameterList() override
Return a copy of the Tempus ParameterList.
Thyra Base interface for time integrators. Time integrators are designed to advance the solution from...
virtual Teuchos::RCP< Stepper< Scalar > > getStepper() const override
Get the Stepper.
virtual Teuchos::RCP< const SolutionHistory< Scalar > > getSolutionHistory() const override
Get the SolutionHistory.
virtual Teuchos::RCP< const TimeStepControl< Scalar > > getTimeStepControl() const override
Get the TimeStepControl.
virtual bool advanceTime()
Advance the solution to timeMax, and return true if successful.
virtual Teuchos::RCP< const Thyra::VectorBase< Scalar > > getX() const
Get current the solution, x.