9 #ifndef Tempus_IntegratorBasic_decl_hpp
10 #define Tempus_IntegratorBasic_decl_hpp
13 #include "Teuchos_VerboseObject.hpp"
14 #include "Teuchos_Describable.hpp"
15 #include "Teuchos_ParameterList.hpp"
16 #include "Teuchos_Time.hpp"
18 #include "Thyra_ModelEvaluator.hpp"
19 #include "Thyra_NonlinearSolverBase.hpp"
21 #include "Tempus_Stepper.hpp"
23 #include "Tempus_TimeStepControl.hpp"
24 #include "Tempus_IntegratorObserverBasic.hpp"
25 #include "Tempus_IntegratorObserverComposite.hpp"
34 template<
class Scalar>
41 Teuchos::RCP<Teuchos::ParameterList> pList,
42 const Teuchos::RCP<Thyra::ModelEvaluator<Scalar> >& model);
46 const Teuchos::RCP<Thyra::ModelEvaluator<Scalar> >& model,
47 std::string stepperType);
54 Teuchos::RCP<Teuchos::ParameterList> pList,
55 std::vector<Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> > > models);
65 virtual bool advanceTime(
const Scalar timeFinal)
override;
78 Teuchos::RCP<Teuchos::ParameterList> pl)
override
81 if (pl != Teuchos::null) *
tempusPL_ = *pl;
98 virtual Teuchos::RCP<Stepper<Scalar> >
getStepper()
const override
101 virtual void setStepper(Teuchos::RCP<Thyra::ModelEvaluator<Scalar> > model);
104 std::vector<Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> > > models);
112 Teuchos::RCP<
const Thyra::VectorBase<Scalar> > x0,
113 Teuchos::RCP<
const Thyra::VectorBase<Scalar> > xdot0 = Teuchos::null,
114 Teuchos::RCP<
const Thyra::VectorBase<Scalar> > xdotdot0 = Teuchos::null);
128 virtual Teuchos::RCP<IntegratorObserverComposite<Scalar> >
getObserver()
143 virtual Teuchos::RCP<Thyra::VectorBase<Scalar> >
getX()
const
146 virtual Teuchos::RCP<Thyra::VectorBase<Scalar> >
getXdot()
const
149 virtual Teuchos::RCP<Thyra::VectorBase<Scalar> >
getXdotdot()
const
179 void describe(Teuchos::FancyOStream & out,
180 const Teuchos::EVerbosityLevel verbLevel)
const override;
207 template<
class Scalar>
209 Teuchos::RCP<Teuchos::ParameterList> pList,
210 const Teuchos::RCP<Thyra::ModelEvaluator<Scalar> >& model);
213 template<
class Scalar>
215 const Teuchos::RCP<Thyra::ModelEvaluator<Scalar> >& model,
216 std::string stepperType);
219 template<
class Scalar>
223 template<
class Scalar>
225 Teuchos::RCP<Teuchos::ParameterList> pList,
226 std::vector<Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> > > models);
231 #endif // Tempus_IntegratorBasic_decl_hpp
virtual bool advanceTime()
Advance the solution to timeMax, and return true if successful.
Teuchos::RCP< Stepper< Scalar > > stepper_
Teuchos::RCP< Teuchos::ParameterList > unsetParameterList() override
virtual Teuchos::RCP< Stepper< Scalar > > getStepper() const override
Get the Stepper.
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const override
Create valid IntegratorBasic ParameterList.
virtual Scalar getTime() const override
Get current time.
Teuchos::RCP< Teuchos::ParameterList > getIntegratorParameterList()
Teuchos::RCP< Teuchos::ParameterList > integratorPL_
Teuchos::RCP< Teuchos::Time > integratorTimer_
std::string description() const override
virtual void setTimeStepControl(Teuchos::RCP< TimeStepControl< Scalar > > tsc=Teuchos::null)
Set the TimeStepControl.
virtual void setObserver(Teuchos::RCP< IntegratorObserver< Scalar > > obs=Teuchos::null)
Set the Observer.
virtual Teuchos::RCP< SolutionState< Scalar > > getCurrentState()
Get current state.
virtual Status getStatus() const override
Get Status.
Teuchos::RCP< Teuchos::Time > stepperTimer_
IntegratorBasic()
Constructor that requires a subsequent setParameterList, setStepper, and initialize calls...
Teuchos::RCP< IntegratorObserverComposite< Scalar > > integratorObserver_
Thyra Base interface for time steppers.
virtual Teuchos::RCP< Thyra::VectorBase< Scalar > > getXdotdot() const
Get current the second time derivative of the solution, xdotdot.
virtual void checkTimeStep()
Check if time step has passed or failed.
virtual Teuchos::RCP< Teuchos::ParameterList > getTempusParameterList() override
Return a copy of the Tempus ParameterList.
Teuchos::RCP< Tempus::IntegratorBasic< Scalar > > integratorBasic(Teuchos::RCP< Teuchos::ParameterList > pList, const Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > &model)
Non-member constructor.
virtual Teuchos::RCP< const SolutionHistory< Scalar > > getSolutionHistory() const override
Get the SolutionHistory.
void parseScreenOutput()
Parse when screen output should be executed.
virtual void setSolutionHistory(Teuchos::RCP< SolutionHistory< Scalar > > sh=Teuchos::null)
Set the SolutionHistory.
Teuchos::RCP< Teuchos::ParameterList > tempusPL_
Status
Status for the Integrator, the Stepper and the SolutionState.
IntegratorObserver class for time integrators.
Teuchos::RCP< TimeStepControl< Scalar > > timeStepControl_
Teuchos::RCP< Teuchos::ParameterList > getNonconstParameterList() override
Teuchos::RCP< SolutionHistory< Scalar > > solutionHistory_
virtual void setStepperWStepper(Teuchos::RCP< Stepper< Scalar > > stepper)
Set the Stepper.
virtual void setTempusParameterList(Teuchos::RCP< Teuchos::ParameterList > pl) override
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > &pl) override
TimeStepControl manages the time step size. There several mechanicisms that effect the time step size...
virtual void initializeSolutionHistory(Teuchos::RCP< SolutionState< Scalar > > state=Teuchos::null)
Set the initial state which has the initial conditions.
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
virtual Teuchos::RCP< const TimeStepControl< Scalar > > getTimeStepControl() const override
Get the TimeStepControl.
virtual void initialize()
Initializes the Integrator after set* function calls.
virtual void endIntegrator()
Perform tasks after end of integrator.
virtual ~IntegratorBasic()
Destructor.
virtual void startIntegrator()
Perform tasks before start of integrator.
Thyra Base interface for time integrators. Time integrators are designed to advance the solution from...
virtual Teuchos::RCP< Teuchos::Time > getStepperTimer() const override
virtual void startTimeStep()
Start time step.
virtual void setStepper(Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > model)
Set the Stepper.
virtual Teuchos::RCP< IntegratorObserverComposite< Scalar > > getObserver()
Get the Observer.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const override
virtual Scalar getIndex() const override
Get current index.
virtual Teuchos::RCP< Thyra::VectorBase< Scalar > > getXdot() const
Get current the time derivative of the solution, xdot.
virtual Teuchos::RCP< Thyra::VectorBase< Scalar > > getX() const
Get current the solution, x.
std::vector< int > outputScreenIndices_
Vector of screen output indices.
Solution state for integrators and steppers. SolutionState contains the metadata for solutions and th...
virtual Teuchos::RCP< Teuchos::Time > getIntegratorTimer() const override
Returns the IntegratorTimer_ for this Integrator.