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 () noexcept
Default constructor gives an invalid Time.

Time (Slab slab, rational_t fraction) noexcept
A time a given fraction of the way through the given slab.

Time with_slab (const Slab &new_slab) const noexcept
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 noexcept
Approximate numerical value of the Time.

const Slabslab () const noexcept

const rational_tfraction () const noexcept

Timeoperator+= (const TimeDelta &delta) noexcept

Timeoperator-= (const TimeDelta &delta) noexcept

bool is_at_slab_start () const noexcept

bool is_at_slab_end () const noexcept

bool is_at_slab_boundary () const noexcept

void pup (PUP::er &p) noexcept

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 files: