2 #ifndef RYTHMOS_STEP_CONTROL_INFO_HPP
3 #define RYTHMOS_STEP_CONTROL_INFO_HPP
5 #include "Rythmos_StepperSupportTypes.hpp"
12 template<
class Scalar>
13 struct StepControlInfo {
33 template<
class Scalar>
34 std::ostream& operator<<(
35 std::ostream &out,
const StepControlInfo<Scalar> &stepCtrlInfo
40 <<
"stepType = " << toString(stepCtrlInfo.stepType) << endl
41 <<
"stepSize = " << stepCtrlInfo.stepSize << endl
42 <<
"limitedByBreakPoint = " << stepCtrlInfo.limitedByBreakPoint << endl
43 <<
"breakPointType = " << toString(stepCtrlInfo.breakPointType) << endl;
55 template<
class Scalar>
56 StepControlInfo<Scalar>
59 const Scalar &stepSizeTaken
62 typedef Teuchos::ScalarTraits<Scalar> ST;
63 const Scalar zero = ST::zero();
65 stepCtrlInfo.stepSize = stepSizeTaken;
66 if ( trialStepCtrlInfo.stepSize > zero && stepSizeTaken > zero ) {
67 if (stepSizeTaken < trialStepCtrlInfo.stepSize) {
68 stepCtrlInfo.limitedByBreakPoint =
false;
72 stepCtrlInfo.limitedByBreakPoint =
false;
85 #endif // RYTHMOS_STEP_CONTROL_INFO_HPP
StepControlInfo()
Initalize to invalid state.
StepControlInfo< Scalar > stepCtrlInfoTaken(const StepControlInfo< Scalar > &trialStepCtrlInfo, const Scalar &stepSizeTaken)
Return a step control info object for a step actually taken.
Simple strict to aggregate integration/stepper control information.
Scalar stepSize
The size of the time step.
EBreakPointType breakPointType
True if the time integrator should restart when passing over the breakpoint.
bool limitedByBreakPoint
True if step size is limited by a breakpoint.
StepSizeType stepType
The type of time step.