orientedType Class Reference

Class to determine the 'oriented' status of surface fields. More...

Collaboration diagram for orientedType:

Public Types

enum  orientedOption : unsigned char { UNKNOWN = 0, ORIENTED = 1, UNORIENTED = 2 }
 Enumeration defining oriented flags. More...
 

Public Member Functions

 orientedType (const orientedType &) noexcept=default
 Copy construct. More...
 
orientedTypeoperator= (const orientedType &) noexcept=default
 Copy assignment. More...
 
constexpr orientedType () noexcept
 Default construct as UNKNOWN. More...
 
 orientedType (orientedOption opt) noexcept
 Implicit construct from enumeration. More...
 
constexpr orientedType (const bool isOriented) noexcept
 Construct from bool. More...
 
 orientedType (Istream &is)
 Construct from Istream. More...
 
orientedOption oriented () const noexcept
 Return the oriented flag. More...
 
orientedOptionoriented () noexcept
 Return non-const reference to the oriented flag. More...
 
bool is_oriented () const noexcept
 True if ORIENTED. More...
 
void setOriented (bool on=true) noexcept
 Set the oriented flag: on/off. More...
 
void read (const dictionary &dict)
 Read the "oriented" state from dictionary. More...
 
bool writeEntry (Ostream &os) const
 Write the "oriented" flag entry (if ORIENTED) More...
 
void operator+= (const orientedType &ot)
 
void operator-= (const orientedType &ot)
 
void operator*= (const orientedType &ot)
 
void operator/= (const orientedType &ot)
 
void operator*= (const scalar s)
 
void operator/= (const scalar s)
 
bool operator() () const noexcept
 Convert to bool. Same as is_oriented() More...
 

Static Public Member Functions

static bool checkType (const orientedType &a, const orientedType &b) noexcept
 True if can operate on this combination of oriented types. More...
 

Static Public Attributes

static const Enum< orientedOptionorientedOptionNames
 Named enumerations for oriented flags. More...
 

Friends

Istreamoperator>> (Istream &is, orientedType &ot)
 
Ostreamoperator<< (Ostream &os, const orientedType &ot)
 

Detailed Description

Class to determine the 'oriented' status of surface fields.

Source files

Definition at line 52 of file orientedType.H.

Member Enumeration Documentation

◆ orientedOption

enum orientedOption : unsigned char

Enumeration defining oriented flags.

Enumerator
UNKNOWN 

Unknown/undefined orientation.

ORIENTED 

Is oriented.

UNORIENTED 

Is unoriented.

Definition at line 61 of file orientedType.H.

Constructor & Destructor Documentation

◆ orientedType() [1/5]

orientedType ( const orientedType )
defaultnoexcept

Copy construct.

◆ orientedType() [2/5]

constexpr orientedType ( )
inlinenoexcept

Default construct as UNKNOWN.

Definition at line 107 of file orientedType.H.

◆ orientedType() [3/5]

orientedType ( orientedOption  opt)
inlinenoexcept

Implicit construct from enumeration.

Definition at line 115 of file orientedType.H.

◆ orientedType() [4/5]

constexpr orientedType ( const bool  isOriented)
inlineexplicitnoexcept

Construct from bool.

Definition at line 123 of file orientedType.H.

◆ orientedType() [5/5]

orientedType ( Istream is)
explicit

Construct from Istream.

Definition at line 94 of file orientedType.C.

References IOstream::check(), and FUNCTION_NAME.

Here is the call graph for this function:

Member Function Documentation

◆ operator=()

orientedType& operator= ( const orientedType )
defaultnoexcept

Copy assignment.

◆ checkType()

bool checkType ( const orientedType a,
const orientedType b 
)
staticnoexcept

True if can operate on this combination of oriented types.

Definition at line 43 of file orientedType.C.

References Foam::constant::physicoChemical::b, and orientedType::oriented().

Here is the call graph for this function:

◆ oriented() [1/2]

orientedOption oriented ( ) const
inlinenoexcept

Return the oriented flag.

Definition at line 148 of file orientedType.H.

Referenced by orientedType::checkType(), Foam::checkTypes(), orientedType::operator+=(), orientedType::operator-=(), and Foam::operator<<().

Here is the caller graph for this function:

◆ oriented() [2/2]

orientedOption& oriented ( )
inlinenoexcept

Return non-const reference to the oriented flag.

Definition at line 153 of file orientedType.H.

◆ is_oriented()

bool is_oriented ( ) const
inlinenoexcept

True if ORIENTED.

Definition at line 158 of file orientedType.H.

References orientedType::ORIENTED.

Referenced by Foam::lerp(), orientedType::operator()(), orientedType::operator*=(), Foam::operator+(), Foam::operator-(), orientedType::operator/=(), and Foam::operator^().

Here is the caller graph for this function:

◆ setOriented()

void setOriented ( bool  on = true)
inlinenoexcept

Set the oriented flag: on/off.

Definition at line 163 of file orientedType.H.

References orientedType::ORIENTED, and orientedType::UNORIENTED.

◆ read()

void read ( const dictionary dict)

Read the "oriented" state from dictionary.

Definition at line 104 of file orientedType.C.

References dict.

◆ writeEntry()

bool writeEntry ( Ostream os) const

Write the "oriented" flag entry (if ORIENTED)

Returns
True if entry was written

Definition at line 116 of file orientedType.C.

References os(), Foam::output(), and Ostream::writeEntry().

Here is the call graph for this function:

◆ operator+=()

void operator+= ( const orientedType ot)

Definition at line 131 of file orientedType.C.

References Foam::checkTypes(), and orientedType::oriented().

Here is the call graph for this function:

◆ operator-=()

void operator-= ( const orientedType ot)

Definition at line 143 of file orientedType.C.

References Foam::checkTypes(), and orientedType::oriented().

Here is the call graph for this function:

◆ operator*=() [1/2]

void operator*= ( const orientedType ot)

Definition at line 155 of file orientedType.C.

References orientedType::is_oriented(), and setOriented().

Here is the call graph for this function:

◆ operator/=() [1/2]

void operator/= ( const orientedType ot)

Definition at line 161 of file orientedType.C.

References orientedType::is_oriented(), and setOriented().

Here is the call graph for this function:

◆ operator*=() [2/2]

void operator*= ( const scalar  s)

Definition at line 167 of file orientedType.C.

◆ operator/=() [2/2]

void operator/= ( const scalar  s)

Definition at line 173 of file orientedType.C.

◆ operator()()

bool operator() ( ) const
inlinenoexcept

Convert to bool. Same as is_oriented()

Definition at line 193 of file orientedType.H.

References orientedType::is_oriented().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator>>

Istream& operator>> ( Istream is,
orientedType ot 
)
friend

◆ operator<<

Ostream& operator<< ( Ostream os,
const orientedType ot 
)
friend

Member Data Documentation

◆ orientedOptionNames

const Foam::Enum< Foam::orientedType::orientedOption > orientedOptionNames
static

Named enumerations for oriented flags.

Definition at line 74 of file orientedType.H.

Referenced by Foam::checkTypes(), Foam::operator<<(), and Foam::operator>>().


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