9 #ifndef Tempus_IntegratorAdjointSensitivity_decl_hpp
10 #define Tempus_IntegratorAdjointSensitivity_decl_hpp
13 #include "Tempus_IntegratorBasic.hpp"
14 #include "Tempus_AdjointAuxSensitivityModelEvaluator.hpp"
42 template<
class Scalar>
79 Teuchos::RCP<Teuchos::ParameterList> pList,
80 const Teuchos::RCP<Thyra::ModelEvaluator<Scalar> >& model);
95 virtual bool advanceTime(
const Scalar timeFinal)
override;
97 virtual Scalar
getTime()
const override;
99 virtual int getIndex()
const override;
103 virtual Teuchos::RCP<Stepper<Scalar> >
getStepper()
const override;
108 virtual Teuchos::RCP<const SolutionHistory<Scalar> >
getSolutionHistory()
const override;
110 virtual Teuchos::RCP<const TimeStepControl<Scalar> >
getTimeStepControl()
const override;
123 Teuchos::RCP<
const Thyra::VectorBase<Scalar> > x0,
124 Teuchos::RCP<
const Thyra::VectorBase<Scalar> > xdot0 = Teuchos::null,
125 Teuchos::RCP<
const Thyra::VectorBase<Scalar> > xdotdot0 = Teuchos::null,
126 Teuchos::RCP<
const Thyra::MultiVectorBase<Scalar> > DxDp0 = Teuchos::null,
127 Teuchos::RCP<
const Thyra::MultiVectorBase<Scalar> > DxdotDp0 = Teuchos::null,
128 Teuchos::RCP<
const Thyra::MultiVectorBase<Scalar> > DxdotdotDp0 = Teuchos::null);
137 virtual Teuchos::RCP<const Thyra::VectorBase<Scalar> >
getX()
const;
139 virtual Teuchos::RCP<const Thyra::VectorBase<Scalar> >
getXdot()
const;
141 virtual Teuchos::RCP<const Thyra::VectorBase<Scalar> >
getXdotdot()
const;
144 virtual Teuchos::RCP<const Thyra::MultiVectorBase<Scalar> >
getDgDp()
const;
160 void describe(Teuchos::FancyOStream & out,
161 const Teuchos::EVerbosityLevel verbLevel)
const override;
167 Teuchos::RCP<AdjointAuxSensitivityModelEvaluator<Scalar> >
169 const Teuchos::RCP<Thyra::ModelEvaluator<Scalar> >& model,
170 const Teuchos::RCP<Teuchos::ParameterList>& inputPL);
176 Teuchos::RCP<Thyra::ModelEvaluator<Scalar> >
model_;
187 Teuchos::RCP<const Thyra::MultiVectorBase<Scalar> >
dxdp_init_;
188 Teuchos::RCP<Thyra::MultiVectorBase<Scalar> >
dgdp_;
192 template<
class Scalar>
193 Teuchos::RCP<IntegratorAdjointSensitivity<Scalar> >
195 Teuchos::RCP<Teuchos::ParameterList> pList,
196 const Teuchos::RCP<Thyra::ModelEvaluator<Scalar> >& model);
199 template<
class Scalar>
200 Teuchos::RCP<IntegratorAdjointSensitivity<Scalar> >
205 #endif // Tempus_IntegratorAdjointSensitivity_decl_hpp
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const override
Teuchos::RCP< Thyra::MultiVectorBase< Scalar > > dgdp_
Teuchos::RCP< Teuchos::ParameterList > getNonconstParameterList() override
virtual Teuchos::RCP< TimeStepControl< Scalar > > getNonConstTimeStepControl() override
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const override
virtual Teuchos::RCP< const Thyra::VectorBase< Scalar > > getXdot() const
Get current the time derivative of the solution, xdot.
Teuchos::RCP< AdjointAuxSensitivityModelEvaluator< Scalar > > adjoint_model_
virtual Teuchos::RCP< Teuchos::Time > getStepperTimer() const override
Teuchos::RCP< Teuchos::ParameterList > unsetParameterList() override
Teuchos::RCP< IntegratorAdjointSensitivity< Scalar > > integratorAdjointSensitivity(Teuchos::RCP< Teuchos::ParameterList > pList, const Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > &model)
Non-member constructor.
Teuchos::RCP< SolutionHistory< Scalar > > solutionHistory_
void buildSolutionHistory(const Teuchos::RCP< const SolutionHistory< Scalar > > &state_solution_history, const Teuchos::RCP< const SolutionHistory< Scalar > > &adjoint_solution_history)
Teuchos::RCP< IntegratorBasic< Scalar > > adjoint_integrator_
virtual Teuchos::RCP< const Thyra::VectorBase< Scalar > > getX() const
Get current the solution, x.
virtual Teuchos::RCP< Teuchos::Time > getIntegratorTimer() const override
Returns the IntegratorTimer_ for this Integrator.
std::string description() const override
virtual Teuchos::RCP< const SolutionHistory< Scalar > > getSolutionHistory() const override
Get the SolutionHistory.
Status
Status for the Integrator, the Stepper and the SolutionState.
Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > dxdp_init_
virtual Teuchos::RCP< Teuchos::ParameterList > getTempusParameterList() override
Return a copy of the Tempus ParameterList.
IntegratorObserver class for time integrators.
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 Teuchos::RCP< const TimeStepControl< Scalar > > getTimeStepControl() const override
Get the TimeStepControl.
virtual void setTempusParameterList(Teuchos::RCP< Teuchos::ParameterList > pl) override
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
virtual bool advanceTime()
Advance the solution to timeMax, and return true if successful.
virtual void setObserver(Teuchos::RCP< IntegratorObserver< Scalar > > obs=Teuchos::null)
Set the Observer.
Teuchos::RCP< IntegratorBasic< Scalar > > state_integrator_
Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > model_
virtual ~IntegratorAdjointSensitivity()
Destructor.
Thyra Base interface for time integrators. Time integrators are designed to advance the solution from...
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > &pl) override
Time integrator suitable for adjoint sensitivity analysis.
virtual int getIndex() const override
Get current index.
Teuchos::RCP< AdjointAuxSensitivityModelEvaluator< Scalar > > createAdjointModel(const Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > &model, const Teuchos::RCP< Teuchos::ParameterList > &inputPL)
virtual Teuchos::RCP< const Thyra::VectorBase< Scalar > > getXdotdot() const
Get current the second time derivative of the solution, xdotdot.
bool mass_matrix_is_identity_
virtual Scalar getTime() const override
Get current time.
virtual Status getStatus() const override
Get Status.
virtual void initialize()
Initializes the Integrator after set* function calls.
virtual Teuchos::RCP< Stepper< Scalar > > getStepper() const override
Get the Stepper.
virtual Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > getDgDp() const
Return adjoint sensitivity stored in gradient format.
IntegratorAdjointSensitivity()
Destructor.