50 ExecSpace
const& exec_space,
51 HodgeStarType hodge_star,
52 MetricDeterminantType metric_determinant,
53 MetricProdType metric_prod)
57 ddc::type_seq_merge_t<tensor::primes<tensor::lower_t<Indices1>>, Indices2>>>
61 ddc::type_seq_merge_t<tensor::primes<tensor::lower_t<Indices1>>, Indices2>>>
62 levi_civita_dom(levi_civita_accessor.domain());
63 ddc::Chunk levi_civita_alloc(
67 typename ExecSpace::memory_space>());
70 SIMILIE_DEBUG_LOG(
"similie_compute_hodge_star");
71 ddc::parallel_for_each(
72 "similie_compute_hodge_star",
74 hodge_star.non_indices_domain(),
76 typename HodgeStarType::non_indices_domain_t::discrete_element_type elem) {
77 tensor_prod(hodge_star[elem], metric_prod[elem], levi_civita);
78 hodge_star[elem] *= Kokkos::sqrt(Kokkos::abs(metric_determinant(elem)))
92 ExecSpace
const& exec_space,
93 HodgeStarType hodge_star,
97 ddc::to_type_seq_t<typename MetricIndex::subindices_domain_t>>);
99 ddc::to_type_seq_t<typename MetricType::accessor_t::natural_domain_t>>);
104 ddc::Chunk metric_det_alloc(
105 metric.non_indices_domain(),
106 ddc::KokkosAllocator<double, typename ExecSpace::memory_space>());
107 ddc::ChunkSpan metric_det(metric_det_alloc);
109 ddc::Chunk buffer_alloc(
110 ddc::cartesian_prod_t<
111 typename MetricType::non_indices_domain_t,
115 metric.non_indices_domain(),
119 ddc::KokkosAllocator<double, typename ExecSpace::memory_space>());
120 ddc::ChunkSpan buffer(buffer_alloc);
122 SIMILIE_DEBUG_LOG(
"similie_compute_metric_determinant");
123 ddc::parallel_for_each(
124 "similie_compute_metric_determinant",
126 metric.non_indices_domain(),
127 KOKKOS_LAMBDA(
typename MetricType::non_indices_domain_t::discrete_element_type elem) {
128 ddc::device_for_each(
132 [&](ddc::DiscreteElement<
135 buffer(elem, index) = metric.get(metric.access_element(
145 metric_prod_accessor;
146 ddc::Chunk metric_prod_alloc(
147 ddc::cartesian_prod_t<
148 typename MetricType::non_indices_domain_t,
150 metric.non_indices_domain(),
151 metric_prod_accessor.domain()),
152 ddc::KokkosAllocator<double, typename ExecSpace::memory_space>());
ddc::detail::convert_type_seq_to_discrete_domain_t< ddc::type_seq_merge_t< ddc::detail::TypeSeq< misc::convert_type_seq_to_t< tensor::TensorFullIndex, Indices1 > >, std::conditional_t<(ddc::type_seq_size_v< Indices2 >==0), ddc::detail::TypeSeq<>, ddc::detail::TypeSeq< misc::convert_type_seq_to_t< tensor::TensorAntisymmetricIndex, Indices2 > > > > > hodge_star_domain_t
Tensor(ddc::Chunk< ElementType, SupportType, Allocator >) -> Tensor< ElementType, SupportType, Kokkos::layout_right, typename Allocator::memory_space >