SpECTRE  v2024.02.05
TimeSequence< T > Class Template Referenceabstract

Represents a sequence of times. More...

#include <TimeSequence.hpp>

Public Member Functions

 WRAPPED_PUPable_abstract (TimeSequence)
 
virtual std::array< std::optional< T >, 3 > times_near (T time) const =0
 Returns the time in the sequence nearest to time, the time before that, and the time after, in numerical order. These values allow a consumer to find the times in the sequence bracketing the given time and give enough additional information so that exact or roundoff matches can be handled however the consumer wishes. Any time that does not exist (because the sequence terminates) is returned as an empty std::optional. The central std::optional will be populated unless the sequence is empty. More...
 

Detailed Description

template<typename T>
class TimeSequence< T >

Represents a sequence of times.

The template parameter T can either be double for a sequence of simulation times or std::uint64_t for a sequence of slab numbers.

Member Function Documentation

◆ times_near()

template<typename T >
virtual std::array< std::optional< T >, 3 > TimeSequence< T >::times_near ( time) const
pure virtual

Returns the time in the sequence nearest to time, the time before that, and the time after, in numerical order. These values allow a consumer to find the times in the sequence bracketing the given time and give enough additional information so that exact or roundoff matches can be handled however the consumer wishes. Any time that does not exist (because the sequence terminates) is returned as an empty std::optional. The central std::optional will be populated unless the sequence is empty.

Implemented in TimeSequences::EvenlySpaced< T >, and TimeSequences::Specified< T >.


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