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" 29 template<
class Scalar>
43 std::vector<int> outputScreenIndices,
44 int outputScreenInterval);
54 virtual bool advanceTime(
const Scalar timeFinal)
override;
65 override {
return Teuchos::rcp_const_cast<Teuchos::ParameterList> (this->
getValidParameters()); }
67 Teuchos::RCP<Teuchos::ParameterList> pl)
override 69 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
70 " IntegratorBasic::setTempusParameterList() -- Deprecated!\n");
76 virtual Scalar
getTime()
const override 88 virtual Teuchos::RCP<Stepper<Scalar> >
getStepper()
const override 135 virtual Teuchos::RCP<Thyra::VectorBase<Scalar> >
getX()
const 138 virtual Teuchos::RCP<Thyra::VectorBase<Scalar> >
getXDot()
const 141 virtual Teuchos::RCP<Thyra::VectorBase<Scalar> >
getXDotDot()
const 167 { TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
168 " IntegratorBasic::parseScreenOutput() -- Should call setScreenOutputIndexList()\n");
176 void describe(Teuchos::FancyOStream & out,
177 const Teuchos::EVerbosityLevel verbLevel)
const override;
217 template<
class Scalar>
219 Teuchos::RCP<Teuchos::ParameterList> pList);
223 template<
class Scalar>
225 Teuchos::RCP<Teuchos::ParameterList> pList,
230 template<
class Scalar>
233 std::string stepperType);
237 template<
class Scalar>
242 template<
class Scalar>
244 Teuchos::RCP<Teuchos::ParameterList> pList,
250 #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.
std::string getIntegratorType() const
Get the Integrator Type.
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.
Teuchos::RCP< Teuchos::Time > stepperTimer_
IntegratorBasic()
Default constructor that requires a subsequent, ??? , setStepper, and initialize calls.
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< Teuchos::ParameterList > getTempusParameterList() override
Return a copy of the Tempus ParameterList DEPRECATED!
virtual std::string getScreenOutputIndexListString() const
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.
virtual Teuchos::RCP< Thyra::VectorBase< Scalar > > getX() const
Get current the solution, x.
Status
Status for the Integrator, the Stepper and the SolutionState.
IntegratorObserver class for time integrators.
Teuchos::RCP< TimeStepControl< Scalar > > timeStepControl_
Teuchos::RCP< SolutionHistory< Scalar > > solutionHistory_
virtual void setTempusParameterList(Teuchos::RCP< Teuchos::ParameterList > pl) override
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 int getScreenOutputIndexInterval() const
virtual void initializeSolutionHistory(Teuchos::RCP< SolutionState< Scalar > > state=Teuchos::null)
Set the initial state which has the initial conditions.
std::string getIntegratorName() const
Get the Integrator Name.
virtual void setScreenOutputIndexList(std::vector< int > indices)
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
void setIntegratorName(std::string i)
Set the Integrator Name.
virtual Teuchos::RCP< const TimeStepControl< Scalar > > getTimeStepControl() const override
Get the TimeStepControl.
Teuchos::RCP< IntegratorBasic< Scalar > > createIntegratorBasic(Teuchos::RCP< Teuchos::ParameterList > pList)
Nonmember constructor.
virtual void initialize()
Initializes the Integrator after set* function calls.
virtual Teuchos::RCP< Thyra::VectorBase< Scalar > > getXDot() const
Get current the time derivative of the solution, xdot.
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 std::vector< int > getScreenOutputIndexList() const
virtual Teuchos::RCP< Teuchos::Time > getStepperTimer() const override
virtual Teuchos::RCP< SolutionHistory< Scalar > > getNonConstSolutionHistory() override
Get the SolutionHistory.
virtual Teuchos::RCP< TimeStepControl< Scalar > > getNonConstTimeStepControl() override
virtual void startTimeStep()
Start time step.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const override
virtual Teuchos::RCP< IntegratorObserver< Scalar > > getObserver()
Get the Observer.
Teuchos::RCP< IntegratorObserver< Scalar > > integratorObserver_
virtual Teuchos::RCP< Thyra::VectorBase< Scalar > > getXDotDot() const
Get current the second time derivative of the solution, xdotdot.
std::vector< int > outputScreenIndices_
Vector of screen output indices.
std::string integratorType_
the integrator type.
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)