10 #ifndef Tempus_IntegratorBasic_decl_hpp
11 #define Tempus_IntegratorBasic_decl_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"
27 template <
class Scalar>
39 std::vector<int> outputScreenIndices,
40 int outputScreenInterval);
53 virtual bool advanceTime(
const Scalar timeFinal)
override;
66 virtual Scalar
getTime()
const override
202 " IntegratorBasic::parseScreenOutput() -- "
203 "Should call setScreenOutputIndexList()\n");
249 template <
class Scalar>
254 template <
class Scalar>
258 bool runInitialize =
true);
261 template <
class Scalar>
264 std::string stepperType);
267 template <
class Scalar>
271 template <
class Scalar>
275 bool runInitialize =
true);
279 #endif // Tempus_IntegratorBasic_decl_hpp
virtual bool advanceTime()
Advance the solution to timeMax, and return true if successful.
Teuchos::RCP< Stepper< Scalar > > stepper_
virtual Teuchos::RCP< Stepper< Scalar > > getStepper() const override
Get the Stepper.
int outputScreenInterval_
screen output interval.
virtual Scalar getTime() const override
Get current time.
virtual void setModel(Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > model)
Set the model on the stepper.
virtual void setStatus(const Status st) override
Set Status.
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.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Teuchos::RCP< Teuchos::Time > stepperTimer_
virtual Teuchos::RCP< Thyra::VectorBase< Scalar > > getXDotDot() const
Get current the second time derivative of the solution, xdotdot.
virtual std::string getScreenOutputIndexListString() const
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
Create valid IntegratorBasic ParameterList.
virtual void setStepper(Teuchos::RCP< Stepper< Scalar > > stepper)
Set the Stepper.
Thyra Base interface for time steppers.
virtual void checkTimeStep()
Check if time step has passed or failed.
virtual Teuchos::RCP< const SolutionHistory< Scalar > > getSolutionHistory() const override
Get the SolutionHistory.
virtual void setSolutionHistory(Teuchos::RCP< SolutionHistory< Scalar > > sh=Teuchos::null)
Set the SolutionHistory.
std::string integratorName_
integrator name used for I/O.
Status
Status for the Integrator, the Stepper and the SolutionState.
std::string getIntegratorType() const
Get the Integrator Type.
IntegratorObserver class for time integrators.
Teuchos::RCP< TimeStepControl< Scalar > > timeStepControl_
Teuchos::RCP< SolutionHistory< Scalar > > solutionHistory_
std::string getIntegratorName() const
Get the Integrator Name.
TimeStepControl manages the time step size. There several mechanisms that effect the time step size a...
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.
virtual std::vector< int > getScreenOutputIndexList() const
virtual void setScreenOutputIndexList(std::vector< int > indices)
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
bool isInitialized()
Return true if IntegratorBasic is initialized.
virtual int getScreenOutputIndexInterval() const
void setIntegratorName(std::string i)
Set the Integrator Name.
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.
void setIntegratorType(std::string i)
Set the Integrator Type.
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 copy(Teuchos::RCP< IntegratorBasic< Scalar > > iB)
Copy (a shallow copy)
virtual Teuchos::RCP< SolutionHistory< Scalar > > getNonConstSolutionHistory() override
Get the SolutionHistory.
virtual Teuchos::RCP< TimeStepControl< Scalar > > getNonConstTimeStepControl() override
virtual void startTimeStep()
Start time step.
virtual Teuchos::RCP< Thyra::VectorBase< Scalar > > getXDot() const
Get current the time derivative of the solution, xdot.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const override
virtual Teuchos::RCP< IntegratorObserver< Scalar > > getObserver()
Get the Observer.
Teuchos::RCP< IntegratorBasic< Scalar > > createIntegratorBasic(Teuchos::RCP< Teuchos::ParameterList > pList, bool runInitialize=true)
Nonmember constructor.
Teuchos::RCP< IntegratorObserver< Scalar > > integratorObserver_
virtual Teuchos::RCP< Thyra::VectorBase< Scalar > > getX() const
Get current the solution, x.
std::vector< int > outputScreenIndices_
Vector of screen output indices.
std::string integratorType_
the integrator type.
Solution state for integrators and steppers.
virtual Teuchos::RCP< Teuchos::Time > getIntegratorTimer() const override
Returns the IntegratorTimer_ for this Integrator.
virtual void setScreenOutputIndexInterval(int i)