WARPXM v1.10.0
|
Encapsulates information necessary to communicate and explain a decision about what timestep should be taken. More...
#include <timestep_decision.h>
Encapsulates information necessary to communicate and explain a decision about what timestep should be taken.
This class is necessary because sometimes, a dt decision will be made which takes into account other information than the maximally restrictive TimestepConstraint.
In those cases, we want to properly communicate the reasoning in log output.
Public Member Functions | |
TimestepDecision () | |
TimestepDecision (bool success, real dt, std::shared_ptr< std::string > explanation) | |
TimestepDecision (bool success, real dt, std::shared_ptr< std::string > explanation, std::shared_ptr< TimestepConstraint > constraint) | |
void | reset () |
Resets everything to default values. | |
bool | isSuccess () const |
real | getDt () const |
The timestep that was decided upon. | |
std::shared_ptr< TimestepConstraint > | getConstraint () const |
The most restrictive TimestepConstraint that informed the decision. | |
std::shared_ptr< std::string > | getExplanation () const |
An explanation for why this timestep was chosen. | |
Static Public Member Functions | |
static const TimestepDecision & | minDt (const TimestepDecision &a, const TimestepDecision &b) |
Compare two TimestepDecisions and return the one with the smallest dt. | |
|
inline |
|
inline |
|
inline |
|
inline |
The most restrictive TimestepConstraint that informed the decision.
|
inline |
The timestep that was decided upon.
|
inline |
An explanation for why this timestep was chosen.
|
inline |
|
inlinestatic |
Compare two TimestepDecisions and return the one with the smallest dt.
|
inline |
Resets everything to default values.