10 #ifndef Tempus_SolutionStateMetaData_impl_hpp
11 #define Tempus_SolutionStateMetaData_impl_hpp
15 template <
class Scalar>
27 nConsecutiveFailures_(0),
38 isInterpolated_(false),
43 template <
class Scalar>
45 const Scalar time,
const int iStep,
const Scalar dt,
const Scalar errorAbs,
46 const Scalar errorRel,
const Scalar errorRelNm1,
const Scalar errorRelNm2,
47 const int order,
const int nFailures,
const int nRunningFailures,
48 const int nConsecutiveFailures,
const Scalar tolRel,
const Scalar tolAbs,
49 const Scalar xNormL2,
const Scalar dxNormL2Rel,
const Scalar dxNormL2Abs,
50 const bool computeNorms,
const Status solutionStatus,
const bool output,
51 const bool outputScreen,
const bool isSynced,
const bool isInterpolated,
52 const Scalar accuracy)
58 errorRelNm1_(errorRelNm1),
59 errorRelNm2_(errorRelNm2),
61 nFailures_(nFailures),
62 nRunningFailures_(nRunningFailures),
63 nConsecutiveFailures_(nConsecutiveFailures),
67 dxNormL2Rel_(dxNormL2Rel),
68 dxNormL2Abs_(dxNormL2Abs),
69 computeNorms_(computeNorms),
70 solutionStatus_(solutionStatus),
72 outputScreen_(outputScreen),
74 isInterpolated_(isInterpolated),
79 template <
class Scalar>
85 errorAbs_(ssmd.errorAbs_),
86 errorRel_(ssmd.errorRel_),
87 errorRelNm1_(ssmd.errorRelNm1_),
88 errorRelNm2_(ssmd.errorRelNm2_),
90 nFailures_(ssmd.nFailures_),
91 nRunningFailures_(ssmd.nRunningFailures_),
92 nConsecutiveFailures_(ssmd.nConsecutiveFailures_),
93 tolRel_(ssmd.tolRel_),
94 tolAbs_(ssmd.tolAbs_),
95 dxNormL2Rel_(ssmd.dxNormL2Rel_),
96 dxNormL2Abs_(ssmd.dxNormL2Abs_),
97 computeNorms_(ssmd.computeNorms_),
98 solutionStatus_(ssmd.solutionStatus_),
99 output_(ssmd.output_),
100 outputScreen_(ssmd.outputScreen_),
101 isSynced_(ssmd.isSynced_),
102 isInterpolated_(ssmd.isInterpolated_),
103 accuracy_(ssmd.accuracy_)
107 template <
class Scalar>
113 time_, iStep_, dt_, errorAbs_, errorRel_, errorRelNm1_, errorRelNm2_,
114 order_, nFailures_, nRunningFailures_, nConsecutiveFailures_, tolRel_,
115 tolAbs_, xNormL2_, dxNormL2Rel_, dxNormL2Abs_, computeNorms_,
116 solutionStatus_, output_, outputScreen_, isSynced_, isInterpolated_,
122 template <
class Scalar>
127 iStep_ = ssmd->iStep_;
129 errorAbs_ = ssmd->errorAbs_;
130 errorRel_ = ssmd->errorRel_;
131 errorRelNm1_ = ssmd->errorRelNm1_;
132 errorRelNm2_ = ssmd->errorRelNm2_;
133 order_ = ssmd->order_;
134 nFailures_ = ssmd->nFailures_;
135 nRunningFailures_ = ssmd->nRunningFailures_;
136 nConsecutiveFailures_ = ssmd->nConsecutiveFailures_;
137 tolRel_ = ssmd->tolRel_, tolAbs_ = ssmd->tolAbs_, xNormL2_ = ssmd->xNormL2_,
138 dxNormL2Rel_ = ssmd->dxNormL2Rel_, dxNormL2Abs_ = ssmd->dxNormL2Abs_,
139 computeNorms_ = ssmd->computeNorms_, solutionStatus_ = ssmd->solutionStatus_;
140 output_ = ssmd->output_;
141 outputScreen_ = ssmd->outputScreen_;
142 isSynced_ = ssmd->isSynced_;
143 isInterpolated_ = ssmd->isInterpolated_;
144 accuracy_ = ssmd->accuracy_;
147 template <
class Scalar>
150 std::string name =
"Tempus::SolutionStateMetaData";
154 template <
class Scalar>
158 auto l_out = Teuchos::fancyOStream(out.
getOStream());
160 l_out->setOutputToRootOnly(0);
162 *l_out <<
"\n--- " << this->description() <<
" ---" << std::endl;
165 *l_out <<
" time = " << time_ << std::endl
166 <<
" iStep = " << iStep_ << std::endl
167 <<
" dt = " << dt_ << std::endl
168 <<
" errorAbs = " << errorAbs_ << std::endl
169 <<
" errorRel = " << errorRel_ << std::endl
170 <<
" errorRelNm1 = " << errorRelNm1_ << std::endl
171 <<
" errorRelNm2 = " << errorRelNm2_ << std::endl
172 <<
" order = " << order_ << std::endl
173 <<
" nFailures = " << nFailures_ << std::endl
174 <<
" nRunningFailures = " << nRunningFailures_ << std::endl
175 <<
" nConsecutiveFailures = " << nConsecutiveFailures_ << std::endl
176 <<
" tolRel = " << tolRel_ << std::endl
177 <<
" tolAbs = " << tolAbs_ << std::endl
178 <<
" xNormL2 = " << xNormL2_ << std::endl
179 <<
" dxNormL2Rel = " << dxNormL2Rel_ << std::endl
180 <<
" dxNormL2Abs = " << dxNormL2Abs_ << std::endl
181 <<
" computeNorms = " << computeNorms_ << std::endl
182 <<
" solutionStatus = " <<
toString(solutionStatus_) << std::endl
183 <<
" output = " << output_ << std::endl
184 <<
" outputScreen = " << outputScreen_ << std::endl
185 <<
" isSynced = " << isSynced_ << std::endl
186 <<
" isInterpolated = " << isInterpolated_ << std::endl
187 <<
" accuracy = " << accuracy_ << std::endl;
189 *l_out << std::string(this->description().length() + 8,
'-') << std::endl;
193 #endif // Tempus_SolutionStateMetaData_impl_hpp
const std::string toString(const Status status)
Convert Status to string.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Status
Status for the Integrator, the Stepper and the SolutionState.
RCP< std::basic_ostream< char_type, traits_type > > getOStream()