WRApplication
External kratos "application" for multiscale time integration.
IntervalUtility< TValue > Class Template Reference

Utility class for membership tests on a 1D interval. More...

Collaboration diagram for IntervalUtility< TValue >:

Public Member Functions

 KRATOS_CLASS_POINTER_DEFINITION (IntervalUtility)
 
 IntervalUtility ()
 Default constructor initializing boundaries to "Begin" and "End". More...
 
 IntervalUtility (Parameters Settings)
 Construct from parameters containing "interval". More...
 
 IntervalUtility (IntervalUtility &&rOther)=default
 
 IntervalUtility (const IntervalUtility &rOther)=default
 
TValue GetIntervalBegin () const noexcept
 
TValue GetIntervalEnd () const noexcept
 
bool IsInInterval (TValue Value) const noexcept
 Check whether the input value is within the defined closed interval [Begin, End]. More...
 
std::string Info () const
 Return information as a string. More...
 
void PrintInfo (std::ostream &rOStream) const
 Print information about this object. More...
 
void PrintData (std::ostream &rOStream) const
 Print object's data. More...
 

Static Public Member Functions

static Parameters GetDefaultParameters ()
 

Detailed Description

template<class TValue>
class Kratos::WRApp::Impl::IntervalUtility< TValue >

Utility class for membership tests on a 1D interval.

Note
This class template has specializations for double and int but is not implemented for other types.

Constructor & Destructor Documentation

◆ IntervalUtility() [1/4]

Default constructor initializing boundaries to "Begin" and "End".

◆ IntervalUtility() [2/4]

IntervalUtility ( Parameters  Settings)

Construct from parameters containing "interval".

"interval" is expected as an array with exactly 2 items, defining the begin and end of the interval respectively. The first item can either be a numeric value or "Begin" (setting the smallest representable value of TValue), while the second one can be a numeric value or "End" (setting the highest representable value of TValue).

Note
String values ("Begin" and "End") are replaced with their numeric counterparts in the input Settings.
If "interval" is not in Settings, an "interval" with values corresponding to "Begin" and "End" is added to it.
Other parameters in Settings are not checked.
Exceptions
IfSettings has "interval" but has invalid value:
  • not an array of size 2
  • first item is not "Begin" or an appropriate numeric value
  • second item is not "End" or an appropriate numeric value
  • swapped boundaries (end < begin)

◆ IntervalUtility() [3/4]

IntervalUtility ( IntervalUtility< TValue > &&  rOther)
default

◆ IntervalUtility() [4/4]

IntervalUtility ( const IntervalUtility< TValue > &  rOther)
default

Member Function Documentation

◆ GetDefaultParameters()

static Parameters GetDefaultParameters ( )
static

◆ GetIntervalBegin()

TValue GetIntervalBegin ( ) const
noexcept

◆ GetIntervalEnd()

TValue GetIntervalEnd ( ) const
noexcept

◆ Info()

std::string Info ( ) const

Return information as a string.

◆ IsInInterval()

bool IsInInterval ( TValue  Value) const
noexcept

Check whether the input value is within the defined closed interval [Begin, End].

◆ KRATOS_CLASS_POINTER_DEFINITION()

KRATOS_CLASS_POINTER_DEFINITION ( IntervalUtility< TValue >  )

◆ PrintData()

void PrintData ( std::ostream &  rOStream) const

Print object's data.

◆ PrintInfo()

void PrintInfo ( std::ostream &  rOStream) const

Print information about this object.


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