9#ifndef Tempus_StepperRKModifierXBase_hpp
10#define Tempus_StepperRKModifierXBase_hpp
12#include "Tempus_config.hpp"
13#include "Tempus_SolutionHistory.hpp"
16#include "Teuchos_SerialDenseVector.hpp"
65 const int stageNumber = stepper->getStageNumber();
66 Teuchos::SerialDenseVector<int,Scalar> c = stepper->getTableau()->c();
67 RCP<SolutionState<Scalar> > workingState = sh->getWorkingState();
68 const Scalar dt = workingState->getTimeStep();
69 Scalar time = sh->getCurrentState()->getTime();
70 if (stageNumber >= 0) time += c(stageNumber)*dt;
71 RCP<Thyra::VectorBase<Scalar> > x = workingState->getX();
107 time = workingState->getTime();
111 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
112 "Error - unknown action location.\n");
115 this->
modify(x, time, dt, stageNumber, modType);
134 const Scalar ,
const Scalar ,
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
Application Action for StepperRKBase.
ACTION_LOCATION
Indicates the location of application action (see algorithm).
Base class for Runge-Kutta methods, ExplicitRK, DIRK and IMEX.
Base ModifierX for StepperRK.
MODIFIER_TYPE
Indicates the location of application action (see algorithm).
@ X_END_STEP
Modify at the end of the step.
@ X_BEGIN_STEP
Modify at the beginning of the step.
@ X_AFTER_SOLVE
Modify after the implicit solve.
@ X_END_STAGE
Modify at the end of the stage.
@ X_BEFORE_SOLVE
Modify before the implicit solve.
@ X_BEFORE_EXPLICIT_EVAL
Modify before the explicit evaluation.
@ X_BEGIN_STAGE
Modify at the beginning of the stage.
virtual void modify(Teuchos::RCP< Thyra::VectorBase< Scalar > >, const Scalar, const Scalar, const int, const MODIFIER_TYPE modType)=0
Modify solution based on the MODIFIER_TYPE.
void execute(Teuchos::RCP< SolutionHistory< Scalar > > sh, Teuchos::RCP< StepperRKBase< Scalar > > stepper, const typename StepperRKAppAction< Scalar >::ACTION_LOCATION actLoc)
Execute application action for RK Stepper.