2D specfem::assembly::mesh_impl::shape_functions¶
-
template<>
struct shape_functions<specfem::element::dimension_tag::dim2>¶ Shape function and their derivatives for every control node within the mesh.
Subclassed by specfem::assembly::mesh< specfem::element::dimension_tag::dim2 >
Public Types
-
using ShapeFunctionViewType = Kokkos::View<type_real***, Kokkos::LayoutRight, Kokkos::DefaultExecutionSpace>¶
Kokkos view type for shape function storage.
3D view with dimensions [ngllz, ngllx, ngnod] using right layout for optimal memory access when iterating over control nodes.
-
using DShapeFunctionViewType = Kokkos::View<type_real****, Kokkos::LayoutRight, Kokkos::DefaultExecutionSpace>¶
Kokkos view type for shape function derivative storage.
4D view with dimensions [ngllz, ngllx, ndim, ngnod] where ndim=2, storing derivatives with respect to both \(\xi\) and \(\zeta\) directions.
Public Functions
-
inline shape_functions(const int &ngllz, const int &ngllx, const int &ngnod)¶
Constructor for pre-allocated shape function computation.
Creates shape function storage with the specified dimensions but does not compute values. This constructor is used when shape functions will be computed and populated separately, typically in mesh assembly operations.
- Parameters:
ngllz – Number of GLL quadrature points in z direction
ngllx – Number of GLL quadrature points in x direction
ngnod – Number of control nodes per element
-
shape_functions(const Kokkos::View<type_real*, Kokkos::DefaultHostExecutionSpace> xi, const Kokkos::View<type_real*, Kokkos::DefaultHostExecutionSpace> gamma, const int &ngll, const int &ngnod)¶
Constructor with immediate shape function computation.
Computes shape functions and their derivatives at the provided quadrature points using the spectral element shape function library. This constructor performs parallel computation using Kokkos and synchronizes data between host and device memory.
- Parameters:
xi – GLL quadrature points in the xi (x) direction on [-1,1]
gamma – GLL quadrature points in the gamma (z) direction on [-1,1]
ngll – Number of GLL points (assumed equal in both directions)
ngnod – Number of control nodes per element
-
shape_functions() = default¶
Default constructor.
Public Members
-
int ngllz¶
Number of quadrature points in z dimension.
-
int ngllx¶
Number of quadrature points in x dimension.
-
int ngnod¶
Number of control nodes.
-
ShapeFunctionViewType shape2D¶
Device view containing shape function values.
Shape functions
-
DShapeFunctionViewType dshape2D¶
Device view containing shape function derivatives.
Shape function derivatives
-
ShapeFunctionViewType::host_mirror_type h_shape2D¶
Host mirror view of shape function values.
Shape functions
-
DShapeFunctionViewType::host_mirror_type h_dshape2D¶
Host mirror view of shape function derivatives.
Shape function derivatives
Public Static Attributes
-
static constexpr auto dimension_tag = specfem::element::dimension_tag::dim2¶
Compile-time dimension tag for template specialization.
Dimension
-
using ShapeFunctionViewType = Kokkos::View<type_real***, Kokkos::LayoutRight, Kokkos::DefaultExecutionSpace>¶