https://mooseframework.inl.gov
Public Member Functions | List of all members
MeshInfo::DomainElemQuality Struct Reference

Key for a libMesh::ElemQuality quality type with a bound (min or max) to be used over an entire domain (sideset or subdomain). More...

#include <MeshInfo.h>

Inheritance diagram for MeshInfo::DomainElemQuality:
[legend]

Public Member Functions

 DomainElemQuality ()=default
 
 DomainElemQuality (const libMesh::ElemQuality elem_quality, const BoundType bound_type)
 
std::string itemName () const
 Get the name for this quality ([min,max]_[quality]) More...
 
void updateValue (std::map< DomainElemQuality, Real > &quality_map, const Real value) const
 Update the value in the quality map. More...
 
libMesh::ElemQualityelemQuality ()
 Get the libMesh::ElemQuality entry. More...
 
const libMesh::ElemQualityelemQuality () const
 
BoundTypeboundType ()
 Get the type of the bound (min or max) More...
 
const BoundTypeboundType () const
 

Detailed Description

Key for a libMesh::ElemQuality quality type with a bound (min or max) to be used over an entire domain (sideset or subdomain).

Definition at line 47 of file MeshInfo.h.

Constructor & Destructor Documentation

◆ DomainElemQuality() [1/2]

MeshInfo::DomainElemQuality::DomainElemQuality ( )
default

◆ DomainElemQuality() [2/2]

MeshInfo::DomainElemQuality::DomainElemQuality ( const libMesh::ElemQuality  elem_quality,
const BoundType  bound_type 
)

Definition at line 172 of file MeshInfo.C.

174  : std::pair<libMesh::ElemQuality, BoundType>(elem_quality, bound_type)
175 {
176 }

Member Function Documentation

◆ boundType() [1/2]

BoundType& MeshInfo::DomainElemQuality::boundType ( )
inline

Get the type of the bound (min or max)

Definition at line 60 of file MeshInfo.h.

Referenced by dataLoad(), and dataStore().

60 { return this->second; }

◆ boundType() [2/2]

const BoundType& MeshInfo::DomainElemQuality::boundType ( ) const
inline

Definition at line 61 of file MeshInfo.h.

61 { return this->second; }

◆ elemQuality() [1/2]

libMesh::ElemQuality& MeshInfo::DomainElemQuality::elemQuality ( )
inline

Get the libMesh::ElemQuality entry.

Definition at line 54 of file MeshInfo.h.

Referenced by dataLoad(), and dataStore().

54 { return this->first; }

◆ elemQuality() [2/2]

const libMesh::ElemQuality& MeshInfo::DomainElemQuality::elemQuality ( ) const
inline

Definition at line 55 of file MeshInfo.h.

55 { return this->first; }

◆ itemName()

std::string MeshInfo::DomainElemQuality::itemName ( ) const

Get the name for this quality ([min,max]_[quality])

Definition at line 179 of file MeshInfo.C.

180 {
181  return (boundType() == BoundType::MAX ? std::string("max") : std::string("min")) + "_" +
183 }
libMesh::ElemQuality & elemQuality()
Get the libMesh::ElemQuality entry.
Definition: MeshInfo.h:54
std::string elemQualityToString(const libMesh::ElemQuality eq)
Definition: MeshInfo.C:34
BoundType & boundType()
Get the type of the bound (min or max)
Definition: MeshInfo.h:60

◆ updateValue()

void MeshInfo::DomainElemQuality::updateValue ( std::map< DomainElemQuality, Real > &  quality_map,
const Real  value 
) const

Update the value in the quality map.

Definition at line 186 of file MeshInfo.C.

Referenced by MeshInfo::possiblyAddDomainInfo().

188 {
189  static const Real default_max = 0;
190  static const Real default_min = std::numeric_limits<Real>::max();
191  const bool is_max = boundType() == BoundType::MAX;
192  auto & entry = quality_map.try_emplace(*this, (is_max ? default_max : default_min)).first->second;
193  if (is_max)
194  entry = std::max(entry, value);
195  else
196  entry = std::min(entry, value);
197 }
auto max(const L &left, const R &right)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
auto min(const L &left, const R &right)
BoundType & boundType()
Get the type of the bound (min or max)
Definition: MeshInfo.h:60

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