1#ifndef wxstepperstatus_h
2#define wxstepperstatus_h
4#include "warpxm/warpxm_config.h"
29 std::shared_ptr<TimestepConstraint> tc = std::make_shared<TimestepConstraint>())
30 : _timeStepSuccess(timeStepStatus), _tc(tc)
41 _timeStepSuccess =
true;
43 real default_dt = std::numeric_limits<real>::infinity();
44 std::array<real, 3> default_x = {0, 0, 0};
45 std::shared_ptr<std::string> default_physics = std::make_shared<std::string>(
"nothing");
46 _tc = std::make_shared<TimestepConstraint>(default_dt, default_x, default_physics);
56 _timeStepSuccess = timeStepStatus;
66 return _timeStepSuccess;
75 const std::shared_ptr<TimestepConstraint>
get_tc()
const
87 _timeStepSuccess = _timeStepSuccess && other._timeStepSuccess;
88 _fatalError = _fatalError || other._fatalError;
97 void add_tc(
const std::shared_ptr<TimestepConstraint>& tc)
104 bool _timeStepSuccess;
107 std::shared_ptr<TimestepConstraint> _tc;
static const TimestepConstraint & minDt(const TimestepConstraint &a, const TimestepConstraint &b)
Definition: timestep_constraint.h:45
Represents important parameters for the efficacy of a completing simulation step.
Definition: wxstepperstatus.h:19
bool getTimeStepStatus() const
Get status of stepper's time step (i.e., CFL condition )
Definition: wxstepperstatus.h:64
void add_tc(const std::shared_ptr< TimestepConstraint > &tc)
Add timestep constraint information to wxstepperstatus.
Definition: wxstepperstatus.h:97
WxStepperStatus(bool timeStepStatus=true, std::shared_ptr< TimestepConstraint > tc=std::make_shared< TimestepConstraint >())
Create status object.
Definition: wxstepperstatus.h:28
void merge(const WxStepperStatus &other)
Merge resulting in worst case properties of this and other WxStepperStatus.
Definition: wxstepperstatus.h:85
const std::shared_ptr< TimestepConstraint > get_tc() const
Get writeout diagnostic.
Definition: wxstepperstatus.h:75
void setTimeStepStatus(bool timeStepStatus)
Set status of stepper's time step (i.e., CFL condition )
Definition: wxstepperstatus.h:54
void reset()
Returns object to its default construction state.
Definition: wxstepperstatus.h:39
#define real
Definition: wmoclunstructuredreconstruction.h:11