specfem::data_access::ContainerType¶
specfem::data_access::Container¶
-
template<specfem::data_access::ContainerType ContainerType, specfem::data_access::DataClassType DataClass, specfem::element::dimension_tag DimensionTag>
struct Container¶ Type-safe data container for spectral element simulation data.
Provides scalar, vector, and tensor storage types based on container layout, data classification, and spatial dimension. Used throughout SPECFEM for mesh data, field variables, and material properties.
Usage: For example, to store scalar data (e.g., density) for the whole simulation domain in 2D:
using density_container = specfem::data_access::Container< specfem::data_access::ContainerType::domain, // density data-class not explicitly defined specfem::element::dimension_tag::dim2>; using scalar_view = density_container::scalar_type<float, Kokkos::HostSpace>; scalar_view density("density", nspec, ngllz, ngllx);
- Template Parameters:
ContainerType – Storage layout (domain/edge/face/boundary)
DataClass – Type of data being stored (properties/fields/indices)
DimensionTag – Spatial dimension (2D/3D)
Public Types
-
template<typename T, typename MemorySpace>
using scalar_type = typename impl::ContainerValueType<ContainerType, dimension_tag>::template scalar_type<T, MemorySpace>¶ Container to be used when storing scalar data.
- Template Parameters:
T – Base data type to be stored within the container
MemorySpace – Kokkos memory space for storage
-
template<typename T, typename MemorySpace>
using vector_type = typename impl::ContainerValueType<ContainerType, dimension_tag>::template vector_type<T, MemorySpace>¶ Container to be used when storing vector data.
- Template Parameters:
T – Base data type to be stored within the container
MemorySpace – Kokkos memory space for storage
-
template<typename T, typename MemorySpace>
using tensor_type = typename impl::ContainerValueType<ContainerType, dimension_tag>::template tensor_type<T, MemorySpace>¶ Container to be used when storing tensor data.
- Template Parameters:
T – Base data type to be stored within the container
MemorySpace – Kokkos memory space for storage
Public Static Attributes
-
static constexpr auto container_type = ContainerType¶
Container layout type.
-
static constexpr auto dimension_tag = DimensionTag¶
Spatial dimension.