SpECTRE  v2024.09.29
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
TimeDelta Class Reference

Represents an interval of time within a single slab. More...

#include <Time.hpp>

Public Types

using rational_t = Time::rational_t
 

Public Member Functions

 TimeDelta ()=default
 Default constructor gives an invalid TimeDelta.
 
 TimeDelta (Slab slab, rational_t fraction)
 An interval covering a given fraction of the slab.
 
TimeDelta with_slab (const Slab &new_slab) const
 Move the interval to a different slab. The resulting interval will in general not be the same length, but will take up the same fraction of its slab.
 
Slab slab () const
 
rational_t fraction () const
 
double value () const
 Approximate numerical length of the interval.
 
bool is_positive () const
 Test if the interval is oriented towards larger time.
 
TimeDeltaoperator+= (const TimeDelta &other)
 
TimeDeltaoperator-= (const TimeDelta &other)
 
TimeDelta operator+ () const
 
TimeDelta operator- () const
 
TimeDeltaoperator*= (const rational_t &mult)
 
TimeDeltaoperator/= (const rational_t &div)
 
void pup (PUP::er &p)
 

Friends

class Time
 

Detailed Description

Represents an interval of time within a single slab.


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