SimiLie
Loading...
Searching...
No Matches
codifferential.hpp
1// SPDX-FileCopyrightText: 2024 Baptiste Legouix
2// SPDX-License-Identifier: MIT
3
4#pragma once
5
6#include <array>
7#include <optional>
8#include <utility>
9
10#include <ddc/ddc.hpp>
11
12#include <similie/exterior/hodge_star.hpp>
13#include <similie/misc/domain_contains.hpp>
14#include <similie/misc/macros.hpp>
15#include <similie/misc/specialization.hpp>
16#include <similie/tensor/character.hpp>
17#include <similie/tensor/tensor_impl.hpp>
18
19#include <Kokkos_StdAlgorithms.hpp>
20
21#include "coboundary.hpp"
22#include "cochain.hpp"
23#include "cosimplex.hpp"
24
25
26namespace sil {
27
28namespace exterior {
29
30namespace detail {
31
32template <class T>
33struct CodifferentialType;
34
35template <
36 std::size_t K,
37 class... Tag,
38 class ElementType,
39 class LayoutStridedPolicy1,
40 class LayoutStridedPolicy2,
41 class ExecSpace>
42struct CodifferentialType<
43 Cochain<Chain<Simplex<K, Tag...>, LayoutStridedPolicy1, ExecSpace>,
44 ElementType,
45 LayoutStridedPolicy2>>
46{
47 using type = Cosimplex<Simplex<K - 1, Tag...>, ElementType>;
48};
49
50} // namespace detail
51
52template <misc::Specialization<Cochain> CochainType>
53using codifferential_t = typename detail::CodifferentialType<CochainType>::type;
54
55namespace detail {
56
57template <class TagToRemoveFromCochain, class CochainTag>
58struct CodifferentialIndex;
59
60template <tensor::TensorNatIndex TagToRemoveFromCochain, tensor::TensorNatIndex CochainTag>
61 requires(CochainTag::rank() == 1 && std::is_same_v<TagToRemoveFromCochain, CochainTag>)
62struct CodifferentialIndex<TagToRemoveFromCochain, CochainTag>
63{
65};
66
67template <tensor::TensorNatIndex TagToRemoveFromCochain, tensor::TensorNatIndex Tag>
68struct CodifferentialIndex<
69 TagToRemoveFromCochain,
70 tensor::TensorAntisymmetricIndex<TagToRemoveFromCochain, Tag>>
71{
72 using type = Tag;
73};
74
75template <tensor::TensorNatIndex TagToRemoveFromCochain, tensor::TensorNatIndex... Tag>
76 requires(sizeof...(Tag) > 1)
77struct CodifferentialIndex<
78 TagToRemoveFromCochain,
80{
81 using type = tensor::TensorAntisymmetricIndex<Tag...>;
82};
83
84} // namespace detail
85
86template <class TagToRemoveFromCochain, class CochainTag>
88 typename detail::CodifferentialIndex<TagToRemoveFromCochain, CochainTag>::type;
89
90namespace detail {
91
92template <
93 tensor::TensorNatIndex TagToRemoveFromCochain,
94 tensor::TensorIndex CochainTag,
96struct CodifferentialTensorType;
97
98template <
99 tensor::TensorNatIndex TagToRemoveFromCochain,
100 tensor::TensorIndex CochainIndex,
101 class ElementType,
102 class... DDim,
103 class SupportType,
104 class MemorySpace>
105 requires(ddc::type_seq_contains_v<
106 ddc::detail::TypeSeq<CochainIndex>,
107 ddc::detail::TypeSeq<DDim...>>)
108struct CodifferentialTensorType<
109 TagToRemoveFromCochain,
110 CochainIndex,
111 tensor::Tensor<ElementType, ddc::DiscreteDomain<DDim...>, SupportType, MemorySpace>>
112{
113 using type = tensor::Tensor<
114 ElementType,
115 ddc::replace_dim_of_t<
116 ddc::DiscreteDomain<DDim...>,
117 CochainIndex,
119 SupportType,
120 MemorySpace>;
121};
122
123} // namespace detail
124
125template <
126 tensor::TensorNatIndex TagToRemoveFromCochain,
127 tensor::TensorIndex CochainTag,
129using codifferential_tensor_t = typename detail::
130 CodifferentialTensorType<TagToRemoveFromCochain, CochainTag, TensorType>::type;
131
132namespace detail {
133
134template <std::size_t I, class T>
135struct CodifferentialHodgeOutputIndex : tensor::uncharacterize_t<T>
136{
137};
138
139template <class Ids, class T>
140struct CodifferentialHodgeOutputIndexSeq_;
141
142template <std::size_t... Id, class T>
143struct CodifferentialHodgeOutputIndexSeq_<std::index_sequence<Id...>, T>
144{
145 using type = ddc::detail::TypeSeq<tensor::Covariant<CodifferentialHodgeOutputIndex<Id, T>>...>;
146};
147
148template <std::size_t EndId, class T>
149struct CodifferentialHodgeOutputIndexSeq;
150
151template <std::size_t EndId, class T>
152 requires(EndId == 0)
153struct CodifferentialHodgeOutputIndexSeq<EndId, T>
154{
155 using type = ddc::detail::TypeSeq<>;
156};
157
158template <std::size_t EndId, class T>
159 requires(EndId > 0)
160struct CodifferentialHodgeOutputIndexSeq<EndId, T>
161{
162 using type =
163 typename CodifferentialHodgeOutputIndexSeq_<std::make_index_sequence<EndId>, T>::type;
164};
165
166} // namespace detail
167
168template <std::size_t EndId, class T>
170 typename detail::CodifferentialHodgeOutputIndexSeq<EndId, T>::type;
171
172template <class... Args>
174
175template <
176 tensor::TensorIndex MetricIndex,
177 tensor::TensorNatIndex TagToRemoveFromCochain,
178 tensor::TensorIndex CochainTag,
183 MetricIndex,
184 TagToRemoveFromCochain,
185 CochainTag,
186 TensorType,
187 MetricType,
188 PositionType>
189{
190 KOKKOS_FUNCTION static void run(
191 auto codifferential_tensor,
192 TensorType tensor,
193 MetricType metric,
194 PositionType position,
195 auto chain,
196 auto lower_chain,
197 typename TensorType::non_indices_domain_t::discrete_element_type elem)
198 {
199 using source_hodge_input_indices
201 using source_hodge_output_indices = codifferential_hodge_output_indices_t<
202 TagToRemoveFromCochain::size() - CochainTag::rank(),
203 TagToRemoveFromCochain>;
204 using target_hodge_input_indices = ddc::type_seq_merge_t<
205 ddc::detail::TypeSeq<TagToRemoveFromCochain>,
206 source_hodge_output_indices>;
207 using dual_tensor_index = misc::convert_type_seq_to_t<
209 source_hodge_output_indices>;
210 using dual_codifferential_index = misc::
211 convert_type_seq_to_t<tensor::TensorAntisymmetricIndex, target_hodge_input_indices>;
213 dual_codifferential_accessor;
214
215 std::array<double, dual_codifferential_index::access_size()> dual_codifferential_alloc {};
216 ddc::ChunkSpan<
217 double,
218 ddc::DiscreteDomain<dual_codifferential_index>,
219 Kokkos::layout_right,
220 typename TensorType::memory_space>
221 dual_codifferential_span(
222 dual_codifferential_alloc.data(),
223 dual_codifferential_accessor.domain());
224
225 sil::tensor::Tensor dual_codifferential(dual_codifferential_span);
226
227 auto dual_evaluator = [&](auto sampled_elem, auto dual_elem) {
228 if (!misc::domain_contains(tensor.non_indices_domain(), sampled_elem)) {
229 return 0.0;
230 }
231 [[maybe_unused]] tensor::TensorAccessor<dual_tensor_index> dual_tensor_accessor;
232 std::array<double, dual_tensor_index::access_size()> dual_tensor_alloc {};
233 ddc::ChunkSpan<
234 double,
235 ddc::DiscreteDomain<dual_tensor_index>,
236 Kokkos::layout_right,
237 typename TensorType::memory_space>
238 dual_tensor_span(dual_tensor_alloc.data(), dual_tensor_accessor.domain());
239 sil::tensor::Tensor dual_tensor(dual_tensor_span);
240
243 source_hodge_input_indices,
244 source_hodge_output_indices,
245 MetricType,
246 PositionType,
247 typename TensorType::non_indices_domain_t::discrete_element_type>::
248 run(dual_tensor, tensor[sampled_elem], metric, position, sampled_elem);
249 return dual_tensor.mem(dual_elem);
250 };
251
253 run(dual_codifferential, dual_evaluator, chain, lower_chain, elem);
254
258 ddc::type_seq_remove_t<
260 ddc::detail::TypeSeq<TagToRemoveFromCochain>>,
261 MetricType,
262 PositionType,
263 typename TensorType::non_indices_domain_t::discrete_element_type>::
264 run(codifferential_tensor, dual_codifferential, metric, position, elem);
265 if constexpr ((TagToRemoveFromCochain::size() * (CochainTag::rank() + 1) + 1) % 2 == 1) {
266 codifferential_tensor *= -1;
267 }
268 }
269};
270
271template <
272 tensor::TensorIndex MetricIndex,
273 tensor::TensorNatIndex TagToRemoveFromCochain,
274 tensor::TensorIndex CochainTag,
278 class ExecSpace>
280{
281 using CodifferentialTensorType
283 using MemorySpace = typename TensorType::memory_space;
284 using AllocatorType = ddc::KokkosAllocator<double, MemorySpace>;
285 using SourceHodgeInputIndices
287 using SourceHodgeOutputIndices = codifferential_hodge_output_indices_t<
288 TagToRemoveFromCochain::size() - CochainTag::rank(),
289 TagToRemoveFromCochain>;
290 using TargetHodgeInputIndices = ddc::type_seq_merge_t<
291 ddc::detail::TypeSeq<TagToRemoveFromCochain>,
292 SourceHodgeOutputIndices>;
293 using TargetHodgeOutputIndices = ddc::type_seq_remove_t<
295 ddc::detail::TypeSeq<TagToRemoveFromCochain>>;
296 using DualTensorIndex = misc::
297 convert_type_seq_to_t<tensor::TensorAntisymmetricIndex, SourceHodgeOutputIndices>;
298 using DualCodifferentialIndex = misc::
299 convert_type_seq_to_t<tensor::TensorAntisymmetricIndex, TargetHodgeInputIndices>;
300 using NonSpectatorDimensions = typename detail::NonSpectatorDimension<
301 TagToRemoveFromCochain,
302 typename TensorType::non_indices_domain_t>::type;
304 std::declval<ExecSpace const&>()));
306 std::declval<ExecSpace const&>()));
307
308 using HodgeStarDomainType = ddc::cartesian_prod_t<
309 typename MetricType::non_indices_domain_t,
311 using DualHodgeStarDomainType = ddc::cartesian_prod_t<
312 typename MetricType::non_indices_domain_t,
315 TargetHodgeOutputIndices>>;
316 using DualTensorDomainType = ddc::cartesian_prod_t<
317 typename TensorType::non_indices_domain_t,
318 ddc::DiscreteDomain<DualTensorIndex>>;
319
320 using HodgeStarAllocType = ddc::Chunk<double, HodgeStarDomainType, AllocatorType>;
321 using DualHodgeStarAllocType = ddc::Chunk<double, DualHodgeStarDomainType, AllocatorType>;
322 using DualTensorAllocType = ddc::Chunk<double, DualTensorDomainType, AllocatorType>;
323
324 using HodgeStarTensorType
326 using DualHodgeStarTensorType
328 using DualTensorType
330
331 ExecSpace m_exec_space;
332 std::optional<HodgeStarAllocType> m_hodge_star_alloc;
333 std::optional<DualHodgeStarAllocType> m_dual_hodge_star_alloc;
334 std::optional<DualTensorAllocType> m_dual_tensor_alloc;
335 std::optional<HodgeStarTensorType> m_hodge_star;
336 std::optional<DualHodgeStarTensorType> m_dual_hodge_star;
337 std::optional<DualTensorType> m_dual_tensor_buffer;
338 ChainType m_chain;
339 LowerChainType m_lower_chain;
340
341public:
343 ExecSpace const& exec_space,
344 HodgeStarTensorType&& hodge_star,
345 DualHodgeStarTensorType&& dual_hodge_star,
346 DualTensorType&& dual_tensor_buffer)
347 : m_exec_space(exec_space)
348 , m_hodge_star(std::move(hodge_star))
349 , m_dual_hodge_star(std::move(dual_hodge_star))
350 , m_dual_tensor_buffer(std::move(dual_tensor_buffer))
351 , m_chain(tangent_basis<DualTensorIndex::rank() + 1, NonSpectatorDimensions>(exec_space))
352 , m_lower_chain(tangent_basis<DualTensorIndex::rank(), NonSpectatorDimensions>(exec_space))
353 {
354 }
355
357 ExecSpace const& exec_space,
358 TensorType tensor,
359 MetricType metric,
360 PositionType position)
361 : m_exec_space(exec_space)
362 , m_chain(tangent_basis<DualTensorIndex::rank() + 1, NonSpectatorDimensions>(exec_space))
363 , m_lower_chain(tangent_basis<DualTensorIndex::rank(), NonSpectatorDimensions>(exec_space))
364 {
367 hodge_star_accessor;
370 TargetHodgeOutputIndices>> dual_hodge_star_accessor;
371 [[maybe_unused]] tensor::TensorAccessor<DualTensorIndex> dual_tensor_accessor;
372
373 m_hodge_star_alloc.emplace(
374 HodgeStarDomainType(metric.non_indices_domain(), hodge_star_accessor.domain()),
375 AllocatorType());
376 m_dual_hodge_star_alloc.emplace(
377 DualHodgeStarDomainType(
378 metric.non_indices_domain(),
379 dual_hodge_star_accessor.domain()),
380 AllocatorType());
381 m_dual_tensor_alloc.emplace(
382 DualTensorDomainType(tensor.non_indices_domain(), dual_tensor_accessor.domain()),
383 AllocatorType());
384
385 m_hodge_star.emplace(*m_hodge_star_alloc);
386 m_dual_hodge_star.emplace(*m_dual_hodge_star_alloc);
387 m_dual_tensor_buffer.emplace(*m_dual_tensor_alloc);
388
390 SourceHodgeInputIndices,
391 SourceHodgeOutputIndices>(exec_space, *m_hodge_star, metric, position);
394 TargetHodgeOutputIndices>(exec_space, *m_dual_hodge_star, metric, position);
395 }
396
397 CodifferentialTensorType run(CodifferentialTensorType codifferential_tensor, TensorType tensor)
398 const
399 {
400 auto exec_space = m_exec_space;
401 auto hodge_star = *m_hodge_star;
402 auto dual_hodge_star = *m_dual_hodge_star;
403 auto dual_tensor_buffer = *m_dual_tensor_buffer;
404 auto chain = m_chain;
405 auto lower_chain = m_lower_chain;
406
407 SIMILIE_DEBUG_LOG("similie_apply_first_hodge_star_for_codifferential");
408 ddc::parallel_for_each(
409 "similie_apply_first_hodge_star_for_codifferential",
410 exec_space,
411 dual_tensor_buffer.non_indices_domain(),
412 KOKKOS_LAMBDA(
413 typename TensorType::non_indices_domain_t::discrete_element_type elem) {
415 tensor_prod(dual_tensor_buffer[elem], tensor[elem], hodge_star[elem]);
416 });
417
418 SIMILIE_DEBUG_LOG("similie_apply_second_hodge_star_for_codifferential");
419 ddc::parallel_for_each(
420 "similie_apply_second_hodge_star_for_codifferential",
421 exec_space,
422 codifferential_tensor.non_indices_domain(),
423 KOKKOS_LAMBDA(
424 typename TensorType::non_indices_domain_t::discrete_element_type elem) {
426 dual_codifferential_accessor;
427 std::array<double, DualCodifferentialIndex::access_size()>
428 dual_codifferential_alloc {};
429 ddc::ChunkSpan<
430 double,
431 ddc::DiscreteDomain<DualCodifferentialIndex>,
432 Kokkos::layout_right,
433 typename TensorType::memory_space>
434 dual_codifferential_span(
435 dual_codifferential_alloc.data(),
436 dual_codifferential_accessor.domain());
437 sil::tensor::Tensor dual_codifferential(dual_codifferential_span);
438
439 TransposedCoboundary<TagToRemoveFromCochain, DualTensorIndex>::run(
440 dual_codifferential,
441 [&](auto sampled_elem, auto dual_elem) {
443 dual_tensor_buffer.non_indices_domain(),
444 sampled_elem)) {
445 return 0.0;
446 }
447 return dual_tensor_buffer.mem(sampled_elem, dual_elem);
448 },
449 chain,
450 lower_chain,
451 elem);
452
454 codifferential_tensor[elem],
455 dual_codifferential,
456 dual_hodge_star[elem]);
457 if constexpr (
458 (TagToRemoveFromCochain::size() * (CochainTag::rank() + 1) + 1) % 2
459 == 1) {
460 codifferential_tensor[elem] *= -1;
461 }
462 });
463
464 return codifferential_tensor;
465 }
466};
467
468template <
469 tensor::TensorIndex MetricIndex,
470 tensor::TensorNatIndex TagToRemoveFromCochain,
471 tensor::TensorIndex CochainTag,
472 class ExecSpace,
473 misc::Specialization<tensor::Tensor> TensorType,
474 misc::Specialization<tensor::Tensor> MetricType,
475 misc::Specialization<tensor::Tensor> PositionType>
476StagedCodifferential<
477 MetricIndex,
478 TagToRemoveFromCochain,
479 CochainTag,
480 TensorType,
481 MetricType,
482 PositionType,
483 ExecSpace>
485 ExecSpace const& exec_space,
486 TensorType tensor,
487 MetricType metric,
488 PositionType position)
489{
491 MetricIndex,
492 TagToRemoveFromCochain,
493 CochainTag,
494 TensorType,
495 MetricType,
496 PositionType,
497 ExecSpace>(exec_space, tensor, metric, position);
498}
499
500template <
501 tensor::TensorIndex MetricIndex,
502 tensor::TensorNatIndex TagToRemoveFromCochain,
503 tensor::TensorIndex CochainTag,
507 misc::Specialization<tensor::Tensor> DualHodgeStarType,
508 class ExecSpace>
510 ExecSpace const& exec_space,
512 codifferential_tensor,
513 TensorType tensor,
514 HodgeStarType hodge_star,
515 DualHodgeStarType dual_hodge_star,
516 DualTensorType dual_tensor_buffer)
517{
519 using source_hodge_output_indices = codifferential_hodge_output_indices_t<
520 TagToRemoveFromCochain::size() - CochainTag::rank(),
521 TagToRemoveFromCochain>;
522 using dual_tensor_index = misc::
523 convert_type_seq_to_t<tensor::TensorAntisymmetricIndex, source_hodge_output_indices>;
524 using target_hodge_input_indices = ddc::type_seq_merge_t<
525 ddc::detail::TypeSeq<TagToRemoveFromCochain>,
526 source_hodge_output_indices>;
527 using dual_codifferential_index = misc::
528 convert_type_seq_to_t<tensor::TensorAntisymmetricIndex, target_hodge_input_indices>;
529 using non_spectator_dimensions = typename detail::NonSpectatorDimension<
530 TagToRemoveFromCochain,
531 typename TensorType::non_indices_domain_t>::type;
533 auto lower_chain
535
536 SIMILIE_DEBUG_LOG("similie_apply_first_hodge_star_for_codifferential");
537 ddc::parallel_for_each(
538 "similie_apply_first_hodge_star_for_codifferential",
539 exec_space,
540 dual_tensor_buffer.non_indices_domain(),
541 KOKKOS_LAMBDA(typename TensorType::non_indices_domain_t::discrete_element_type elem) {
542 sil::tensor::tensor_prod(dual_tensor_buffer[elem], tensor[elem], hodge_star[elem]);
543 });
544
545 SIMILIE_DEBUG_LOG("similie_apply_second_hodge_star_for_codifferential");
546 ddc::parallel_for_each(
547 "similie_apply_second_hodge_star_for_codifferential",
548 exec_space,
549 codifferential_tensor.non_indices_domain(),
550 KOKKOS_LAMBDA(typename TensorType::non_indices_domain_t::discrete_element_type elem) {
552 dual_codifferential_accessor;
553 std::array<double, dual_codifferential_index::access_size()>
554 dual_codifferential_alloc {};
555 ddc::ChunkSpan<
556 double,
557 ddc::DiscreteDomain<dual_codifferential_index>,
558 Kokkos::layout_right,
559 typename TensorType::memory_space>
560 dual_codifferential_span(
561 dual_codifferential_alloc.data(),
562 dual_codifferential_accessor.domain());
563 sil::tensor::Tensor dual_codifferential(dual_codifferential_span);
564
566 dual_codifferential,
567 [&](auto sampled_elem, auto dual_elem) {
569 dual_tensor_buffer.non_indices_domain(),
570 sampled_elem)) {
571 return 0.0;
572 }
573 return dual_tensor_buffer.mem(sampled_elem, dual_elem);
574 },
575 chain,
576 lower_chain,
577 elem);
578
580 codifferential_tensor[elem],
581 dual_codifferential,
582 dual_hodge_star[elem]);
583 if constexpr (
584 (TagToRemoveFromCochain::size() * (CochainTag::rank() + 1) + 1) % 2 == 1) {
585 codifferential_tensor[elem] *= -1;
586 }
587 });
588
589 return codifferential_tensor;
590}
591
592template <
593 tensor::TensorIndex MetricIndex,
594 tensor::TensorNatIndex TagToRemoveFromCochain,
595 tensor::TensorIndex CochainTag,
599 class ExecSpace>
601 ExecSpace const& exec_space,
603 codifferential_tensor,
604 TensorType tensor,
605 MetricType metric,
606 PositionType position)
607{
610 MetricIndex,
611 TagToRemoveFromCochain,
612 CochainTag>(exec_space, tensor, metric, position)
613 .run(codifferential_tensor, tensor);
614}
615
616} // namespace exterior
617
618} // namespace sil
CodifferentialTensorType run(CodifferentialTensorType codifferential_tensor, TensorType tensor) const
StagedCodifferential(ExecSpace const &exec_space, HodgeStarTensorType &&hodge_star, DualHodgeStarTensorType &&dual_hodge_star, DualTensorType &&dual_tensor_buffer)
static constexpr discrete_domain_type domain()
constexpr auto tangent_basis(ExecSpace const &exec_space)
Cochain(ChainType, TensorType) -> Cochain< ChainType, typename TensorType::value_type, ddc::detail::mdspan_to_kokkos_layout_t< typename TensorType::layout_type > >
Simplex(ddc::DiscreteElement< Tag... >, ddc::DiscreteVector< T... >) -> Simplex< sizeof...(T), Tag... >
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
typename detail:: CodifferentialTensorType< TagToRemoveFromCochain, CochainTag, TensorType >::type codifferential_tensor_t
Chain(Head, Tail...) -> Chain< typename Head::value_type, typename Head::array_layout, typename Head::memory_space >
StagedCodifferential< MetricIndex, TagToRemoveFromCochain, CochainTag, TensorType, MetricType, PositionType, ExecSpace > make_staged_codifferential(ExecSpace const &exec_space, TensorType tensor, MetricType metric, PositionType position)
HodgeStarType fill_discrete_hodge_star(ExecSpace const &exec_space, HodgeStarType hodge_star, MetricType metric, PositionType position)
codifferential_tensor_t< TagToRemoveFromCochain, CochainTag, TensorType > codifferential(ExecSpace const &exec_space, codifferential_tensor_t< TagToRemoveFromCochain, CochainTag, TensorType > codifferential_tensor, TensorType tensor, HodgeStarType hodge_star, DualHodgeStarType dual_hodge_star, DualTensorType dual_tensor_buffer)
typename detail::CodifferentialIndex< TagToRemoveFromCochain, CochainTag >::type codifferential_index_t
typename detail::CodifferentialHodgeOutputIndexSeq< EndId, T >::type codifferential_hodge_output_indices_t
typename detail::CodifferentialType< CochainType >::type codifferential_t
KOKKOS_FUNCTION bool domain_contains(ddc::DiscreteDomain< DDim... > dom, ddc::DiscreteElement< ODDim... > elem)
typename detail::ConvertTypeSeqTo< T, Seq >::type convert_type_seq_to_t
Tensor(ddc::Chunk< ElementType, SupportType, Allocator >) -> Tensor< ElementType, SupportType, Kokkos::layout_right, typename Allocator::memory_space >
detail::Upper< T >::type upper_t
Tensor< ElementType, ddc::DiscreteDomain< ProdDDim... >, LayoutStridedPolicy, MemorySpace > tensor_prod(Tensor< ElementType, ddc::DiscreteDomain< ProdDDim... >, LayoutStridedPolicy, MemorySpace > prod_tensor, Tensor< ElementType, ddc::DiscreteDomain< DDim1... >, LayoutStridedPolicy, MemorySpace > tensor1, Tensor< ElementType, ddc::DiscreteDomain< DDim2... >, LayoutStridedPolicy, MemorySpace > tensor2)
detail::Uncharacterize< Index >::type uncharacterize_t
detail::Lower< T >::type lower_t
Definition character.hpp:80
bool constexpr is_covariant_v
detail::TensorAccessorForDomain< Dom >::type tensor_accessor_for_domain_t
The top-level namespace of SimiLie.
Definition csr.hpp:15
static KOKKOS_FUNCTION void run(auto codifferential_tensor, TensorType tensor, MetricType metric, PositionType position, auto chain, auto lower_chain, typename TensorType::non_indices_domain_t::discrete_element_type elem)