3D specfem::assembly::mesh

template<>
struct mesh<specfem::dimension::type::dim3> : public specfem::assembly::mesh_impl::points<specfem::dimension::type::dim3>, public specfem::assembly::mesh_impl::quadrature<specfem::dimension::type::dim3>, public specfem::assembly::mesh_impl::control_nodes<specfem::dimension::type::dim3>, public specfem::assembly::mesh_impl::shape_functions<specfem::dimension::type::dim3>

3D assembly mesh for spectral element computations.

Combines mesh components (points, control nodes, shape functions, quadrature) for efficient 3D hexahedral spectral element assembly operations.

Inherits functionality from:

  • points: Quadrature point coordinates and indexing

  • quadrature: GLL quadrature points and weights

  • control_nodes: Element control node data

  • shape_functions: Shape function values and derivatives

Public Types

using IndexMappingViewType = Kokkos::View<int****, Kokkos::LayoutLeft, Kokkos::DefaultExecutionSpace>

Index mapping view type.

Dimensions: [nspec, ngllz, nglly, ngllx] for local-to-global mapping.

using CoordViewType = Kokkos::View<type_real*****, Kokkos::LayoutLeft, Kokkos::DefaultExecutionSpace>

Coordinate view type.

Dimensions: [ndim, nspec, ngllz, nglly, ngllx] for (x, y, z) coordinates.

using ControlNodeCoordinatesView = Kokkos::View<type_real***, Kokkos::LayoutLeft, Kokkos::DefaultExecutionSpace>

Kokkos view type for 3D coordinate storage.

Dimensions: [nspec, ngnod, 3] for (x, y, z) coordinates.

using ControlNodeIndexView = Kokkos::View<int**, Kokkos::LayoutLeft, Kokkos::DefaultExecutionSpace>

Kokkos view type for node index mapping.

Dimensions: [nspec, ngnod] for element-to-node mapping.

using ShapeFunctionViewType = Kokkos::View<type_real****, Kokkos::LayoutRight, Kokkos::DefaultExecutionSpace>

Shape function view type.

Dimensions: [ngllz, nglly, ngllx, ngnod].

using DShapeFunctionViewType = Kokkos::View<type_real*****, Kokkos::LayoutRight, Kokkos::DefaultExecutionSpace>

Shape function derivative view type.

Dimensions: [ngllz, nglly, ngllx, ndim, ngnod].

Public Functions

mesh() = default

Default constructor.

mesh(const int nspec, const int ngnod, const int ngllz, const int nglly, const int ngllx, const specfem::mesh::adjacency_graph<dimension_tag> &adjacency_graph, const specfem::mesh::control_nodes<dimension_tag> &control_nodes, const specfem::quadrature::quadratures &quadrature)

Constructor from mesh components.

Builds 3D assembly mesh from source mesh data.

Parameters:
  • nspec – Number of spectral elements

  • ngnod – Number of control nodes per element

  • ngllz – Number of GLL points in z direction

  • nglly – Number of GLL points in y direction

  • ngllx – Number of GLL points in x direction

  • adjacency_graph – Element connectivity

  • control_nodes – Element control node data

  • quadrature – GLL quadrature information

Public Members

int nspec

Number of spectral elements.

int ngnod

Number of control nodes per element.

specfem::mesh_entity::element<dimension_tag> element_grid

3D GLL grid info

IndexMappingViewType index_mapping

Device index mapping.

IndexMappingViewType::HostMirror h_index_mapping

Host index mapping.

CoordViewType coord

Device coordinates.

CoordViewType::HostMirror h_coord

Host coordinates.

int ngllz

Number of GLL points in z dimension.

int nglly

Number of GLL points in y dimension.

int ngllx

Number of GLL points in x dimension.

int nglob

Total number of global points.

int N

Number of GLL points.

ViewType xi

Device GLL points on [-1,1].

ViewType weights

Device integration weights.

DViewType hprime

Device Lagrange derivative matrix.

DViewType::HostMirror h_hprime

Host Lagrange derivative matrix.

ViewType::HostMirror h_xi

Host GLL points.

ViewType::HostMirror h_weights

Host weights.

ControlNodeCoordinatesView control_node_coordinates

Device coordinates.

ControlNodeCoordinatesView::HostMirror h_control_node_coordinates

Host coordinates.

ControlNodeIndexView control_node_index

Device indices.

ControlNodeIndexView::HostMirror h_control_node_index

Host indices.

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.

ShapeFunctionViewType shape3D

Device shape functions.

DShapeFunctionViewType dshape3D

Device derivatives.

ShapeFunctionViewType::HostMirror h_shape3D

Host shape functions.

DShapeFunctionViewType::HostMirror h_dshape3D

Host derivatives.

Implementation Components

The 3D assembly mesh inherits from several implementation structures that provide specific functionality: