From f0b9221ef83daf5902481bb22cc13728bc62f88b Mon Sep 17 00:00:00 2001 From: "Curtis C. Ober" Date: Fri, 17 Dec 2021 09:43:25 -0700 Subject: [PATCH 1/2] Tempus: Deprecate Some Functions Several functions can be labelled for deprecation in preparation for the next major release. * IntegratorBasic::getTempusParameterList() and IntegratorBasic::setTempusParameterList. IntegratorBasic is no longer a ParameterList Acceptor. One can still get a ParameterList from IntegratorBasic::getValidParameters(), but setting the ParameterList is essentially resetting the IntegratorBasic, so just recreate it with createIntegratorBasic(pl). * Three constructors for SolutionState. These have been replaced with non-member constructor functions. * Stepper::solveImplicitODE(x). This has been replaced with Stepper::solveImplicitODE(x, xDot, t, p) which includes many steps needed for the solve. Some steppers are not ready for the new solveImplicitODE(x, xDot, t, p), so the solveImplicitODE(x) functionality has been inlined. * Stepper::setNonConstModel() * TimeStepControl::getNextTimeStep() and TimeStepControlStrategy::getNextTimeStep(). This has been replaced with TimeStepControlStrategy::setNextTimeStep() as it reflects that it sets the timestep on the SolutionState. --- .../src/Tempus_IntegratorBasic_decl.hpp | 5 +++ .../tempus/src/Tempus_SolutionState_decl.hpp | 7 ++-- .../src/Tempus_StepperHHTAlpha_impl.hpp | 4 +-- .../Tempus_StepperIMEX_RK_Partition_impl.hpp | 32 +++++++------------ .../src/Tempus_StepperImplicit_decl.hpp | 7 +++- .../src/Tempus_StepperImplicit_impl.hpp | 7 +++- ...empus_StepperNewmarkImplicitAForm_impl.hpp | 7 ++-- ...empus_StepperNewmarkImplicitDForm_impl.hpp | 5 ++- packages/tempus/src/Tempus_Stepper_decl.hpp | 1 + packages/tempus/src/Tempus_Stepper_impl.hpp | 2 +- .../src/Tempus_TimeStepControlStrategy.hpp | 3 +- .../src/Tempus_TimeStepControl_decl.hpp | 3 +- 12 files changed, 48 insertions(+), 35 deletions(-) diff --git a/packages/tempus/src/Tempus_IntegratorBasic_decl.hpp b/packages/tempus/src/Tempus_IntegratorBasic_decl.hpp index b9693bea9a25..7cf230aedd94 100644 --- a/packages/tempus/src/Tempus_IntegratorBasic_decl.hpp +++ b/packages/tempus/src/Tempus_IntegratorBasic_decl.hpp @@ -60,15 +60,20 @@ class IntegratorBasic : virtual public Tempus::Integrator virtual void checkTimeStep(); /// Perform tasks after end of integrator. virtual void endIntegrator(); +#ifndef TEMPUS_HIDE_DEPRECATED_CODE /// Return a copy of the Tempus ParameterList DEPRECATED! + TEMPUS_DEPRECATED virtual Teuchos::RCP getTempusParameterList() override { return Teuchos::rcp_const_cast (this->getValidParameters()); } + + TEMPUS_DEPRECATED virtual void setTempusParameterList( Teuchos::RCP pl) override { TEUCHOS_TEST_FOR_EXCEPTION( true, std::logic_error, " IntegratorBasic::setTempusParameterList() -- Deprecated!\n"); } +#endif //@} /// \name Accessor methods diff --git a/packages/tempus/src/Tempus_SolutionState_decl.hpp b/packages/tempus/src/Tempus_SolutionState_decl.hpp index d3fcff2992a7..12be14b93ffb 100644 --- a/packages/tempus/src/Tempus_SolutionState_decl.hpp +++ b/packages/tempus/src/Tempus_SolutionState_decl.hpp @@ -67,6 +67,7 @@ class SolutionState : SolutionState(); #ifndef TEMPUS_HIDE_DEPRECATED_CODE + TEMPUS_DEPRECATED SolutionState( const Teuchos::RCP >& x, const Teuchos::RCP >& xdot = Teuchos::null, @@ -74,14 +75,15 @@ class SolutionState : const Teuchos::RCP >& stepperState = Teuchos::null, const Teuchos::RCP >& physicsState = Teuchos::null); + TEMPUS_DEPRECATED SolutionState( const Teuchos::RCP >& x, const Teuchos::RCP >& xdot = Teuchos::null, const Teuchos::RCP >& xddot= Teuchos::null, const Teuchos::RCP >& stepperSt = Teuchos::null, const Teuchos::RCP >& physicsSt = Teuchos::null); -#endif +#endif SolutionState( const Teuchos::RCP > ssmd, const Teuchos::RCP >& x, @@ -99,12 +101,13 @@ class SolutionState : const Teuchos::RCP >& physicsState); #ifndef TEMPUS_HIDE_DEPRECATED_CODE + TEMPUS_DEPRECATED SolutionState( const Teuchos::RCP >& model, const Teuchos::RCP >& stepperState = Teuchos::null, const Teuchos::RCP >& physicsState = Teuchos::null); -#endif +#endif /// This is a shallow copy constructor, use clone for a deep copy constructor SolutionState(const SolutionState& ss); diff --git a/packages/tempus/src/Tempus_StepperHHTAlpha_impl.hpp b/packages/tempus/src/Tempus_StepperHHTAlpha_impl.hpp index 447e82e700ba..f6485a1eeae7 100644 --- a/packages/tempus/src/Tempus_StepperHHTAlpha_impl.hpp +++ b/packages/tempus/src/Tempus_StepperHHTAlpha_impl.hpp @@ -409,7 +409,7 @@ void StepperHHTAlpha::takeStep( Thyra::put_scalar(0.0, a_init.ptr()); } wrapperModel->initializeNewmark(v_init,d_init,0.0,time,beta_,gamma_); - const Thyra::SolveStatus sStatus=this->solveImplicitODE(a_init); + const Thyra::SolveStatus sStatus=(*(this->solver_)).solve(&*a_init); workingState->setSolutionStatus(sStatus); // Converged --> pass. Thyra::copy(*a_init, a_old.ptr()); @@ -439,7 +439,7 @@ void StepperHHTAlpha::takeStep( StepperHHTAlphaAppAction::ACTION_LOCATION::BEFORE_SOLVE); //Solve for new acceleration - const Thyra::SolveStatus sStatus = this->solveImplicitODE(a_new); + const Thyra::SolveStatus sStatus = (*(this->solver_)).solve(&*a_new); stepperHHTAlphaAppAction_->execute(solutionHistory, thisStepper, StepperHHTAlphaAppAction::ACTION_LOCATION::AFTER_SOLVE); diff --git a/packages/tempus/src/Tempus_StepperIMEX_RK_Partition_impl.hpp b/packages/tempus/src/Tempus_StepperIMEX_RK_Partition_impl.hpp index 0a8eae3d6f1d..6b5f9da23686 100644 --- a/packages/tempus/src/Tempus_StepperIMEX_RK_Partition_impl.hpp +++ b/packages/tempus/src/Tempus_StepperIMEX_RK_Partition_impl.hpp @@ -640,7 +640,6 @@ void StepperIMEX_RK_Partition::takeStep( (this->wrapperModel_); bool pass = true; - Thyra::SolveStatus sStatus; Thyra::assign(workingState->getX().ptr(), *(currentState->getX())); RCP > stageY = wrapperModelPairIMEX->getExplicitOnlyVector(workingState->getX()); @@ -699,31 +698,22 @@ void StepperIMEX_RK_Partition::takeStep( Teuchos::rcp(new StepperIMEX_RKPartTimeDerivative( alpha, xTilde_.getConst())); - // Setup InArgs and OutArgs - typedef Thyra::ModelEvaluatorBase MEB; - //MEB::InArgs inArgs = wrapperModelPairIMEX->getInArgs(); - //MEB::OutArgs outArgs = wrapperModelPairIMEX->getOutArgs(); - wrapperModelPairIMEX->setUseImplicitModel(true); - MEB::InArgs inArgs = wrapperModelPairIMEX->createInArgs(); - MEB::OutArgs outArgs = wrapperModelPairIMEX->createOutArgs(); - inArgs.set_x(stageX); - if (wrapperModelPairIMEX->getParameterIndex() >= 0) - inArgs.set_p(wrapperModelPairIMEX->getParameterIndex(), stageY); - if (inArgs.supports(MEB::IN_ARG_x_dot)) inArgs.set_x_dot(stageGx_[i]); - if (inArgs.supports(MEB::IN_ARG_t )) inArgs.set_t (ts); - if (inArgs.supports(MEB::IN_ARG_step_size)) inArgs.set_step_size(dt); - if (inArgs.supports(MEB::IN_ARG_alpha )) inArgs.set_alpha (alpha); - if (inArgs.supports(MEB::IN_ARG_beta )) inArgs.set_beta (beta); - if (inArgs.supports(MEB::IN_ARG_stage_number)) - inArgs.set_stage_number(i); - - wrapperModelPairIMEX->setForSolve(timeDer, inArgs, outArgs); + auto p = Teuchos::rcp(new ImplicitODEParameters( + timeDer, dt, alpha, beta, SOLVE_FOR_X, i)); this->stepperRKAppAction_->execute(solutionHistory, thisStepper, StepperRKAppAction::ACTION_LOCATION::BEFORE_SOLVE); + wrapperModelPairIMEX->setUseImplicitModel(true); this->solver_->setModel(wrapperModelPairIMEX); - sStatus = this->solveImplicitODE(stageX); + + Thyra::SolveStatus sStatus; + if (wrapperModelPairIMEX->getParameterIndex() >= 0) + sStatus = this->solveImplicitODE(stageX, stageGx_[i], ts, p, + stageY, wrapperModelPairIMEX->getParameterIndex()); + else + sStatus = this->solveImplicitODE(stageX, stageGx_[i], ts, p); + if (sStatus.solveStatus != Thyra::SOLVE_STATUS_CONVERGED) pass = false; wrapperModelPairIMEX->setUseImplicitModel(false); diff --git a/packages/tempus/src/Tempus_StepperImplicit_decl.hpp b/packages/tempus/src/Tempus_StepperImplicit_decl.hpp index d95af0a98c98..d61afc1a38cb 100644 --- a/packages/tempus/src/Tempus_StepperImplicit_decl.hpp +++ b/packages/tempus/src/Tempus_StepperImplicit_decl.hpp @@ -264,16 +264,21 @@ class StepperImplicit : virtual public Tempus::Stepper /// Return beta = d(x)/dx. virtual Scalar getBeta (const Scalar dt) const = 0; +#ifndef TEMPUS_HIDE_DEPRECATED_CODE /// Solve problem using x in-place. (Needs to be deprecated!) + TEMPUS_DEPRECATED const Thyra::SolveStatus solveImplicitODE( const Teuchos::RCP > & x); +#endif /// Solve implicit ODE, f(x, xDot, t, p) = 0. const Thyra::SolveStatus solveImplicitODE( const Teuchos::RCP > & x, const Teuchos::RCP > & xDot, const Scalar time, - const Teuchos::RCP > & p ); + const Teuchos::RCP > & p, + const Teuchos::RCP > & y = Teuchos::null, + const int index = 0 /* index and y are for IMEX_RK_Partition */ ); /// Evaluate implicit ODE residual, f(x, xDot, t, p). void evaluateImplicitODE( diff --git a/packages/tempus/src/Tempus_StepperImplicit_impl.hpp b/packages/tempus/src/Tempus_StepperImplicit_impl.hpp index 3048735a90c0..f0c1c2d13724 100644 --- a/packages/tempus/src/Tempus_StepperImplicit_impl.hpp +++ b/packages/tempus/src/Tempus_StepperImplicit_impl.hpp @@ -237,6 +237,7 @@ void StepperImplicit::setSolver( } +#ifndef TEMPUS_HIDE_DEPRECATED_CODE template const Thyra::SolveStatus StepperImplicit::solveImplicitODE( @@ -251,18 +252,22 @@ StepperImplicit::solveImplicitODE( } +#endif template const Thyra::SolveStatus StepperImplicit::solveImplicitODE( const Teuchos::RCP > & x, const Teuchos::RCP > & xDot, const Scalar time, - const Teuchos::RCP > & p ) + const Teuchos::RCP > & p, + const Teuchos::RCP > & y, + const int index ) { typedef Thyra::ModelEvaluatorBase MEB; MEB::InArgs inArgs = wrapperModel_->getInArgs(); MEB::OutArgs outArgs = wrapperModel_->getOutArgs(); inArgs.set_x(x); + if ( y != Teuchos::null ) inArgs.set_p(index, y); if (inArgs.supports(MEB::IN_ARG_x_dot )) inArgs.set_x_dot (xDot); if (inArgs.supports(MEB::IN_ARG_t )) inArgs.set_t (time); if (inArgs.supports(MEB::IN_ARG_step_size)) diff --git a/packages/tempus/src/Tempus_StepperNewmarkImplicitAForm_impl.hpp b/packages/tempus/src/Tempus_StepperNewmarkImplicitAForm_impl.hpp index 8b076752e38d..db049a1d6fc4 100644 --- a/packages/tempus/src/Tempus_StepperNewmarkImplicitAForm_impl.hpp +++ b/packages/tempus/src/Tempus_StepperNewmarkImplicitAForm_impl.hpp @@ -352,7 +352,7 @@ void StepperNewmarkImplicitAForm::setInitialConditions( this->wrapperModel_); wrapperModel->initializeNewmark(xDot, x, 0.0, time, beta_, gamma_); - const Thyra::SolveStatus sStatus = this->solveImplicitODE(xDotDot); + const Thyra::SolveStatus sStatus = (*(this->solver_)).solve(&*xDotDot); TEUCHOS_TEST_FOR_EXCEPTION( sStatus.solveStatus != Thyra::SOLVE_STATUS_CONVERGED, std::logic_error, @@ -482,8 +482,11 @@ void StepperNewmarkImplicitAForm::takeStep( stepperNewmarkImpAppAction_->execute(solutionHistory, thisStepper, StepperNewmarkImplicitAFormAppAction::ACTION_LOCATION::BEFORE_SOLVE); + if (this->getZeroInitialGuess()) + Thyra::assign(a_new.ptr(), Teuchos::ScalarTraits::zero()); + // Solve nonlinear system with a_new as initial guess - const Thyra::SolveStatus sStatus = this->solveImplicitODE(a_new); + const Thyra::SolveStatus sStatus = (*(this->solver_)).solve(&*a_new); stepperNewmarkImpAppAction_->execute(solutionHistory, thisStepper, StepperNewmarkImplicitAFormAppAction::ACTION_LOCATION::AFTER_SOLVE); diff --git a/packages/tempus/src/Tempus_StepperNewmarkImplicitDForm_impl.hpp b/packages/tempus/src/Tempus_StepperNewmarkImplicitDForm_impl.hpp index dc69d0fbdfa8..5fcd7fb2acc5 100644 --- a/packages/tempus/src/Tempus_StepperNewmarkImplicitDForm_impl.hpp +++ b/packages/tempus/src/Tempus_StepperNewmarkImplicitDForm_impl.hpp @@ -381,15 +381,14 @@ StepperNewmarkImplicitDForm::takeStep( //Set d_pred as initial guess for NOX solver, and solve nonlinear system. - const Thyra::SolveStatus sStatus = - this->solveImplicitODE(initial_guess); + const Thyra::SolveStatus sStatus = (*(this->solver_)).solve(&*initial_guess); workingState->setSolutionStatus(sStatus); // Converged --> pass. stepperNewmarkImpAppAction_->execute(solutionHistory, thisStepper, StepperNewmarkImplicitDFormAppAction::ACTION_LOCATION::AFTER_SOLVE); - //solveImplicitODE will return converged solution in initial_guess + //solve will return converged solution in initial_guess //vector. Copy it here to d_new, to define the new displacement. Thyra::copy(*initial_guess, d_new.ptr()); diff --git a/packages/tempus/src/Tempus_Stepper_decl.hpp b/packages/tempus/src/Tempus_Stepper_decl.hpp index 6dbed0b6ce5f..c76aeaa89044 100644 --- a/packages/tempus/src/Tempus_Stepper_decl.hpp +++ b/packages/tempus/src/Tempus_Stepper_decl.hpp @@ -66,6 +66,7 @@ class Stepper const Teuchos::RCP >& appModel) {} #ifndef TEMPUS_HIDE_DEPRECATED_CODE + TEMPUS_DEPRECATED virtual void setNonConstModel( const Teuchos::RCP >& /* appModel */){} diff --git a/packages/tempus/src/Tempus_Stepper_impl.hpp b/packages/tempus/src/Tempus_Stepper_impl.hpp index 36814abcef9d..eaa54fffe3e0 100644 --- a/packages/tempus/src/Tempus_Stepper_impl.hpp +++ b/packages/tempus/src/Tempus_Stepper_impl.hpp @@ -102,7 +102,7 @@ Stepper::getStepperXDotDot() return stepperXDotDot_; } -// Need to deprecate. + template Teuchos::RCP > Stepper::getStepperXDotDot(Teuchos::RCP > state) diff --git a/packages/tempus/src/Tempus_TimeStepControlStrategy.hpp b/packages/tempus/src/Tempus_TimeStepControlStrategy.hpp index 69c4daecfafe..7225ca636310 100644 --- a/packages/tempus/src/Tempus_TimeStepControlStrategy.hpp +++ b/packages/tempus/src/Tempus_TimeStepControlStrategy.hpp @@ -45,6 +45,7 @@ class TimeStepControlStrategy #ifndef TEMPUS_HIDE_DEPRECATED_CODE /// Deprecated get the time step size. + TEMPUS_DEPRECATED virtual void getNextTimeStep( const TimeStepControl tsc, Teuchos::RCP > sh, @@ -52,8 +53,8 @@ class TimeStepControlStrategy { this->setNextTimeStep(tsc, sh, integratorStatus); } -#endif +#endif /// Set the time step size. virtual void setNextTimeStep( const TimeStepControl & /* tsc */, diff --git a/packages/tempus/src/Tempus_TimeStepControl_decl.hpp b/packages/tempus/src/Tempus_TimeStepControl_decl.hpp index 4de9ba38bce8..48c831c078a3 100644 --- a/packages/tempus/src/Tempus_TimeStepControl_decl.hpp +++ b/packages/tempus/src/Tempus_TimeStepControl_decl.hpp @@ -84,14 +84,15 @@ class TimeStepControl #ifndef TEMPUS_HIDE_DEPRECATED_CODE /// Deprecated get the time step size. + TEMPUS_DEPRECATED virtual void getNextTimeStep( const Teuchos::RCP > & sh, Status & integratorStatus) { this->setNextTimeStep(sh, integratorStatus); }; -#endif +#endif /** \brief Determine the time step size.*/ virtual void setNextTimeStep( const Teuchos::RCP > & solutionHistory, From 0bb39ec3d380e6db0542b5a9c28327d35a25f726 Mon Sep 17 00:00:00 2001 From: "Curtis C. Ober" Date: Fri, 17 Dec 2021 12:46:34 -0700 Subject: [PATCH 2/2] Tempus: Deprecate Some Functions Failed to deprecate functions in derived classes. --- packages/tempus/src/Tempus_Integrator.hpp | 4 ++++ .../Tempus_IntegratorAdjointSensitivity_decl.hpp | 10 +++++++--- .../Tempus_IntegratorAdjointSensitivity_impl.hpp | 2 ++ .../tempus/src/Tempus_IntegratorBasicOld_decl.hpp | 4 ++-- .../Tempus_IntegratorForwardSensitivity_decl.hpp | 14 +++++++++----- ...ratorPseudoTransientAdjointSensitivity_decl.hpp | 4 ++++ ...ratorPseudoTransientAdjointSensitivity_impl.hpp | 2 ++ ...ratorPseudoTransientForwardSensitivity_decl.hpp | 8 ++++++-- 8 files changed, 36 insertions(+), 12 deletions(-) diff --git a/packages/tempus/src/Tempus_Integrator.hpp b/packages/tempus/src/Tempus_Integrator.hpp index e74bce208240..37773fb4d9b1 100644 --- a/packages/tempus/src/Tempus_Integrator.hpp +++ b/packages/tempus/src/Tempus_Integrator.hpp @@ -79,9 +79,13 @@ class Integrator virtual void setStatus(const Tempus::Status st) = 0; /// Get the stepper virtual Teuchos::RCP > getStepper() const = 0; +#ifndef TEMPUS_HIDE_DEPRECATED_CODE /// Return a copy of the Tempus ParameterList + TEMPUS_DEPRECATED virtual Teuchos::RCP getTempusParameterList() = 0; + TEMPUS_DEPRECATED virtual void setTempusParameterList(Teuchos::RCP pl) = 0; +#endif /// Returns the SolutionHistory for this Integrator virtual Teuchos::RCP > getSolutionHistory() const = 0; /// Returns the SolutionHistory for this Integrator diff --git a/packages/tempus/src/Tempus_IntegratorAdjointSensitivity_decl.hpp b/packages/tempus/src/Tempus_IntegratorAdjointSensitivity_decl.hpp index 873a9956d9f9..1e148f679ba0 100644 --- a/packages/tempus/src/Tempus_IntegratorAdjointSensitivity_decl.hpp +++ b/packages/tempus/src/Tempus_IntegratorAdjointSensitivity_decl.hpp @@ -52,12 +52,12 @@ class IntegratorAdjointSensitivity : { public: - /** \brief Full Constructor with model, and will be fully initialized. + /** \brief Full Constructor with model, and will be fully initialized. * * \param[in] model The forward physics ModelEvaluator * \param[in] state_integrator Forward state Integrator for the forward problem - * \param[in] adjoint_model ModelEvaluator for the adjoint physics/problem - * \param[in] adjoint_aux_model ModelEvaluator for the auxiliary adjoint physics/problem + * \param[in] adjoint_model ModelEvaluator for the adjoint physics/problem + * \param[in] adjoint_aux_model ModelEvaluator for the auxiliary adjoint physics/problem * \param[in] adjoint_integrator Time integrator for the adjoint problem * \param[in] solution_history The forward state solution history * \param[in] p_index Sensitivity parameter index @@ -145,9 +145,13 @@ class IntegratorAdjointSensitivity : virtual void setStatus(const Status st) override; /// Get the Stepper virtual Teuchos::RCP > getStepper() const override; +#ifndef TEMPUS_HIDE_DEPRECATED_CODE /// Return a copy of the Tempus ParameterList + TEMPUS_DEPRECATED virtual Teuchos::RCP getTempusParameterList() override; + TEMPUS_DEPRECATED virtual void setTempusParameterList(Teuchos::RCP pl) override; +#endif /// Get the SolutionHistory virtual Teuchos::RCP > getSolutionHistory() const override; /// Get the SolutionHistory diff --git a/packages/tempus/src/Tempus_IntegratorAdjointSensitivity_impl.hpp b/packages/tempus/src/Tempus_IntegratorAdjointSensitivity_impl.hpp index 619d116bb4fb..2869fb05007f 100644 --- a/packages/tempus/src/Tempus_IntegratorAdjointSensitivity_impl.hpp +++ b/packages/tempus/src/Tempus_IntegratorAdjointSensitivity_impl.hpp @@ -337,6 +337,7 @@ getStepper() const return state_integrator_->getStepper(); } +#ifndef TEMPUS_HIDE_DEPRECATED_CODE template Teuchos::RCP IntegratorAdjointSensitivity:: @@ -354,6 +355,7 @@ setTempusParameterList(Teuchos::RCP pl) adjoint_integrator_->setTempusParameterList(pl); } +#endif template Teuchos::RCP > IntegratorAdjointSensitivity:: diff --git a/packages/tempus/src/Tempus_IntegratorBasicOld_decl.hpp b/packages/tempus/src/Tempus_IntegratorBasicOld_decl.hpp index c31db04f3323..e804e87f347b 100644 --- a/packages/tempus/src/Tempus_IntegratorBasicOld_decl.hpp +++ b/packages/tempus/src/Tempus_IntegratorBasicOld_decl.hpp @@ -69,9 +69,9 @@ class IntegratorBasicOld virtual void endIntegrator(); /// Return a copy of the Tempus ParameterList virtual Teuchos::RCP getTempusParameterList() - override { return tempusPL_; } + { return tempusPL_; } virtual void setTempusParameterList( - Teuchos::RCP pl) override + Teuchos::RCP pl) { if (tempusPL_==Teuchos::null) tempusPL_=Teuchos::parameterList("Tempus"); if (pl != Teuchos::null) *tempusPL_ = *pl; diff --git a/packages/tempus/src/Tempus_IntegratorForwardSensitivity_decl.hpp b/packages/tempus/src/Tempus_IntegratorForwardSensitivity_decl.hpp index bf39429145ca..7d470fea274b 100644 --- a/packages/tempus/src/Tempus_IntegratorForwardSensitivity_decl.hpp +++ b/packages/tempus/src/Tempus_IntegratorForwardSensitivity_decl.hpp @@ -51,7 +51,7 @@ class IntegratorForwardSensitivity { public: - /** \brief Full Constructor with model, and will be fully initialized. + /** \brief Full Constructor with model, and will be fully initialized. * * \param[in] model The forward physics ModelEvaluator * \param[in] integrator Forward state Integrator @@ -123,11 +123,15 @@ class IntegratorForwardSensitivity /// Perform tasks after end of integrator. virtual void endIntegrator() { integrator_->endIntegrator(); } +#ifndef TEMPUS_HIDE_DEPRECATED_CODE /// Return a copy of the Tempus ParameterList + TEMPUS_DEPRECATED virtual Teuchos::RCP getTempusParameterList() override { return integrator_->getTempusParameterList(); } + TEMPUS_DEPRECATED virtual void setTempusParameterList(Teuchos::RCP pl) override { integrator_->setTempusParameterList(pl); } +#endif //@} /// \name Accessor methods @@ -208,11 +212,11 @@ class IntegratorForwardSensitivity * @brief Get the current solution, x, only. If looking for the solution * vector and the sensitivities, use `SolutionState->getX()` which will return a * Block MultiVector with the first block containing the current solution, x, - * and the remaining blocks are the forward sensitivities \f$dx/dp\f$. + * and the remaining blocks are the forward sensitivities \f$dx/dp\f$. * * Use `getDxDp` to get the forward sensitivities \f$dx/dp\f$ only. * - * @return The current solution, x, without the sensitivities. + * @return The current solution, x, without the sensitivities. * */ virtual Teuchos::RCP > getX() const; @@ -222,7 +226,7 @@ class IntegratorForwardSensitivity * @brief Get current the time derivative of the solution, xdot, only. This * is the first block only and not the full Block MultiVector. * - * @return Get current the time derivative of the solution, xdot. + * @return Get current the time derivative of the solution, xdot. * */ virtual Teuchos::RCP > getXDot() const; virtual Teuchos::RCP > getDXDotDp() const; @@ -232,7 +236,7 @@ class IntegratorForwardSensitivity * * Use `getDXDotDp` to get the forward sensitivities. * - * @return Get current the second time derivative of the solution, xdotdot. + * @return Get current the second time derivative of the solution, xdotdot. * */ virtual Teuchos::RCP > getXDotDot() const; virtual Teuchos::RCP > getDXDotDotDp() const; diff --git a/packages/tempus/src/Tempus_IntegratorPseudoTransientAdjointSensitivity_decl.hpp b/packages/tempus/src/Tempus_IntegratorPseudoTransientAdjointSensitivity_decl.hpp index 9c89c0d02f47..16d5300667fc 100644 --- a/packages/tempus/src/Tempus_IntegratorPseudoTransientAdjointSensitivity_decl.hpp +++ b/packages/tempus/src/Tempus_IntegratorPseudoTransientAdjointSensitivity_decl.hpp @@ -141,9 +141,13 @@ class IntegratorPseudoTransientAdjointSensitivity virtual void setStatus(const Status st) override; /// Get the Stepper virtual Teuchos::RCP > getStepper() const override; +#ifndef TEMPUS_HIDE_DEPRECATED_CODE /// Return a copy of the Tempus ParameterList + TEMPUS_DEPRECATED virtual Teuchos::RCP getTempusParameterList() override; + TEMPUS_DEPRECATED virtual void setTempusParameterList(Teuchos::RCP pl) override; +#endif /// Get the SolutionHistory virtual Teuchos::RCP > getSolutionHistory() const override; /// Get the SolutionHistory diff --git a/packages/tempus/src/Tempus_IntegratorPseudoTransientAdjointSensitivity_impl.hpp b/packages/tempus/src/Tempus_IntegratorPseudoTransientAdjointSensitivity_impl.hpp index 1c23899a1a56..edb65055e4a1 100644 --- a/packages/tempus/src/Tempus_IntegratorPseudoTransientAdjointSensitivity_impl.hpp +++ b/packages/tempus/src/Tempus_IntegratorPseudoTransientAdjointSensitivity_impl.hpp @@ -176,6 +176,7 @@ getStepper() const return state_integrator_->getStepper(); } +#ifndef TEMPUS_HIDE_DEPRECATED_CODE template Teuchos::RCP IntegratorPseudoTransientAdjointSensitivity:: @@ -193,6 +194,7 @@ setTempusParameterList(Teuchos::RCP pl) sens_integrator_->setTempusParameterList(pl); } +#endif template Teuchos::RCP > IntegratorPseudoTransientAdjointSensitivity:: diff --git a/packages/tempus/src/Tempus_IntegratorPseudoTransientForwardSensitivity_decl.hpp b/packages/tempus/src/Tempus_IntegratorPseudoTransientForwardSensitivity_decl.hpp index 61705e9d8059..291c9d6f2125 100644 --- a/packages/tempus/src/Tempus_IntegratorPseudoTransientForwardSensitivity_decl.hpp +++ b/packages/tempus/src/Tempus_IntegratorPseudoTransientForwardSensitivity_decl.hpp @@ -123,11 +123,15 @@ class IntegratorPseudoTransientForwardSensitivity virtual void setStatus(const Status st) override; /// Get the Stepper virtual Teuchos::RCP > getStepper() const override; +#ifndef TEMPUS_HIDE_DEPRECATED_CODE /// Return a copy of the Tempus ParameterList + TEMPUS_DEPRECATED virtual Teuchos::RCP getTempusParameterList() override { return state_integrator_->getTempusParameterList(); } + TEMPUS_DEPRECATED virtual void setTempusParameterList(Teuchos::RCP pl) override { state_integrator_->setTempusParameterList(pl); } +#endif /// Get the SolutionHistory virtual Teuchos::RCP > getSolutionHistory() const override; /// Get the SolutionHistory @@ -190,7 +194,7 @@ class IntegratorPseudoTransientForwardSensitivity * sensitivity model evaluator, and the sensisitivity integrator * @param model Physics model * - * @return + * @return */ template Teuchos::RCP > @@ -203,7 +207,7 @@ createIntegratorPseudoTransientForwardSensitivity( * @brief Default ctor * * Instantiates a default IntegratorBasic for both the state and the sensitivity - * integrator. + * integrator. * * @return IntegratorPseudoTransientForwardSensitivity */