2D specfem::assembly::mesh_impl::points¶
-
template<>
struct points<specfem::element::dimension_tag::dim2>¶ Template specialization for 2D quadrature points in spectral element mesh.
This class stores and manages quadrature points for a 2D spectral element mesh, including their coordinates, global indexing, and boundary information. It uses Kokkos views for efficient memory management and device/host data transfers.
- Template Parameters:
specfem::element::dimension_tag::dim2 – Template specialization for 2D case
Subclassed by specfem::assembly::mesh< specfem::element::dimension_tag::dim2 >
Public Types
-
using IndexMappingViewType = Kokkos::View<int***, Kokkos::LayoutLeft, Kokkos::DefaultExecutionSpace>¶
Kokkos view for storing global element number for every quadrature point.
-
using CoordViewType = Kokkos::View<type_real****, Kokkos::LayoutRight, Kokkos::DefaultExecutionSpace>¶
Kokkos view for storing coordinates of every distinct quadrature point.
Public Functions
-
points() = default¶
Default constructor.
Creates an uninitialized points object with default values.
-
inline points(const int &nspec, const int &ngllz, const int &ngllx, const int &nglob)¶
Constructor with mesh parameters.
Initializes the points object with the given mesh dimensions and allocates Kokkos views for storing quadrature point data.
- Parameters:
nspec – Number of spectral elements in the mesh
ngllz – Number of quadrature points in the z (vertical) dimension
ngllx – Number of quadrature points in the x (horizontal) dimension
nglob – Total number of global quadrature points
-
inline points(const int &nspec, const int &ngllz, const int &ngllx, const int &nglob, IndexMappingViewType::host_mirror_type h_index_mapping_in, CoordViewType::host_mirror_type h_coord_in, type_real xmin_in, type_real xmax_in, type_real zmin_in, type_real zmax_in)¶
Constructor with pre-computed coordinate data.
Initializes the points object with pre-computed coordinate arrays and boundary information. This constructor copies the provided host data to device memory using Kokkos deep_copy operations.
- Parameters:
nspec – Number of spectral elements in the mesh
ngllz – Number of quadrature points in the z dimension
ngllx – Number of quadrature points in the x dimension
nglob – Total number of global quadrature points
h_index_mapping_in – Pre-computed host mirror of index mapping
h_coord_in – Pre-computed host mirror of coordinates
xmin_in – Minimum x coordinate value
xmax_in – Maximum x coordinate value
zmin_in – Minimum z coordinate value
zmax_in – Maximum z coordinate value
Public Members
-
int nspec¶
Number of spectral elements.
-
int ngllz¶
Number of quadrature points in z dimension.
-
int ngllx¶
Number of quadrature points in x dimension.
-
int nglob¶
Number of global quadrature points.
-
IndexMappingViewType index_mapping¶
Global index number for every quadrature point
-
CoordViewType coord¶
(x, z) for every distinct quadrature point
-
IndexMappingViewType::host_mirror_type h_index_mapping¶
Global element number for every quadrature point
-
CoordViewType::host_mirror_type h_coord¶
(x, z) for every distinct quadrature point
-
type_real zmax¶
Min and max values of x and z coordinates
Public Static Attributes
-
static constexpr auto dimension_tag = specfem::element::dimension_tag::dim2¶
Dimension.
-
static constexpr auto data_class = specfem::data_access::DataClassType::global_coordinates¶
Data class.