9 #ifndef Tempus_PhysicsStateTest_StepperForwardEuler_hpp
10 #define Tempus_PhysicsStateTest_StepperForwardEuler_hpp
12 #include "Tempus_config.hpp"
13 #include "Tempus_StepperForwardEuler.hpp"
17 namespace Tempus_Test {
24 template<
class Scalar>
32 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel)
43 virtual Teuchos::RCP<Tempus::StepperObserver<Scalar> >
getObserver()
const
44 {
return Teuchos::null; }
47 {
return Teuchos::null; }
59 TEMPUS_FUNC_TIME_MONITOR(
"Tempus::StepperPhysicsStateTest::takeStep()");
61 RCP<Tempus::SolutionState<Scalar> > currentState =
64 typedef Thyra::ModelEvaluatorBase MEB;
65 this->
inArgs_.set_x(currentState->getX());
66 if (this->
inArgs_.supports(MEB::IN_ARG_t))
67 this->
inArgs_.set_t(currentState->getTime());
74 if (this->
inArgs_.supports(MEB::IN_ARG_x_dot))
75 this->
inArgs_.set_x_dot(Teuchos::null);
76 this->
outArgs_.set_f(currentState->getXDot());
81 RCP<Tempus::SolutionState<Scalar> > workingState =
83 const Scalar dt = workingState->getTimeStep();
84 Thyra::V_VpStV(Teuchos::outArg(*(workingState->getX())),
85 *(currentState->getX()),dt,*(currentState->getXDot()));
87 RCP<PhysicsStateCounter<Scalar> > pSC =
89 (workingState->getPhysicsState());
92 pSC->setCounter(counter);
95 workingState->setOrder(this->
getOrder());
102 return Teuchos::null;
109 #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.
virtual int getCounter() const
Return counter of PhysicsStateCounter.
Teuchos::RCP< Tempus::StepperState< Scalar > > getDefaultStepperState()
Scalar getOrderMax() const
virtual bool getICConsistencyCheckDefault() const
virtual std::string getICConsistencyDefault() const
Thyra::ModelEvaluatorBase::OutArgs< Scalar > outArgs_
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
virtual std::string description() const
void setICConsistencyCheck(bool c)
StepperObserver class for Stepper class.
Teuchos::RCP< SolutionHistory< Scalar > > solutionHistory(Teuchos::RCP< Teuchos::ParameterList > pList=Teuchos::null)
Nonmember constructor.
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
virtual void setModel(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel)
PhysicsStateCounter is a simple PhysicsState that counts steps.
Stepper integrates first-order ODEs.
void initialize()
Initialize during construction and after changing input parameters.
virtual bool getUseFSALDefault() const
Thyra::ModelEvaluatorBase::InArgs< Scalar > inArgs_
Scalar getOrderMin() const
Tempus::OrderODE getOrderODE() const
Thyra Base interface for implicit time steppers.
void setStepperType(std::string s)
StepperPhysicsStateTest(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel)
Constructor.
void setObserver(Teuchos::RCP< Tempus::StepperObserver< Scalar > >)
Set Observer.
void setICConsistency(std::string s)
virtual Teuchos::RCP< Tempus::StepperObserver< Scalar > > getObserver() const
Get Observer.