6#include "connectivity_details.hpp"
7#include "ddc_aliases.hpp"
8#include "multipatch_type.hpp"
16template <
class... Interfaces>
25 = strip_outside_edges_t<
typename Interfaces::Edge1...,
typename Interfaces::Edge2...>;
31 ddc::type_seq_size_v<inner_edges> == 4 * ddc::type_seq_size_v<all_patches>,
32 "Missing edges. There should be 4 edges for each patch.");
39 template <
class QueryPatch>
47 template <
class QueryPatch>
56 template <
class QueryPatch1,
class QueryPatch2>
66 template <
class Gr
id1D>
68 find_patch_t<Grid1D, all_patches>,
81 template <
class Grid1D,
class... IdxRanges>
84 using StartPatch = find_patch_t<Grid1D, all_patches>;
85 using RelevantGrids = collect_grids_on_dim_t<StartPatch, Grid1D, interface_collection>;
86 static_assert(ddc::type_seq_size_v<RelevantGrids> > 0);
87 return get_idx_range<RelevantGrids>(
89 std::make_index_sequence<ddc::type_seq_size_v<RelevantGrids>> {});
101 template <
class Gr
id1D,
template <
typename P>
typename T,
class... Patches>
104 static_assert(ddc::type_seq_same_v<
all_patches, ddc::detail::TypeSeq<Patches...>>);
105 return get_all_idx_ranges_along_direction<Grid1D>(all_idx_ranges.
get_tuple());
110 template <
class RelevantGrids,
class IdxRangeTuple, std::size_t... PatchIndex>
111 static auto get_idx_range(IdxRangeTuple all_idx_ranges, std::index_sequence<PatchIndex...>)
113 return std::make_tuple(
114 get_idx_range<PatchIndex, RelevantGrids, IdxRangeTuple>(all_idx_ranges)...);
118 template <std::
size_t PatchIndex,
class RelevantGr
ids,
class IdxRangeTuple>
119 static auto get_idx_range(IdxRangeTuple all_idx_ranges)
121 using GridToLocate = ddc::type_seq_element_t<PatchIndex, RelevantGrids>;
122 using GridLocation = find_relevant_idx_range_t<GridToLocate, IdxRangeTuple>;
123 return ddc::select<GridToLocate>(std::get<GridLocation>(all_idx_ranges));
A helper class which provides functionalities to recognise how different patches are connected.
Definition connectivity.hpp:18
to_tuple_t< get_type_seq_connections_t< QueryPatch > > get_connections_t
A tool to find a tuple of all interfaces of a patch.
Definition connectivity.hpp:48
extract_patches_t< inner_edges > all_patches
A type sequence of all the patches handled by this class.
Definition connectivity.hpp:28
ddcHelper::type_seq_intersection_t< get_type_seq_connections_t< QueryPatch1 >, get_type_seq_connections_t< QueryPatch2 > > find_connections_t
A tool to find all interfaces linking 2 patches.
Definition connectivity.hpp:59
interfaces_of_patch_t< QueryPatch, interface_collection > get_type_seq_connections_t
A tool to find a type sequence of all interfaces of a patch.
Definition connectivity.hpp:40
strip_outside_edges_t< typename Interfaces::Edge1..., typename Interfaces::Edge2... > inner_edges
A type sequence of all the edges handled by this class except the OuterEdge types.
Definition connectivity.hpp:25
collect_interfaces_on_dim_t< find_patch_t< Grid1D, all_patches >, Grid1D, interface_collection > get_all_interfaces_along_direction_t
A tool to find all interfaces along a line which passes through the requested grid.
Definition connectivity.hpp:70
static auto get_all_idx_ranges_along_direction(MultipatchType< T, Patches... > all_idx_ranges)
A function to return all index ranges which can be used to obtain coordinates along a line which pass...
Definition connectivity.hpp:102
ddc::detail::TypeSeq< Interfaces... > interface_collection
A type sequence of all the interfaces handled by this class.
Definition connectivity.hpp:21
static auto get_all_idx_ranges_along_direction(std::tuple< IdxRanges... > all_idx_ranges)
A function to return all index ranges which can be used to obtain coordinates along a line which pass...
Definition connectivity.hpp:82
A class to store several objects that are of a type which is templated by the patch.
Definition multipatch_type.hpp:32
KOKKOS_FUNCTION std::tuple< T< Patches >... > const & get_tuple() const
Get a constant reference to the tuple of objects stored inside this MultipatchType.
Definition multipatch_type.hpp:141
A class which describes the real space in the temporal direction.
Definition geometry.hpp:44