|
PISM, A Parallel Ice Sheet Model 2.2.2-d6b3a29ca committed by Constantine Khrulev on 2025-03-28
|
Combines the max. time step with the flag indicating if a restriction is active. Makes is possible to use the less-than operator (and std::min, etc) to choose the stricter of two restrictions.
More...
#include <MaxTimestep.hh>
Public Member Functions | |
| MaxTimestep () | |
| Create an instance corresponding to an "inactive" time-step restriction (in other words, \( \Delta t = \infty \)). | |
| MaxTimestep (double value) | |
Create an instance corresponding to a max time step of value. | |
| MaxTimestep (const std::string &new_description) | |
| MaxTimestep (double value, const std::string &new_description) | |
| Create an instance and provide a description. | |
| bool | finite () const |
Convert to bool to check if a time step restriction is "active". | |
| bool | infinite () const |
| double | value () const |
| Get the value of the maximum time step. | |
| std::string | description () const |
Private Attributes | |
| bool | m_finite |
| double | m_value |
| std::string | m_description |
Combines the max. time step with the flag indicating if a restriction is active. Makes is possible to use the less-than operator (and std::min, etc) to choose the stricter of two restrictions.
Definition at line 31 of file MaxTimestep.hh.