OGS
ElementErrorCode Class Reference

Detailed Description

Collects error flags for mesh elements.

Definition at line 33 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. More...
 
void set (ElementErrorFlag e)
 Set a specific flag. More...
 
void reset (ElementErrorFlag e)
 Reset a specific flag. More...
 
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. More...
 

Member Function Documentation

◆ get()

bool ElementErrorCode::get ( ElementErrorFlag  e) const
inline

Get value for a specific flag.

Definition at line 37 of file ElementErrorCode.h.

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

◆ operator[]() [1/2]

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

Definition at line 43 of file ElementErrorCode.h.

43 { 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 44 of file ElementErrorCode.h.

44 { 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 41 of file ElementErrorCode.h.

41 { 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 39 of file ElementErrorCode.h.

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

References MaxValue.

Referenced by reset(), MeshLib::PrismRule6::validate(), and MeshLib::PyramidRule5::validate().

◆ toString()

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

Returns a string output for a specific error flag.

Definition at line 47 of file ElementErrorCode.h.

48  {
50  {
51  return "zero volume";
52  }
54  {
55  return "non coplanar nodes";
56  }
58  {
59  return "non-convex geometry";
60  }
62  {
63  return "wrong node order";
64  }
65  return "nonspecified error";
66  }

References NodeOrder, NonConvex, NonCoplanar, and ZeroVolume.

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


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