9#ifndef Tempus_IntegratorBasic_decl_hpp
10#define Tempus_IntegratorBasic_decl_hpp
13#include "Teuchos_Time.hpp"
15#include "Thyra_ModelEvaluator.hpp"
17#include "Tempus_config.hpp"
18#include "Tempus_Stepper.hpp"
20#include "Tempus_TimeStepControl.hpp"
21#include "Tempus_IntegratorObserverBasic.hpp"
43 std::vector<int> outputScreenIndices,
44 int outputScreenInterval);
57 virtual bool advanceTime(
const Scalar timeFinal)
override;
82 virtual Teuchos::RCP<Stepper<Scalar> >
getStepper()
const override
132 virtual Teuchos::RCP<Thyra::VectorBase<Scalar> >
getX()
const
135 virtual Teuchos::RCP<Thyra::VectorBase<Scalar> >
getXDot()
const
138 virtual Teuchos::RCP<Thyra::VectorBase<Scalar> >
getXDotDot()
const
164 { TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
165 " IntegratorBasic::parseScreenOutput() -- Should call setScreenOutputIndexList()\n");
173 void describe(Teuchos::FancyOStream & out,
174 const Teuchos::EVerbosityLevel verbLevel)
const override;
214template<
class Scalar>
216 Teuchos::RCP<Teuchos::ParameterList> pList,
217 bool runInitialize=
true);
221template<
class Scalar>
223 Teuchos::RCP<Teuchos::ParameterList> pList,
225 bool runInitialize=
true);
229template<
class Scalar>
232 std::string stepperType);
236template<
class Scalar>
241template<
class Scalar>
243 Teuchos::RCP<Teuchos::ParameterList> pList,
245 bool runInitialize=
true);
virtual void checkTimeStep()
Check if time step has passed or failed.
std::vector< int > outputScreenIndices_
Vector of screen output indices.
virtual void initializeSolutionHistory(Teuchos::RCP< SolutionState< Scalar > > state=Teuchos::null)
Set the initial state which has the initial conditions.
virtual void setSolutionHistory(Teuchos::RCP< SolutionHistory< Scalar > > sh=Teuchos::null)
Set the SolutionHistory.
virtual Teuchos::RCP< const TimeStepControl< Scalar > > getTimeStepControl() const override
Get the TimeStepControl.
virtual Teuchos::RCP< Thyra::VectorBase< Scalar > > getXDotDot() const
Get current the second time derivative of the solution, xdotdot.
virtual Teuchos::RCP< TimeStepControl< Scalar > > getNonConstTimeStepControl() override
int outputScreenInterval_
screen output interval.
virtual void startIntegrator()
Perform tasks before start of integrator.
std::string description() const override
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
Create valid IntegratorBasic ParameterList.
void setIntegratorName(std::string i)
Set the Integrator Name.
Teuchos::RCP< IntegratorObserver< Scalar > > integratorObserver_
virtual Status getStatus() const override
Get Status.
Teuchos::RCP< TimeStepControl< Scalar > > timeStepControl_
Teuchos::RCP< SolutionHistory< Scalar > > solutionHistory_
virtual Scalar getTime() const override
Get current time.
virtual Teuchos::RCP< Teuchos::Time > getIntegratorTimer() const override
Returns the IntegratorTimer_ for this Integrator.
virtual Teuchos::RCP< Stepper< Scalar > > getStepper() const override
Get the Stepper.
virtual void setScreenOutputIndexInterval(int i)
virtual void setStepper(Teuchos::RCP< Stepper< Scalar > > stepper)
Set the Stepper.
std::string integratorName_
integrator name used for I/O.
virtual void setTimeStepControl(Teuchos::RCP< TimeStepControl< Scalar > > tsc=Teuchos::null)
Set the TimeStepControl.
virtual void initialize()
Initializes the Integrator after set* function calls.
std::string getIntegratorType() const
Get the Integrator Type.
void setIntegratorType(std::string i)
Set the Integrator Type.
virtual void endIntegrator()
Perform tasks after end of integrator.
virtual Teuchos::RCP< const SolutionHistory< Scalar > > getSolutionHistory() const override
Get the SolutionHistory.
IntegratorBasic()
Default constructor (requires calls to setModel and setSolutionHistory for initial conditions before ...
virtual void startTimeStep()
Start time step.
virtual void copy(Teuchos::RCP< IntegratorBasic< Scalar > > iB)
Copy (a shallow copy)
virtual Teuchos::RCP< Thyra::VectorBase< Scalar > > getX() const
Get current the solution, x.
virtual int getIndex() const override
Get current index.
virtual Teuchos::RCP< Thyra::VectorBase< Scalar > > getXDot() const
Get current the time derivative of the solution, xdot.
Teuchos::RCP< Teuchos::Time > integratorTimer_
std::string integratorType_
the integrator type.
virtual void setScreenOutputIndexList(std::vector< int > indices)
virtual int getScreenOutputIndexInterval() const
Teuchos::RCP< Stepper< Scalar > > stepper_
virtual void setStatus(const Status st) override
Set Status.
std::string getIntegratorName() const
Get the Integrator Name.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const override
virtual Teuchos::RCP< SolutionHistory< Scalar > > getNonConstSolutionHistory() override
Get the SolutionHistory.
virtual void setModel(Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > model)
Set the model on the stepper.
Teuchos::RCP< Teuchos::Time > stepperTimer_
virtual bool advanceTime()
Advance the solution to timeMax, and return true if successful.
virtual Teuchos::RCP< Teuchos::Time > getStepperTimer() const override
virtual Teuchos::RCP< IntegratorObserver< Scalar > > getObserver()
Get the Observer.
virtual void setObserver(Teuchos::RCP< IntegratorObserver< Scalar > > obs=Teuchos::null)
Set the Observer.
bool isInitialized()
Return true if IntegratorBasic is initialized.
virtual Teuchos::RCP< SolutionState< Scalar > > getCurrentState()
Get current state.
virtual ~IntegratorBasic()
Destructor.
virtual std::string getScreenOutputIndexListString() const
virtual std::vector< int > getScreenOutputIndexList() const
IntegratorObserver class for time integrators.
Thyra Base interface for time integrators. Time integrators are designed to advance the solution from...
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
Solution state for integrators and steppers. SolutionState contains the metadata for solutions and th...
Thyra Base interface for time steppers.
TimeStepControl manages the time step size. There several mechanisms that effect the time step size a...
Status
Status for the Integrator, the Stepper and the SolutionState.
Teuchos::RCP< IntegratorBasic< Scalar > > createIntegratorBasic()
Nonmember constructor.