9 #ifndef Tempus_StepperImplicit_decl_hpp
10 #define Tempus_StepperImplicit_decl_hpp
13 #include "Tempus_Stepper.hpp"
14 #include "Tempus_WrapperModelEvaluatorBasic.hpp"
20 template<
class Scalar>
32 Scalar timeStepSize, Scalar alpha, Scalar beta,
40 Teuchos::RCP<TimeDerivative<Scalar> >
timeDer_;
226 template<
class Scalar>
234 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel);
236 virtual Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >
getModel()
238 Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> > model;
243 virtual Teuchos::RCP<const WrapperModelEvaluator<Scalar> >
250 Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> > solver);
252 virtual Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >
getSolver()
const
260 virtual Scalar
getAlpha(
const Scalar dt)
const = 0;
263 virtual Scalar
getBeta (
const Scalar dt)
const = 0;
267 const Teuchos::RCP<Thyra::VectorBase<Scalar> > & x);
271 const Teuchos::RCP<Thyra::VectorBase<Scalar> > & x,
272 const Teuchos::RCP<Thyra::VectorBase<Scalar> > & xDot,
278 Teuchos::RCP<Thyra::VectorBase<Scalar> > & f,
279 const Teuchos::RCP<Thyra::VectorBase<Scalar> > & x,
280 const Teuchos::RCP<Thyra::VectorBase<Scalar> > & xDot,
286 Teuchos::RCP<
const Thyra::VectorBase<Scalar> > initialGuess)
302 {
return Scalar(1.0e+99);}
307 virtual void describe(Teuchos::FancyOStream & out,
308 const Teuchos::EVerbosityLevel verbLevel)
const;
311 virtual bool isValidSetup(Teuchos::FancyOStream & out)
const;
316 Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >
solver_;
324 #endif // Tempus_StepperImplicit_decl_hpp
virtual void setInitialConditions(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Set the initial conditions and make them consistent.
ImplicitODEParameters(Teuchos::RCP< TimeDerivative< Scalar > > timeDer, Scalar timeStepSize, Scalar alpha, Scalar beta, EVALUATION_TYPE evaluationType=SOLVE_FOR_X, int stageNumber=0)
Constructor.
const Thyra::SolveStatus< Scalar > solveImplicitODE(const Teuchos::RCP< Thyra::VectorBase< Scalar > > &x)
Solve problem using x in-place. (Needs to be deprecated!)
EVALUATION_TYPE
EVALUATION_TYPE indicates the evaluation to apply to the implicit ODE.
Teuchos::RCP< const Thyra::VectorBase< Scalar > > initialGuess_
Teuchos::RCP< WrapperModelEvaluator< Scalar > > wrapperModel_
ImplicitODEParameters()
Constructor.
virtual void setModel(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel)
virtual Teuchos::RCP< const WrapperModelEvaluator< Scalar > > getWrapperModel()
virtual Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > getSolver() const
Get solver.
bool isInitialized_
True if stepper's member data is initialized.
virtual Scalar getBeta(const Scalar dt) const =0
Return beta = d(x)/dx.
Teuchos::RCP< TimeDerivative< Scalar > > timeDer_
Thyra Base interface for time steppers.
void evaluateImplicitODE(Teuchos::RCP< Thyra::VectorBase< Scalar > > &f, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &x, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &xDot, const Scalar time, const Teuchos::RCP< ImplicitODEParameters< Scalar > > &p)
Evaluate implicit ODE residual, f(x, xDot, t, p).
virtual void setSolver(Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > solver)
Set solver.
Thyra Base interface for implicit time steppers.
virtual Scalar getInitTimeStep(const Teuchos::RCP< SolutionHistory< Scalar > > &) const
virtual void setDefaultSolver()
Teuchos::RCP< StepperObserver< Scalar > > stepperObserver_
virtual bool isValidSetup(Teuchos::FancyOStream &out) const
virtual void setZeroInitialGuess(bool zIG)
Set parameter so that the initial guess is set to zero (=True) or use last timestep (=False)...
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
virtual Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > getModel()
This interface defines the time derivative connection between an implicit Stepper and WrapperModelEva...
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
virtual void setInitialGuess(Teuchos::RCP< const Thyra::VectorBase< Scalar > > initialGuess)
Pass initial guess to Newton solver (only relevant for implicit solvers)
virtual Scalar getAlpha(const Scalar dt) const =0
Return alpha = d(xDot)/dx.
EVALUATION_TYPE evaluationType_
Solve for x and determine xDot from x.
Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > solver_
virtual bool getZeroInitialGuess() const