specfem::mesh_entity::edge¶
-
template<specfem::dimension::type Dimension>
struct edge¶ Edge entities for spectral element connectivity.
- Template Parameters:
DimensionTag – Spatial dimension (2D or 3D)
Dimension-Specific Implementations¶
specfem::mesh_entity::element¶
-
template<specfem::dimension::type Dimension>
struct element¶ Element structure with coordinate mapping capabilities.
- Template Parameters:
DimensionTag – Spatial dimension (2D or 3D)
Dimension-Specific Implementations¶
-
template<>
struct element<specfem::dimension::type::dim2> : public specfem::mesh_entity::element_grid<specfem::dimension::type::dim2>¶ 2D element with coordinate mapping capabilities.
Public Functions
-
element() = default¶
Default constructor.
-
element(const int ngll)¶
Construct with uniform GLL points.
- Parameters:
ngll – Number of GLL points in both directions
-
element(const int ngllz, const int ngllx)¶
Construct with different GLL points per direction.
- Parameters:
ngllz – Number of GLL points in z-direction
ngllx – Number of GLL points in x-direction
- Throws:
std::invalid_argument – if ngllz != ngllx
-
int number_of_points_on_orientation(const specfem::mesh_entity::dim2::type &entity) const¶
Get number of GLL points on a mesh entity.
- Parameters:
entity – Mesh entity type (edge or corner)
- Returns:
Number of GLL points on the specified entity
-
std::tuple<int, int> map_coordinates(const specfem::mesh_entity::dim2::type &entity, const int point) const¶
Map point index to element coordinates.
- Parameters:
entity – Mesh entity type
point – Point index on the entity
- Returns:
Tuple of (iz, ix) coordinates
-
std::tuple<int, int> map_coordinates(const specfem::mesh_entity::dim2::type &corner) const¶
Get corner coordinates.
- Parameters:
corner – Corner entity type
- Returns:
Tuple of (iz, ix) coordinates for the corner
-
inline bool operator==(const int ngll_in) const¶
Check if element matches specified GLL point count.
- Parameters:
ngll_in – Number of GLL points to compare against
- Returns:
True if all dimensions match the specified count
-
inline bool operator!=(const int ngll_in) const¶
Check if element does not match specified GLL point count.
- Parameters:
ngll_in – Number of GLL points to compare against
- Returns:
True if any dimension does not match the specified count
-
element() = default¶
-
template<>
struct element<specfem::dimension::type::dim3> : public specfem::mesh_entity::element_grid<specfem::dimension::type::dim3>¶ 3D element with coordinate mapping capabilities.
Public Functions
-
element() = default¶
Default constructor.
-
element(const int ngll)¶
Construct with uniform GLL points.
- Parameters:
ngll – Number of GLL points in all directions
-
element(const int ngllz, const int nglly, const int ngllx)¶
Construct with different GLL points per direction.
- Parameters:
ngllz – Number of GLL points in z-direction
nglly – Number of GLL points in y-direction
ngllx – Number of GLL points in x-direction
- Throws:
std::runtime_error – if dimensions differ or < 2
-
int number_of_points_on_orientation(const specfem::mesh_entity::dim3::type &entity) const¶
Get number of GLL points on a mesh entity.
- Parameters:
entity – Mesh entity type (face, edge, corner)
- Returns:
Number of GLL points on the specified entity
-
std::tuple<int, int, int> map_coordinates(const specfem::mesh_entity::dim3::type &entity, const int point) const¶
Map point index to element coordinates.
- Parameters:
entity – Mesh entity type
point – Point index on the entity
- Returns:
Tuple of (iz, iy, ix) coordinates
-
std::tuple<int, int, int> map_coordinates(const specfem::mesh_entity::dim3::type &corner) const¶
Get corner coordinates.
- Parameters:
corner – Corner entity type
- Returns:
Tuple of (iz, iy, ix) coordinates for the corner
-
inline bool operator==(const int ngll) const¶
Check if element matches specified GLL point count.
- Parameters:
ngll – Number of GLL points to compare against
- Returns:
True if all dimensions match the specified count
-
inline bool operator!=(const int ngll) const¶
Check if element does not match specified GLL point count.
- Parameters:
ngll – Number of GLL points to compare against
- Returns:
True if any dimension does not match the specified count
Public Members
-
int ngllz¶
Number of GLL points in z-direction.
-
int nglly¶
Number of GLL points in y-direction.
-
int ngllx¶
Number of GLL points in x-direction.
-
int orderz¶
Polynomial order in z.
-
int ordery¶
Polynomial order in y.
-
int orderx¶
Polynomial order in x.
-
int size¶
Total number of GLL points.
-
element() = default¶
specfem::mesh_entity::element_grid¶
-
template<specfem::dimension::type Dimension>
struct element_grid¶ Element grid structure with GLL point configuration.
- Template Parameters:
DimensionTag – Spatial dimension (2D or 3D)
Dimension-Specific Implementations¶
-
template<>
struct element_grid<specfem::dimension::type::dim2>¶ 2D element grid with GLL point configuration.
Subclassed by specfem::mesh_entity::element< specfem::dimension::type::dim2 >
Public Functions
-
element_grid() = default¶
Default constructor.
-
inline element_grid(const int ngll)¶
Construct with uniform GLL points.
- Parameters:
ngll – Number of GLL points in both directions
-
inline element_grid(const int ngllz, const int ngllx)¶
Construct with different GLL points per direction.
- Parameters:
ngllz – Number of GLL points in z-direction
ngllx – Number of GLL points in x-direction
- Throws:
std::invalid_argument – if ngllz != ngllx
-
inline bool operator==(const int ngll_in) const¶
Check if element matches specified GLL point count.
- Parameters:
ngll_in – Number of GLL points to compare against
- Returns:
True if all dimensions match the specified count
-
inline bool operator!=(const int ngll_in) const¶
Check if element does not match specified GLL point count.
- Parameters:
ngll_in – Number of GLL points to compare against
- Returns:
True if any dimension does not match the specified count
-
element_grid() = default¶
-
template<>
struct element_grid<specfem::dimension::type::dim3>¶ 3D element grid with GLL point configuration.
Subclassed by specfem::mesh_entity::element< specfem::dimension::type::dim3 >
Public Functions
-
element_grid() = default¶
Default constructor.
-
inline element_grid(const int ngll)¶
Construct with uniform GLL points.
- Parameters:
ngll – Number of GLL points in all directions
-
inline element_grid(const int ngllz, const int nglly, const int ngllx)¶
Construct with different GLL points per direction.
- Parameters:
ngllz – Number of GLL points in z-direction
nglly – Number of GLL points in y-direction
ngllx – Number of GLL points in x-direction
- Throws:
std::runtime_error – if dimensions differ or < 2
-
inline bool operator==(const int ngll) const¶
Check if element matches specified GLL point count.
- Parameters:
ngll – Number of GLL points to compare against
- Returns:
True if all dimensions match the specified count
-
inline bool operator!=(const int ngll) const¶
Check if element does not match specified GLL point count.
- Parameters:
ngll – Number of GLL points to compare against
- Returns:
True if any dimension does not match the specified count
Public Members
-
int ngllz¶
Number of GLL points in z-direction.
-
int nglly¶
Number of GLL points in y-direction.
-
int ngllx¶
Number of GLL points in x-direction.
-
int orderz¶
Polynomial order in z.
-
int ordery¶
Polynomial order in y.
-
int orderx¶
Polynomial order in x.
-
int size¶
Total number of GLL points.
-
element_grid() = default¶
specfem::mesh_entity::dim2::type¶
-
enum class specfem::mesh_entity::dim2::type : int¶
Mesh entity types for 2D quadrilateral elements.
Numbering: edges (1-4), corners (5-8)
8 --- 3 --- 7 | | 4 2 | | 5 --- 1 --- 6
Values:
-
enumerator bottom¶
Bottom edge.
-
enumerator right¶
Right edge.
-
enumerator top¶
Top edge.
-
enumerator left¶
Left edge.
-
enumerator bottom_left¶
Bottom-left corner.
-
enumerator bottom_right¶
Bottom-right corner.
-
enumerator top_right¶
Top-right corner.
-
enumerator top_left¶
Top-left corner.
-
enumerator bottom¶
specfem::mesh_entity::dim3::type¶
-
enum class specfem::mesh_entity::dim3::type : int¶
Mesh entity types for 3D hexahedral elements.
6 faces (1-6), 12 edges (7-18), 8 corners (19-26)
8 -------- 7 /| /| / | / | 5 -------- 6 | | | | | | 4 ------|--3 | / | / |/ |/ 1 -------- 2
Values:
-
enumerator bottom¶
Bottom face of the element.
-
enumerator right¶
Right face of the element.
-
enumerator top¶
Top face of the element.
-
enumerator left¶
Left face of the element.
-
enumerator front¶
Front face of the element.
-
enumerator back¶
Back face of the element.
-
enumerator bottom_left¶
Bottom-left edge of the element.
-
enumerator bottom_right¶
Bottom-right edge of the element.
-
enumerator top_right¶
Top-right edge of the element.
-
enumerator top_left¶
Top-left edge of the element.
-
enumerator front_bottom¶
Front-bottom edge of the element.
-
enumerator front_top¶
Front-top edge of the element.
-
enumerator front_left¶
Front-left edge of the element.
-
enumerator front_right¶
Front-right edge of the element.
-
enumerator back_bottom¶
Back-bottom edge of the element.
-
enumerator back_top¶
Back-top edge of the element.
-
enumerator back_left¶
Back-left edge of the element.
-
enumerator back_right¶
Back-right edge of the element.
-
enumerator bottom_front_left¶
Bottom-front-left corner of the element.
-
enumerator bottom_front_right¶
Bottom-front-right corner of the element.
-
enumerator bottom_back_left¶
Bottom-back-left corner of the element.
-
enumerator bottom_back_right¶
Bottom-back-right corner of the element.
-
enumerator top_front_left¶
Top-front-left corner of the element.
-
enumerator top_front_right¶
Top-front-right corner of the element.
-
enumerator top_back_left¶
Top-back-left corner of the element.
-
enumerator top_back_right¶
Top-back-right corner of the element.
-
enumerator bottom¶
specfem::mesh_entity::dim2::to_string¶
specfem::mesh_entity::dim3::to_string¶
specfem::mesh_entity::dim2::edges¶
specfem::mesh_entity::dim2::corners¶
specfem::mesh_entity::dim3::edges¶
-
const std::list<specfem::mesh_entity::dim3::type> specfem::mesh_entity::dim3::edges = {type::bottom_left, type::bottom_right, type::top_right, type::top_left, type::front_bottom, type::front_top, type::front_left, type::front_right, type::back_bottom, type::back_top, type::back_left, type::back_right}¶
All edge types (12 connecting edges)
specfem::mesh_entity::dim3::corners¶
-
const std::list<specfem::mesh_entity::dim3::type> specfem::mesh_entity::dim3::corners = {type::bottom_front_left, type::bottom_front_right, type::bottom_back_left, type::bottom_back_right, type::top_front_left, type::top_front_right, type::top_back_left, type::top_back_right}¶
All corner types (8 vertices)