Advanced Multi-Physics (AMP)
On-Line Documentation
Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
AMP::Mesh::BoxMesh::MeshElementIndex Class Reference

Structure to uniquely identify an element. More...

#include <BoxMesh.h>

Public Member Functions

constexpr const auto & index () const
 
constexpr int & index (int d)
 
constexpr int index (int d) const
 
constexpr bool isNull () const
 
constexpr MeshElementIndex ()=default
 Empty constructor.
 
constexpr MeshElementIndex (GeomType type, uint8_t side, int x, int y=0, int z=0)
 Default constructor.
 
constexpr bool operator!= (const MeshElementIndex &rhs) const
 Operator !=.
 
constexpr bool operator< (const MeshElementIndex &rhs) const
 Operator <.
 
constexpr bool operator<= (const MeshElementIndex &rhs) const
 Operator <=.
 
constexpr bool operator== (const MeshElementIndex &rhs) const
 Operator ==.
 
constexpr bool operator> (const MeshElementIndex &rhs) const
 Operator >
 
constexpr bool operator>= (const MeshElementIndex &rhs) const
 Operator >=.
 
constexpr int & operator[] (int d)
 
constexpr int operator[] (int d) const
 
std::string print () const
 
constexpr void reset ()
 
constexpr void reset (GeomType type, uint8_t side, int x, int y=0, int z=0)
 
constexpr uint8_t side () const
 
constexpr GeomType type () const
 

Static Public Member Functions

static constexpr size_t numElements (const MeshElementIndex &first, const MeshElementIndex &last)
 

Private Attributes

std::array< int, 3 > d_index = { 0, 0, 0 }
 Global x, y, z index (may be negative)
 
uint8_t d_side = 255
 Are we dealing with x, y, or z faces/edges.
 
uint8_t d_type = 0
 Mesh element type.
 

Friends

class BoxMesh
 
class structuredMeshElement
 

Detailed Description

Structure to uniquely identify an element.

This class help convert between logical coordinates and the mesh element of interest

Definition at line 108 of file BoxMesh.h.

Constructor & Destructor Documentation

◆ MeshElementIndex() [1/2]

constexpr AMP::Mesh::BoxMesh::MeshElementIndex::MeshElementIndex ( )
constexprdefault

Empty constructor.

◆ MeshElementIndex() [2/2]

constexpr AMP::Mesh::BoxMesh::MeshElementIndex::MeshElementIndex ( GeomType  type,
uint8_t  side,
int  x,
int  y = 0,
int  z = 0 
)
explicitconstexpr

Default constructor.

The default constructor

Parameters
typeElement type
sideSide of the parent element (ignored if it is the parent or vertex)
xLogical coordinate of the element
yLogical coordinate of the element
zLogical coordinate of the element

Member Function Documentation

◆ index() [1/3]

constexpr const auto & AMP::Mesh::BoxMesh::MeshElementIndex::index ( ) const
inlineconstexpr

Definition at line 133 of file BoxMesh.h.

References d_index.

◆ index() [2/3]

constexpr int & AMP::Mesh::BoxMesh::MeshElementIndex::index ( int  d)
inlineconstexpr

Definition at line 135 of file BoxMesh.h.

References d_index.

◆ index() [3/3]

constexpr int AMP::Mesh::BoxMesh::MeshElementIndex::index ( int  d) const
inlineconstexpr

Definition at line 134 of file BoxMesh.h.

References d_index.

◆ isNull()

constexpr bool AMP::Mesh::BoxMesh::MeshElementIndex::isNull ( ) const
inlineconstexpr

Definition at line 126 of file BoxMesh.h.

References d_side.

◆ numElements()

static constexpr size_t AMP::Mesh::BoxMesh::MeshElementIndex::numElements ( const MeshElementIndex first,
const MeshElementIndex last 
)
staticconstexpr

◆ operator!=()

constexpr bool AMP::Mesh::BoxMesh::MeshElementIndex::operator!= ( const MeshElementIndex rhs) const
constexpr

Operator !=.

◆ operator<()

constexpr bool AMP::Mesh::BoxMesh::MeshElementIndex::operator< ( const MeshElementIndex rhs) const
constexpr

◆ operator<=()

constexpr bool AMP::Mesh::BoxMesh::MeshElementIndex::operator<= ( const MeshElementIndex rhs) const
constexpr

Operator <=.

◆ operator==()

constexpr bool AMP::Mesh::BoxMesh::MeshElementIndex::operator== ( const MeshElementIndex rhs) const
constexpr

Operator ==.

◆ operator>()

constexpr bool AMP::Mesh::BoxMesh::MeshElementIndex::operator> ( const MeshElementIndex rhs) const
constexpr

◆ operator>=()

constexpr bool AMP::Mesh::BoxMesh::MeshElementIndex::operator>= ( const MeshElementIndex rhs) const
constexpr

Operator >=.

◆ operator[]() [1/2]

constexpr int & AMP::Mesh::BoxMesh::MeshElementIndex::operator[] ( int  d)
inlineconstexpr

Definition at line 137 of file BoxMesh.h.

References d_index.

◆ operator[]() [2/2]

constexpr int AMP::Mesh::BoxMesh::MeshElementIndex::operator[] ( int  d) const
inlineconstexpr

Definition at line 136 of file BoxMesh.h.

References d_index.

◆ print()

std::string AMP::Mesh::BoxMesh::MeshElementIndex::print ( ) const

◆ reset() [1/2]

constexpr void AMP::Mesh::BoxMesh::MeshElementIndex::reset ( )
constexpr

◆ reset() [2/2]

constexpr void AMP::Mesh::BoxMesh::MeshElementIndex::reset ( GeomType  type,
uint8_t  side,
int  x,
int  y = 0,
int  z = 0 
)
constexpr

◆ side()

constexpr uint8_t AMP::Mesh::BoxMesh::MeshElementIndex::side ( ) const
inlineconstexpr

Definition at line 139 of file BoxMesh.h.

References d_side.

◆ type()

constexpr GeomType AMP::Mesh::BoxMesh::MeshElementIndex::type ( ) const
inlineconstexpr

Definition at line 138 of file BoxMesh.h.

References d_type.

Friends And Related Symbol Documentation

◆ BoxMesh

friend class BoxMesh
friend

Definition at line 148 of file BoxMesh.h.

◆ structuredMeshElement

friend class structuredMeshElement
friend

Definition at line 149 of file BoxMesh.h.

Member Data Documentation

◆ d_index

std::array<int, 3> AMP::Mesh::BoxMesh::MeshElementIndex::d_index = { 0, 0, 0 }
private

Global x, y, z index (may be negative)

Definition at line 147 of file BoxMesh.h.

Referenced by index(), index(), index(), operator[](), and operator[]().

◆ d_side

uint8_t AMP::Mesh::BoxMesh::MeshElementIndex::d_side = 255
private

Are we dealing with x, y, or z faces/edges.

Definition at line 146 of file BoxMesh.h.

Referenced by isNull(), and side().

◆ d_type

uint8_t AMP::Mesh::BoxMesh::MeshElementIndex::d_type = 0
private

Mesh element type.

Definition at line 145 of file BoxMesh.h.

Referenced by type().


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



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:43.
Comments on this page