10 #ifndef Tempus_PhysicsStateTest_StepperForwardEuler_hpp
11 #define Tempus_PhysicsStateTest_StepperForwardEuler_hpp
13 #include "Tempus_config.hpp"
14 #include "Tempus_StepperForwardEuler.hpp"
17 namespace Tempus_Test {
24 template <
class Scalar>
55 TEMPUS_FUNC_TIME_MONITOR(
"Tempus::StepperPhysicsStateTest::takeStep()");
58 solutionHistory->getCurrentState();
61 this->
inArgs_.set_x(currentState->getX());
62 if (this->
inArgs_.supports(MEB::IN_ARG_t))
63 this->
inArgs_.set_t(currentState->getTime());
70 if (this->
inArgs_.supports(MEB::IN_ARG_x_dot))
71 this->
inArgs_.set_x_dot(Teuchos::null);
72 this->
outArgs_.set_f(currentState->getXDot());
78 solutionHistory->getWorkingState();
79 const Scalar dt = workingState->getTimeStep();
80 Thyra::V_VpStV(Teuchos::outArg(*(workingState->getX())),
81 *(currentState->getX()), dt, *(currentState->getXDot()));
85 workingState->getPhysicsState());
86 int counter = pSC->getCounter();
88 pSC->setCounter(counter);
91 workingState->setOrder(this->
getOrder());
104 #endif // Tempus_PhysicsStateTest_StepperForwardEuler_hpp
Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > appModel_
Explicit ODE ModelEvaluator.
This is a Forward Euler time stepper to test the PhysicsState.
virtual void takeStep(const Teuchos::RCP< Tempus::SolutionHistory< Scalar > > &solutionHistory)
Take the specified timestep, dt, and return true if successful.
Teuchos::RCP< Tempus::StepperState< Scalar > > getDefaultStepperState()
Scalar getOrderMax() const
Thyra::ModelEvaluatorBase::OutArgs< Scalar > outArgs_
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
virtual std::string description() const
void setICConsistencyCheck(bool c)
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
virtual void setModel(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel)
Set model.
PhysicsStateCounter is a simple PhysicsState that counts steps.
Stepper integrates first-order ODEs.
void initialize()
Initialize after construction and changing input parameters.
Thyra::ModelEvaluatorBase::InArgs< Scalar > inArgs_
virtual void setUseFSAL(bool a)
Scalar getOrderMin() const
Tempus::OrderODE getOrderODE() const
Thyra Base interface for implicit time steppers.
void setStepperType(std::string s)
Set the stepper type.
StepperPhysicsStateTest(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel)
Constructor.
void setICConsistency(std::string s)