specfem::assembly::impl::domain_properties¶
-
template<specfem::element::dimension_tag DimensionTag, specfem::element::medium_tag MediumTag, specfem::element::property_tag PropertyTag>
struct domain_properties¶ Material properties storage for spectral elements at quadrature points.
Template container that stores material properties (density, elastic moduli, etc.) for all quadrature points within spectral elements. Specializes for different dimension/medium/property combinations and provides efficient Kokkos-based storage.
Inherits from
properties::data_containerfor storage andimpl::Accessorfor element-wise access. Material properties are organized as:2D: properties[nspec][ngllz][ngllx]
3D: properties[nspec][ngllz][nglly][ngllx]
Template parameters select appropriate specialization:
DimensionTag: Spatial dimension (dim2/dim3)
MediumTag: Physical medium (acoustic, elastic, poroelastic)
PropertyTag: Material symmetry (isotropic, anisotropic)
- Template Parameters:
DimensionTag – Spatial dimension
MediumTag – Physical medium type
PropertyTag – Material property type
Dimension-specific Specializations¶
-
template<specfem::element::medium_tag MediumTag, specfem::element::property_tag PropertyTag>
struct domain_properties<specfem::element::dimension_tag::dim2, MediumTag, PropertyTag> : public specfem::medium_container::properties::data_container<specfem::element::dimension_tag::dim2, MediumTag, PropertyTag>, public specfem::assembly::impl::DomainAccessor<specfem::element::dimension_tag::dim2, domain_properties<specfem::element::dimension_tag::dim2, MediumTag, PropertyTag>>¶ 2D material properties container specialization.
Stores material properties at quadrature points for 2D spectral elements. Data layout: properties[element][ngllz][ngllx] where ngllz and ngllx are quadrature points in vertical and horizontal directions.
- Template Parameters:
MediumTag – Physical medium (acoustic, elastic, poroelastic)
PropertyTag – Material symmetry (isotropic, anisotropic, cosserat)
Public Types
-
using base_type = specfem::medium_container::properties::data_container<specfem::element::dimension_tag::dim2, MediumTag, PropertyTag>¶
Base data container type for property storage.
Public Functions
-
domain_properties() = default¶
Default constructor for empty container.
-
domain_properties(const specfem::datatype::ElementIndexRange &elements, const specfem::assembly::mesh<dimension_tag> &mesh, const specfem::mesh::materials<dimension_tag> &materials, const bool has_gll_model)¶
Construct 2D properties from mesh and material data.
Extracts material properties from mesh materials and stores them at all quadrature points for the specified spectral elements.
- Parameters:
elements – Contiguous range of global element indices for this type
mesh – 2D mesh geometry and connectivity
materials – Material database indexed by element
has_gll_model – Skip material assignment for GLL models
-
template<typename PointValues, typename IndexType>
void add_device_values(const IndexType &index, PointValues &values) const = delete¶ Device value access disabled for this container type.
-
template<typename PointValues, typename IndexType>
void add_host_values(const IndexType &index, PointValues &values) const = delete¶ Host value access disabled for this container type.
-
inline void load_device_values(const IndexType &index, PointValues &values) const¶
Load data from container to point values on device.
Reads data from the container at the specified index and copies it to the provided point values object. Supports both scalar and SIMD vectorized indices for optimal performance.
- Template Parameters:
PointValues – Point data type (properties, field, etc.)
IndexType – Index type (index or simd_index)
- Parameters:
index – Quadrature point index within element
values – Point values object to fill with data
-
inline void load_host_values(const IndexType &index, PointValues &values) const¶
Load data from container to point values on host.
Host version of load_device_values. Should be called from host code for accessing data in host memory or performing host-side operations.
- Template Parameters:
PointValues – Point data type (properties, field, etc.)
IndexType – Index type (index or simd_index)
- Parameters:
index – Quadrature point index within element
values – Point values object to fill with data
-
inline void store_device_values(const IndexType &index, const PointValues &values) const¶
Store point values to container on device.
Writes data from point values object to the container at the specified index. Overwrites existing data in the container.
- Template Parameters:
PointValues – Point data type (properties, field, etc.)
IndexType – Index type (index or simd_index)
- Parameters:
index – Quadrature point index within element
values – Point values object containing data to store
-
inline void store_host_values(const IndexType &index, const PointValues &values) const¶
Store point values to container on host.
Host version of store_device_values for host-side operations.
- Template Parameters:
PointValues – Point data type (properties, field, etc.)
IndexType – Index type (index or simd_index)
- Parameters:
index – Quadrature point index within element
values – Point values object containing data to store
-
inline void add_device_values(const IndexType &index, const PointValues &values) const¶
Add point values to existing container data on device.
Performs element-wise addition of point values to existing data in the container. Commonly used for accumulating contributions (e.g., sensitivity kernels, forces).
- Template Parameters:
PointValues – Point data type (properties, field, etc.)
IndexType – Index type (index or simd_index)
- Parameters:
index – Quadrature point index within element
values – Point values to add to existing container data
-
inline void add_host_values(const IndexType &index, const PointValues &values) const¶
Add point values to existing container data on host.
Host version of add_device_values for accumulation operations.
- Template Parameters:
PointValues – Point data type (properties, field, etc.)
IndexType – Index type (index or simd_index)
- Parameters:
index – Quadrature point index within element
values – Point values to add to existing container data
Public Members
-
specfem::datatype::ElementIndexRange element_range¶
Global element index range for this type
-
template<specfem::element::medium_tag MediumTag, specfem::element::property_tag PropertyTag>
struct domain_properties<specfem::element::dimension_tag::dim3, MediumTag, PropertyTag> : public specfem::medium_container::properties::data_container<specfem::element::dimension_tag::dim3, MediumTag, PropertyTag>, public specfem::assembly::impl::DomainAccessor<specfem::element::dimension_tag::dim3, domain_properties<specfem::element::dimension_tag::dim3, MediumTag, PropertyTag>>¶ 3D material properties container specialization.
Stores material properties at quadrature points for 3D spectral elements. Data layout: properties[element][ngllz][nglly][ngllx] where ngllz, nglly, and ngllx are quadrature points in z, y, and x directions respectively.
- Template Parameters:
MediumTag – Physical medium (acoustic, elastic)
PropertyTag – Material symmetry (isotropic, anisotropic)
Public Types
-
using base_type = specfem::medium_container::properties::data_container<specfem::element::dimension_tag::dim3, MediumTag, PropertyTag>¶
Base data container type for property storage.
Public Functions
-
domain_properties() = default¶
Default constructor for empty container.
-
domain_properties(const specfem::datatype::ElementIndexRange &elements, const specfem::assembly::mesh<dimension_tag> &mesh, const specfem::mesh::materials<dimension_tag> &materials, const bool has_gll_model)¶
Construct 3D properties from mesh and material data.
Extracts material properties from mesh materials and stores them at all quadrature points for the specified spectral elements.
- Parameters:
elements – Contiguous range of global element indices for this type
mesh – 3D mesh geometry and connectivity
materials – Material database indexed by element
has_gll_model – Skip material assignment for GLL models
-
template<typename PointValues, typename IndexType>
void add_device_values(const IndexType &index, PointValues &values) const = delete¶ Device value access disabled for this container type.
-
template<typename PointValues, typename IndexType>
void add_host_values(const IndexType &index, PointValues &values) const = delete¶ Host value access disabled for this container type.
-
inline void load_device_values(const IndexType &index, PointValues &values) const¶
Load data from container to point values on device.
Reads data from the container at the specified index and copies it to the provided point values object. Supports both scalar and SIMD vectorized indices for optimal performance.
- Template Parameters:
PointValues – Point data type (properties, field, etc.)
IndexType – Index type (index or simd_index)
- Parameters:
index – Quadrature point index within element
values – Point values object to fill with data
-
inline void load_host_values(const IndexType &index, PointValues &values) const¶
Load data from container to point values on host.
Host version of load_device_values. Should be called from host code for accessing data in host memory or performing host-side operations.
- Template Parameters:
PointValues – Point data type (properties, field, etc.)
IndexType – Index type (index or simd_index)
- Parameters:
index – Quadrature point index within element
values – Point values object to fill with data
-
inline void store_device_values(const IndexType &index, const PointValues &values) const¶
Store point values to container on device.
Writes data from point values object to the container at the specified index. Overwrites existing data in the container.
- Template Parameters:
PointValues – Point data type (properties, field, etc.)
IndexType – Index type (index or simd_index)
- Parameters:
index – Quadrature point index within element
values – Point values object containing data to store
-
inline void store_host_values(const IndexType &index, const PointValues &values) const¶
Store point values to container on host.
Host version of store_device_values for host-side operations.
- Template Parameters:
PointValues – Point data type (properties, field, etc.)
IndexType – Index type (index or simd_index)
- Parameters:
index – Quadrature point index within element
values – Point values object containing data to store
-
inline void add_device_values(const IndexType &index, const PointValues &values) const¶
Add point values to existing container data on device.
Performs element-wise addition of point values to existing data in the container. Commonly used for accumulating contributions (e.g., sensitivity kernels, forces).
- Template Parameters:
PointValues – Point data type (properties, field, etc.)
IndexType – Index type (index or simd_index)
- Parameters:
index – Quadrature point index within element
values – Point values to add to existing container data
-
inline void add_host_values(const IndexType &index, const PointValues &values) const¶
Add point values to existing container data on host.
Host version of add_device_values for accumulation operations.
- Template Parameters:
PointValues – Point data type (properties, field, etc.)
IndexType – Index type (index or simd_index)
- Parameters:
index – Quadrature point index within element
values – Point values to add to existing container data
Public Members
-
specfem::datatype::ElementIndexRange element_range¶
Global element index range for this type