|
SpECTRE
2021.08.02
|
A chunk of time. Every element must reach slab boundaries exactly, no matter how it actually takes time steps to get there. The simulation can only be assumed to have global data available at slab boundaries. More...
#include <Slab.hpp>
Public Member Functions | |
| Slab () noexcept=default | |
| Default constructor gives an invalid Slab. | |
| Slab (double start, double end) noexcept | |
| Construct a slab running between two times (exactly). | |
| Time | start () const noexcept |
| Time | end () const noexcept |
| TimeDelta | duration () const noexcept |
| Slab | advance () const noexcept |
| Create a new slab immediately following this one with the same (up to roundoff) duration. | |
| Slab | retreat () const noexcept |
| Create a new slab immediately preceeding this one with the same (up to roundoff) duration. | |
| Slab | advance_towards (const TimeDelta &dt) const noexcept |
| Create a slab adjacent to this one in the direction indicated by the argument, as with advance() or retreat(). | |
| Slab | with_duration_from_start (double duration) const noexcept |
| Create a new slab with the same start time as this one with the given duration (up to roundoff). | |
| Slab | with_duration_to_end (double duration) const noexcept |
| Create a new slab with the same end time as this one with the given duration (up to roundoff). | |
| bool | is_followed_by (const Slab &other) const noexcept |
| Check if this slab is immediately followed by the other slab. | |
| bool | is_preceeded_by (const Slab &other) const noexcept |
| Check if this slab is immediately preceeded by the other slab. | |
| bool | overlaps (const Slab &other) const noexcept |
| Check if slabs overlap. Abutting slabs do not overlap. | |
| void | pup (PUP::er &p) noexcept |
Static Public Member Functions | |
| static Slab | with_duration_from_start (double start, double duration) noexcept |
| Construct a slab with a given start time and duration. The actual duration may differ by roundoff from the supplied value. | |
| static Slab | with_duration_to_end (double end, double duration) noexcept |
| Construct a slab with a given end time and duration. The actual duration may differ by roundoff from the supplied value. | |
Friends | |
| class | Time |
| class | TimeDelta |
| bool | operator== (const Slab &a, const Slab &b) noexcept |
| bool | operator< (const Slab &a, const Slab &b) noexcept |
| Slab comparison operators give the time ordering. Overlapping unequal slabs should not be compared (and will trigger an assertion). | |
| bool | operator== (const Time &a, const Time &b) noexcept |
A chunk of time. Every element must reach slab boundaries exactly, no matter how it actually takes time steps to get there. The simulation can only be assumed to have global data available at slab boundaries.