Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions core/specfem/algorithms/coupling_integral.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ coupling_integral(const specfem::assembly::assembly<dimension_tag> &assembly,

using PointIndexType =
typename IndexType::iterator_type::index_type::index_type;
using PointFieldType =
specfem::point::acceleration<dimension_tag, self_medium_tag,
IntersectionFieldViewType::using_simd>;
using PointFieldType = specfem::point::acceleration<
specfem::tags::Tags<dimension_tag, self_medium_tag,
IntersectionFieldViewType::simd::using_simd> >;
using SelfTransferFunctionType = specfem::point::transfer_function_self<
IntersectionFactor::n_quad_intersection, dimension_tag,
IntersectionFactor::interface_tag, IntersectionFactor::boundary_tag>;
Expand Down
9 changes: 4 additions & 5 deletions core/specfem/boundary_conditions/stacey/stacey.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -830,13 +830,12 @@ specfem::boundary_conditions::impl_compute_mass_matrix_terms(
constexpr static bool using_simd = PointPropertyType::simd::using_simd;

using PointVelocityType =
specfem::point::velocity<specfem::element::dimension_tag::dim2, MediumTag,
using_simd>;
specfem::point::velocity<specfem::tags::Tags<specfem::element::dimension_tag::dim2, MediumTag,
using_simd>>;

using PointAccelerationType =
specfem::point::acceleration<specfem::element::dimension_tag::dim2, MediumTag,
using_simd>;

specfem::point::acceleration<specfem::tags::Tags<specfem::element::dimension_tag::dim2, MediumTag,
using_simd>>;
using ViewType = typename PointVelocityType::value_type;

using datatype = typename ViewType::value_type;
Expand Down
4 changes: 3 additions & 1 deletion core/specfem/compute/impl/compute_mass_matrix.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ void specfem::compute::impl::compute_mass_matrix(
using parallel_config = specfem::parallel_configuration::default_chunk_config<
dimension_tag, simd, Kokkos::DefaultExecutionSpace>;

using PointTags = specfem::tags::Tags<dimension_tag, medium_tag, using_simd>;

using PointMassType =
specfem::point::mass_inverse<dimension_tag, medium_tag, using_simd>;
specfem::point::mass_inverse<PointTags>;

using PointPropertyType =
specfem::point::properties<dimension_tag, medium_tag, property_tag,
Expand Down
8 changes: 5 additions & 3 deletions core/specfem/compute/impl/compute_material_derivatives.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,14 @@ void specfem::compute::impl::compute_material_derivatives(
NGLL, dimension_tag, Kokkos::DefaultExecutionSpace::scratch_memory_space,
Kokkos::MemoryTraits<Kokkos::Unmanaged>>;

using PointTags = specfem::tags::Tags<dimension_tag, medium_tag, using_simd>;

using PointDisplacementType =
specfem::point::displacement<dimension_tag, medium_tag, using_simd>;
specfem::point::displacement<PointTags>;
using PointVelocityType =
specfem::point::velocity<dimension_tag, medium_tag, using_simd>;
specfem::point::velocity<PointTags>;
using PointAccelerationType =
specfem::point::acceleration<dimension_tag, medium_tag, using_simd>;
specfem::point::acceleration<PointTags>;

using PointFieldDerivativesType =
specfem::point::field_derivatives<dimension_tag, medium_tag, using_simd>;
Expand Down
8 changes: 5 additions & 3 deletions core/specfem/compute/impl/compute_stiffness_interaction.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,16 @@ int specfem::compute::impl::compute_stiffness_interaction(
ngll, Tags::dimension_tag, Kokkos::DefaultExecutionSpace::scratch_memory_space,
Kokkos::MemoryTraits<Kokkos::Unmanaged> >;

using PointTags = specfem::tags::Tags<Tags::dimension_tag, Tags::medium_tag, using_simd>;

using PointBoundaryType =
specfem::point::boundary<Tags::boundary_tag, Tags::dimension_tag, using_simd>;
using PointDisplacementType =
specfem::point::displacement<Tags::dimension_tag, Tags::medium_tag, using_simd>;
specfem::point::displacement<PointTags>;
using PointVelocityType =
specfem::point::velocity<Tags::dimension_tag, Tags::medium_tag, using_simd>;
specfem::point::velocity<PointTags>;
using PointAccelerationType =
specfem::point::acceleration<Tags::dimension_tag, Tags::medium_tag, using_simd>;
specfem::point::acceleration<PointTags>;
using PointJacobianMatrixType =
specfem::point::jacobian_matrix<Tags::dimension_tag, true, using_simd>;
using PointPropertyType =
Expand Down
10 changes: 7 additions & 3 deletions core/specfem/compute/impl/divide_mass_matrix.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,17 @@ void specfem::compute::impl::divide_mass_matrix(
constexpr bool using_simd = (dimension_tag == specfem::element::dimension_tag::dim2) ? true : false;
#endif

using simd = specfem::datatype::simd<type_real, using_simd>;

using PointTags = specfem::tags::Tags<dimension_tag, medium_tag, using_simd>;

using PointAccelerationType =
specfem::point::acceleration<dimension_tag, medium_tag, using_simd>;
specfem::point::acceleration<PointTags>;
using PointMassInverseType =
specfem::point::mass_inverse<dimension_tag, medium_tag, using_simd>;
specfem::point::mass_inverse<PointTags>;

using parallel_config = specfem::parallel_configuration::default_range_config<
specfem::datatype::simd<type_real, using_simd>,
simd,
Kokkos::DefaultExecutionSpace>;

using IndexType = specfem::point::assembly_index<using_simd>;
Expand Down
8 changes: 5 additions & 3 deletions core/specfem/compute/impl/invert_mass_matrix.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,21 @@ void specfem::compute::impl::invert_mass_matrix(
constexpr bool using_simd = (dimension_tag == specfem::element::dimension_tag::dim2) ? true : false;
#endif

using simd = specfem::datatype::simd<type_real, using_simd>;

using PointMassType =
specfem::point::mass_inverse<dimension_tag, medium_tag, using_simd>;
specfem::point::mass_inverse<specfem::tags::Tags<dimension_tag, medium_tag, using_simd>>;

using parallel_config = specfem::parallel_configuration::default_range_config<
specfem::datatype::simd<type_real, using_simd>,
simd,
Kokkos::DefaultExecutionSpace>;

using IndexType = specfem::point::assembly_index<using_simd>;

specfem::execution::RangeIterator range(parallel_config(), nglob);

specfem::execution::for_all(
"specfem::compute::divide_mass_matrix", range,
"specfem::compute::invert_mass_matrix", range,
KOKKOS_LAMBDA(const typename decltype(range)::base_index_type &iterator_index) {
const auto index = iterator_index.get_index();
PointMassType mass;
Expand Down
45 changes: 23 additions & 22 deletions core/specfem/element_coupling.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@

#include "specfem/element.hpp"
#include "specfem/element_connections.hpp"
#include "specfem/setup.hpp"

namespace specfem::tags {
template <auto... TagMembers> struct Tags;
}

namespace specfem::point {

template <specfem::element::dimension_tag DimensionTag,
specfem::element::medium_tag MediumTag, bool UseSIMD>
struct acceleration;
template <typename Tags> struct acceleration;

template <specfem::element::dimension_tag DimensionTag,
specfem::element::medium_tag MediumTag, bool UseSIMD>
struct displacement;
template <typename Tags> struct displacement;

} // namespace specfem::point

Expand Down Expand Up @@ -110,10 +111,10 @@ template <>
struct attributes<specfem::element::dimension_tag::dim2,
specfem::element_coupling::interface_tag::elastic_acoustic>::
self_field<specfem::element_connections::type::weakly_conforming> {
using type =
specfem::point::acceleration<specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::elastic_psv,
false>; ///< vector acceleration
using type = specfem::point::acceleration<
specfem::tags::Tags<specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::elastic_psv,
false> >; ///< vector acceleration
};

/**
Expand All @@ -123,10 +124,10 @@ template <>
struct attributes<specfem::element::dimension_tag::dim2,
specfem::element_coupling::interface_tag::elastic_acoustic>::
coupled_field<specfem::element_connections::type::weakly_conforming> {
using type =
specfem::point::acceleration<specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::acoustic,
false>; ///< scalar acceleration
using type = specfem::point::acceleration<
specfem::tags::Tags<specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::acoustic,
false> >; ///< scalar acceleration
};

/**
Expand Down Expand Up @@ -184,10 +185,10 @@ template <>
struct attributes<specfem::element::dimension_tag::dim2,
specfem::element_coupling::interface_tag::acoustic_elastic>::
self_field<specfem::element_connections::type::weakly_conforming> {
using type =
specfem::point::acceleration<specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::acoustic,
false>; ///< scalar acceleration
using type = specfem::point::acceleration<
specfem::tags::Tags<specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::acoustic,
false> >; ///< scalar acceleration
};

/**
Expand All @@ -197,10 +198,10 @@ template <>
struct attributes<specfem::element::dimension_tag::dim2,
specfem::element_coupling::interface_tag::acoustic_elastic>::
coupled_field<specfem::element_connections::type::weakly_conforming> {
using type =
specfem::point::displacement<specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::elastic_psv,
false>; ///< vector displacement
using type = specfem::point::displacement<
specfem::tags::Tags<specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::elastic_psv,
false> >; ///< vector displacement
};

} // namespace specfem::element_coupling
Expand Down
4 changes: 2 additions & 2 deletions core/specfem/medium/dim2/acoustic/isotropic/mass_matrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ namespace medium_physics {
* @return Mass inverse component [\f$ \kappa^{-1} \f$] for pressure wavefield
*/
template <specfem::element::dimension_tag DimensionTag, bool UseSIMD>
KOKKOS_FUNCTION specfem::point::mass_inverse<
DimensionTag, specfem::element::medium_tag::acoustic, UseSIMD>
KOKKOS_FUNCTION specfem::point::mass_inverse<specfem::tags::Tags<
DimensionTag, specfem::element::medium_tag::acoustic, UseSIMD> >
impl_mass_matrix_component(
const specfem::point::properties<
DimensionTag, specfem::element::medium_tag::acoustic,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

template <specfem::element::dimension_tag DimensionTag, bool UseSIMD>
KOKKOS_FUNCTION specfem::point::mass_inverse<
DimensionTag, specfem::element::medium_tag::acoustic, UseSIMD>
specfem::tags::Tags<DimensionTag, specfem::element::medium_tag::acoustic, UseSIMD>>
specfem::medium_physics::impl_mass_matrix_component(
const specfem::point::properties<
DimensionTag, specfem::element::medium_tag::acoustic,
Expand Down
7 changes: 3 additions & 4 deletions core/specfem/medium/dim2/acoustic/isotropic/source.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,9 @@ KOKKOS_INLINE_FUNCTION auto impl_compute_source_contribution(

constexpr bool using_simd = PointPropertiesType::simd::using_simd;

using PointAccelerationType =
specfem::point::acceleration<specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::acoustic,
using_simd>;
using PointAccelerationType = specfem::point::acceleration<
specfem::tags::Tags<specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::acoustic, using_simd> >;

PointAccelerationType result;

Expand Down
12 changes: 6 additions & 6 deletions core/specfem/medium/dim2/elastic/anisotropic/source.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ KOKKOS_INLINE_FUNCTION auto impl_compute_source_contribution(
constexpr bool using_simd = PointPropertiesType::simd::using_simd;

using PointAccelerationType =
specfem::point::acceleration<specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::elastic_psv,
using_simd>;
specfem::point::acceleration<specfem::tags::Tags<
specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::elastic_psv, using_simd> >;

PointAccelerationType result;

Expand Down Expand Up @@ -92,9 +92,9 @@ KOKKOS_INLINE_FUNCTION auto impl_compute_source_contribution(
constexpr bool using_simd = PointPropertiesType::simd::using_simd;

using PointAccelerationType =
specfem::point::acceleration<specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::elastic_sh,
using_simd>;
specfem::point::acceleration<specfem::tags::Tags<
specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::elastic_sh, using_simd> >;

PointAccelerationType result;

Expand Down
12 changes: 6 additions & 6 deletions core/specfem/medium/dim2/elastic/isotropic/mass_matrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ namespace medium_physics {
* @param properties Material properties (density)
* @return Mass inverse components [ρ, ρ] for [u_x, u_z]
*/
template <bool UseSIMD, specfem::element::property_tag PropertyTag>
template <specfem::element::property_tag PropertyTag, bool UseSIMD>
KOKKOS_FUNCTION specfem::point::mass_inverse<
specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::elastic_psv, UseSIMD>
specfem::tags::Tags<specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::elastic_psv, UseSIMD> >
impl_mass_matrix_component(
const specfem::point::properties<specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::elastic_psv,
Expand All @@ -53,10 +53,10 @@ impl_mass_matrix_component(
* @param properties Material properties (density)
* @return Mass inverse component [ρ] for [u_y]
*/
template <bool UseSIMD, specfem::element::property_tag PropertyTag>
template <specfem::element::property_tag PropertyTag, bool UseSIMD>
KOKKOS_FUNCTION specfem::point::mass_inverse<
specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::elastic_sh, UseSIMD>
specfem::tags::Tags<specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::elastic_sh, UseSIMD> >
impl_mass_matrix_component(
const specfem::point::properties<specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::elastic_sh,
Expand Down
12 changes: 6 additions & 6 deletions core/specfem/medium/dim2/elastic/isotropic/mass_matrix.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

#include "mass_matrix.hpp"

template <bool UseSIMD, specfem::element::property_tag PropertyTag>
template <specfem::element::property_tag PropertyTag, bool UseSIMD>
KOKKOS_FUNCTION specfem::point::mass_inverse<
specfem::element::dimension_tag::dim2, specfem::element::medium_tag::elastic_psv,
UseSIMD>
specfem::tags::Tags<specfem::element::dimension_tag::dim2, specfem::element::medium_tag::elastic_psv,
UseSIMD>>
specfem::medium_physics::impl_mass_matrix_component(
const specfem::point::properties<specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::elastic_psv,
Expand All @@ -14,10 +14,10 @@ specfem::medium_physics::impl_mass_matrix_component(
return { properties.rho(), properties.rho() };
}

template <bool UseSIMD, specfem::element::property_tag PropertyTag>
template <specfem::element::property_tag PropertyTag, bool UseSIMD>
KOKKOS_FUNCTION specfem::point::mass_inverse<
specfem::element::dimension_tag::dim2, specfem::element::medium_tag::elastic_sh,
UseSIMD>
specfem::tags::Tags<specfem::element::dimension_tag::dim2, specfem::element::medium_tag::elastic_sh,
UseSIMD>>
specfem::medium_physics::impl_mass_matrix_component(
const specfem::point::properties<specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::elastic_sh,
Expand Down
12 changes: 6 additions & 6 deletions core/specfem/medium/dim2/elastic/isotropic/source.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ KOKKOS_INLINE_FUNCTION auto impl_compute_source_contribution(
constexpr bool using_simd = PointPropertiesType::simd::using_simd;

using PointAccelerationType =
specfem::point::acceleration<specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::elastic_psv,
using_simd>;
specfem::point::acceleration<specfem::tags::Tags<
specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::elastic_psv, using_simd> >;

PointAccelerationType result;

Expand Down Expand Up @@ -91,9 +91,9 @@ KOKKOS_INLINE_FUNCTION auto impl_compute_source_contribution(
constexpr bool using_simd = PointPropertiesType::simd::using_simd;

using PointAccelerationType =
specfem::point::acceleration<specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::elastic_sh,
using_simd>;
specfem::point::acceleration<specfem::tags::Tags<
specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::elastic_sh, using_simd> >;

PointAccelerationType result;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ namespace medium_physics {
*/
template <bool UseSIMD>
KOKKOS_FUNCTION specfem::point::mass_inverse<
specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::elastic_psv_t, UseSIMD>
specfem::tags::Tags<specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::elastic_psv_t, UseSIMD> >
impl_mass_matrix_component(const specfem::point::properties<
specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::elastic_psv_t,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

template <bool UseSIMD>
KOKKOS_FUNCTION
specfem::point::mass_inverse<specfem::element::dimension_tag::dim2,
specfem::point::mass_inverse<specfem::tags::Tags<specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::elastic_psv_t,
UseSIMD>
UseSIMD>>
specfem::medium_physics::impl_mass_matrix_component(
const specfem::point::properties<
specfem::element::dimension_tag::dim2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ KOKKOS_INLINE_FUNCTION auto impl_compute_source_contribution(
constexpr bool using_simd = PointPropertiesType::simd::using_simd;

using PointAccelerationType =
specfem::point::acceleration<specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::elastic_psv_t,
using_simd>;
specfem::point::acceleration<specfem::tags::Tags<
specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::elastic_psv_t, using_simd> >;

PointAccelerationType result;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ namespace medium_physics {
*/
template <bool UseSIMD>
KOKKOS_FUNCTION specfem::point::mass_inverse<
specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::poroelastic, UseSIMD>
specfem::tags::Tags<specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::poroelastic, UseSIMD> >
impl_mass_matrix_component(
const specfem::point::properties<specfem::element::dimension_tag::dim2,
specfem::element::medium_tag::poroelastic,
Expand Down
Loading