2 #ifndef RYTHMOS_STEP_CONTROL_INFO_HPP
3 #define RYTHMOS_STEP_CONTROL_INFO_HPP
7 #pragma clang system_header
10 #include "Rythmos_StepperSupportTypes.hpp"
17 template<
class Scalar>
18 struct StepControlInfo {
38 template<
class Scalar>
39 std::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;
60 template<
class Scalar>
61 StepControlInfo<Scalar>
64 const Scalar &stepSizeTaken
67 typedef Teuchos::ScalarTraits<Scalar> ST;
68 const Scalar zero = ST::zero();
70 stepCtrlInfo.stepSize = stepSizeTaken;
71 if ( trialStepCtrlInfo.stepSize > zero && stepSizeTaken > zero ) {
72 if (stepSizeTaken < trialStepCtrlInfo.stepSize) {
73 stepCtrlInfo.limitedByBreakPoint =
false;
77 stepCtrlInfo.limitedByBreakPoint =
false;
90 #endif // RYTHMOS_STEP_CONTROL_INFO_HPP