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<
const 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);
130 virtual Teuchos::RCP<IntegratorObserverComposite<Scalar> >
getObserver()
145 virtual Teuchos::RCP<Thyra::VectorBase<Scalar> >
getX()
const
148 virtual Teuchos::RCP<Thyra::VectorBase<Scalar> >
getXdot()
const
151 virtual Teuchos::RCP<Thyra::VectorBase<Scalar> >
getXdotdot()
const
168 {
return integratorPL_->get<
int>(
"Screen Output Index Interval"); }
174 {
return integratorPL_->get<std::string>(
"Screen Output Index List",
""); }
193 void describe(Teuchos::FancyOStream & out,
194 const Teuchos::EVerbosityLevel verbLevel)
const override;
221 template<
class Scalar>
223 Teuchos::RCP<Teuchos::ParameterList> pList,
224 const Teuchos::RCP<Thyra::ModelEvaluator<Scalar> >& model);
227 template<
class Scalar>
229 const Teuchos::RCP<Thyra::ModelEvaluator<Scalar> >& model,
230 std::string stepperType);
233 template<
class Scalar>
237 template<
class Scalar>
239 Teuchos::RCP<Teuchos::ParameterList> pList,
240 std::vector<Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> > > models);
245 #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_
virtual void setScreenOutputIndexList(std::string s)
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_
virtual std::string getScreenOutputIndexList() const
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.
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 int getIndex() const override
Get current index.
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...
Teuchos::RCP< IntegratorBasic< Scalar > > integratorBasic(Teuchos::RCP< Teuchos::ParameterList > pList, const Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > &model)
Non-member constructor.
virtual int getScreenOutputIndexInterval() const
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.
virtual void setStepper(Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > model)
Set the Stepper.
Thyra Base interface for time integrators. Time integrators are designed to advance the solution from...
virtual Teuchos::RCP< Teuchos::Time > getStepperTimer() const override
virtual Teuchos::RCP< TimeStepControl< Scalar > > getNonConstTimeStepControl() override
virtual void startTimeStep()
Start time step.
virtual Teuchos::RCP< IntegratorObserverComposite< Scalar > > getObserver()
Get the Observer.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const override
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.
virtual void setScreenOutputIndexInterval(int i)