OGS
NumLib::TimeInterval Struct Referencefinal

Detailed Description

Class for a time interval, which has a member to check whether the given time is in this time interval.

Definition at line 17 of file TimeInterval.h.

#include <TimeInterval.h>

Public Member Functions

bool contains (double const current_time) const

Public Attributes

double start_time
double end_time

Member Function Documentation

◆ contains()

bool NumLib::TimeInterval::contains ( double const current_time) const
Returns
true if the given time is inside the closed interval.

The comparison is done with the same tolerance as all other time comparisons in the time loop, cf. NumLib::Time, because the current time is an accumulated sum of time step sizes and may miss the interval's end by a few units in the last place.

Definition at line 11 of file TimeInterval.cpp.

12{
13 Time const time{current_time};
14 return Time{start_time} <= time && time <= Time{end_time};
15}

References end_time, and start_time.

Referenced by ProcessLib::isTimeInSupportInterval().

Member Data Documentation

◆ end_time

double NumLib::TimeInterval::end_time

Definition at line 28 of file TimeInterval.h.

Referenced by contains().

◆ start_time

double NumLib::TimeInterval::start_time

Definition at line 27 of file TimeInterval.h.

Referenced by contains().


The documentation for this struct was generated from the following files: