OGS
ElementErrorCode Class Reference

Detailed Description

Collects error flags for mesh elements.

Definition at line 22 of file ElementErrorCode.h.

#include <ElementErrorCode.h>

Inheritance diagram for ElementErrorCode:
[legend]
Collaboration diagram for ElementErrorCode:
[legend]

Public Member Functions

bool get (ElementErrorFlag e) const
 Get value for a specific flag.
void set (ElementErrorFlag e)
 Set a specific flag.
void reset (ElementErrorFlag e)
 Reset a specific flag.
reference operator[] (const ElementErrorFlag e)
bool operator[] (const ElementErrorFlag e) const

Static Public Member Functions

static std::string toString (const ElementErrorFlag e)
 Returns a string output for a specific error flag.

Member Function Documentation

◆ get()

bool ElementErrorCode::get ( ElementErrorFlag e) const
inline

Get value for a specific flag.

Definition at line 26 of file ElementErrorCode.h.

26{ return test(static_cast<std::size_t>(e)); }

◆ operator[]() [1/2]

reference ElementErrorCode::operator[] ( const ElementErrorFlag e)
inline

Definition at line 32 of file ElementErrorCode.h.

32{ return std::bitset<static_cast<std::size_t>(ElementErrorFlag::MaxValue)>::operator[](static_cast<std::size_t>(e)); }

References MaxValue.

◆ operator[]() [2/2]

bool ElementErrorCode::operator[] ( const ElementErrorFlag e) const
inline

Definition at line 33 of file ElementErrorCode.h.

33{ return std::bitset<static_cast<std::size_t>(ElementErrorFlag::MaxValue)>::operator[](static_cast<std::size_t>(e)); }

References MaxValue.

◆ reset()

void ElementErrorCode::reset ( ElementErrorFlag e)
inline

Reset a specific flag.

Definition at line 30 of file ElementErrorCode.h.

30{ std::bitset<static_cast<std::size_t>(ElementErrorFlag::MaxValue)>::set(static_cast<std::size_t>(e), false); }
void set(ElementErrorFlag e)
Set a specific flag.

References MaxValue, and set().

◆ set()

void ElementErrorCode::set ( ElementErrorFlag e)
inline

Set a specific flag.

Definition at line 28 of file ElementErrorCode.h.

28{ std::bitset<static_cast<std::size_t>(ElementErrorFlag::MaxValue)>::set(static_cast<std::size_t>(e), true); }

References MaxValue, and set().

Referenced by reset(), set(), MeshLib::PrismRule::validate(), and MeshLib::PyramidRule::validate().

◆ toString()

std::string ElementErrorCode::toString ( const ElementErrorFlag e)
inlinestatic

Returns a string output for a specific error flag.

Definition at line 36 of file ElementErrorCode.h.

37 {
39 {
40 return "zero volume";
41 }
43 {
44 return "non coplanar nodes";
45 }
47 {
48 return "non-convex geometry";
49 }
51 {
52 return "wrong node order";
53 }
54 return "nonspecified error";
55 }

References NodeOrder, NonConvex, NonCoplanar, and ZeroVolume.

Referenced by MeshToolsLib::MeshValidation::ElementErrorCodeOutput(), and MeshToolsLib::MeshValidation::testElementGeometry().


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