Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tempus_IntegratorPseudoTransientForwardSensitivity_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_IntegratorPseudoTransientForwardSensitivity_decl_hpp
10 #define Tempus_IntegratorPseudoTransientForwardSensitivity_decl_hpp
11 
12 // Tempus
13 #include "Tempus_config.hpp"
14 #include "Tempus_IntegratorBasicOld.hpp"
16 
17 namespace Tempus {
18 
19 
49 template<class Scalar>
51  : virtual public Tempus::Integrator<Scalar>,
52  virtual public Teuchos::ParameterListAcceptor
53 {
54 public:
55 
93 
97  std::string stepperType);
98 
100 
102 
105 
107 
108 
110  virtual bool advanceTime();
112  virtual bool advanceTime(const Scalar timeFinal) override;
114  virtual Scalar getTime() const override;
116  virtual int getIndex() const override;
118  virtual Status getStatus() const override;
120  virtual Teuchos::RCP<Stepper<Scalar> > getStepper() const override;
130  {return state_integrator_->getIntegratorTimer();}
132  {return state_integrator_->getStepperTimer();}
133 
135 
137  virtual void initializeSolutionHistory(
138  Scalar t0,
140  Teuchos::RCP<const Thyra::VectorBase<Scalar> > xdot0 = Teuchos::null,
141  Teuchos::RCP<const Thyra::VectorBase<Scalar> > xdotdot0 = Teuchos::null,
142  Teuchos::RCP<const Thyra::MultiVectorBase<Scalar> > DxDp0 = Teuchos::null,
143  Teuchos::RCP<const Thyra::MultiVectorBase<Scalar> > DxdotDp0 = Teuchos::null,
144  Teuchos::RCP<const Thyra::MultiVectorBase<Scalar> > DxdotdotDp0 = Teuchos::null);
145 
155 
157 
159  override;
162 
164  const override;
166 
168 
169  std::string description() const override;
170  void describe(Teuchos::FancyOStream & out,
171  const Teuchos::EVerbosityLevel verbLevel) const override;
173 
174 protected:
175 
176  // Create sensitivity model evaluator from application model
180  const Teuchos::RCP<Teuchos::ParameterList>& inputPL);
181 
182  void buildSolutionHistory();
183 
191 };
192 
194 template<class Scalar>
199 
201 template<class Scalar>
205  std::string stepperType);
206 
208 template<class Scalar>
211 
212 } // namespace Tempus
213 
214 #endif // Tempus_IntegratorPseudoTransientForwardSensitivity_decl_hpp
virtual Teuchos::RCP< Stepper< Scalar > > getStepper() const override
Get the Stepper.
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > &pl) override
virtual Teuchos::RCP< const SolutionHistory< Scalar > > getSolutionHistory() const override
Get the SolutionHistory.
virtual Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > getDxDp() const
virtual Teuchos::RCP< TimeStepControl< Scalar > > getNonConstTimeStepControl() override
Teuchos::RCP< Tempus::IntegratorPseudoTransientForwardSensitivity< Scalar > > integratorPseudoTransientForwardSensitivity(Teuchos::RCP< Teuchos::ParameterList > pList, const Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > &model)
Nonmember constructor.
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 > > DxDp0=Teuchos::null, Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > DxdotDp0=Teuchos::null, Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > DxdotdotDp0=Teuchos::null)
Set the initial state from Thyra::VectorBase(s)
virtual bool advanceTime()
Advance the solution to timeMax, and return true if successful.
Status
Status for the Integrator, the Stepper and the SolutionState.
virtual Teuchos::RCP< Teuchos::Time > getIntegratorTimer() const override
Returns the IntegratorTimer_ for this Integrator.
virtual Teuchos::RCP< const Thyra::VectorBase< Scalar > > getXDotDot() const
Get current the second time derivative of the solution, xdotdot.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const override
virtual Teuchos::RCP< Teuchos::ParameterList > getTempusParameterList() override
Return a copy of the Tempus ParameterList.
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const override
virtual Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > getDXDotDp() const
Teuchos::RCP< SensitivityModelEvaluatorBase< Scalar > > createSensitivityModel(const Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > &model, const Teuchos::RCP< Teuchos::ParameterList > &inputPL)
Time integrator suitable for pseudotransient forward sensitivity analysis.
Thyra Base interface for time integrators. Time integrators are designed to advance the solution from...
virtual void setTempusParameterList(Teuchos::RCP< Teuchos::ParameterList > pl) override
virtual Teuchos::RCP< const TimeStepControl< Scalar > > getTimeStepControl() const override
Get the TimeStepControl.
virtual Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > getDXDotDotDp() const
virtual Teuchos::RCP< const Thyra::VectorBase< Scalar > > getXDot() const
Get current the time derivative of the solution, xdot.
virtual Teuchos::RCP< const Thyra::VectorBase< Scalar > > getX() const
Get current the solution, x.