SpECTRE  v2024.04.12
Time Class Reference

The time in a simulation. Times can be safely compared for exact equality as long as they do not belong to overlapping unequal slabs. More...

#include <Time.hpp>

Classes

struct  StructuralCompare
 A comparison operator that compares Times structurally, i.e., just looking at the class members. This is only intended for use as the comparator in a map. The returned ordering does not match the time ordering and opposite sides of slab boundaries do not compare equal. It is, however, much faster to compute than the temporal ordering, so it is useful when an ordering is required, but the ordering does not have to be physically meaningful. More...
 

Public Types

using rational_t = Rational
 

Public Member Functions

 Time ()=default
 Default constructor gives an invalid Time.
 
 Time (Slab slab, rational_t fraction)
 A time a given fraction of the way through the given slab.
 
Time with_slab (const Slab &new_slab) const
 Move the time to a different slab. The time must be at an end of the current slab and the new slab must share that endpoint.
 
double value () const
 Approximate numerical value of the Time.
 
const Slabslab () const
 
const rational_tfraction () const
 
Timeoperator+= (const TimeDelta &delta)
 
Timeoperator-= (const TimeDelta &delta)
 
bool is_at_slab_start () const
 
bool is_at_slab_end () const
 
bool is_at_slab_boundary () const
 
void pup (PUP::er &p)
 

Friends

class TimeDelta
 

Detailed Description

The time in a simulation. Times can be safely compared for exact equality as long as they do not belong to overlapping unequal slabs.


The documentation for this class was generated from the following file: