2#ifndef RYTHMOS_STEP_CONTROL_INFO_HPP
3#define RYTHMOS_STEP_CONTROL_INFO_HPP
7#pragma clang system_header
10#include "Rythmos_StepperSupportTypes.hpp"
39std::ostream& operator<<(
40 std::ostream &out,
const StepControlInfo<Scalar> &stepCtrlInfo
45 <<
"stepType = " << toString(stepCtrlInfo.stepType) << endl
46 <<
"stepSize = " << stepCtrlInfo.stepSize << endl
47 <<
"limitedByBreakPoint = " << stepCtrlInfo.limitedByBreakPoint << endl
48 <<
"breakPointType = " << toString(stepCtrlInfo.breakPointType) << endl;
61StepControlInfo<Scalar>
63 const StepControlInfo<Scalar> &trialStepCtrlInfo,
64 const Scalar &stepSizeTaken
67 typedef Teuchos::ScalarTraits<Scalar> ST;
68 const Scalar zero = ST::zero();
69 StepControlInfo<Scalar> stepCtrlInfo = trialStepCtrlInfo;
70 stepCtrlInfo.stepSize = stepSizeTaken;
71 if ( trialStepCtrlInfo.stepSize > zero && stepSizeTaken > zero ) {
72 if (stepSizeTaken < trialStepCtrlInfo.stepSize) {
73 stepCtrlInfo.limitedByBreakPoint =
false;
77 stepCtrlInfo.limitedByBreakPoint =
false;
Simple struct to aggregate integration/stepper control information.
bool limitedByBreakPoint
True if step size is limited by a breakpoint.
Scalar stepSize
The size of the time step.
EBreakPointType breakPointType
True if the time integrator should restart when passing over the breakpoint.
StepControlInfo()
Initialize to invalid state.
StepControlInfo< Scalar > stepCtrlInfoTaken(const StepControlInfo< Scalar > &trialStepCtrlInfo, const Scalar &stepSizeTaken)
Return a step control info object for a step actually taken.
StepSizeType stepType
The type of time step.