32 grid::shell::allocate_scalar_grid< NodeOwnershipFlag >(
"mask_data_node_ownership", domain );
34 auto tmp_data_for_global_subdomain_indices =
35 grid::shell::allocate_scalar_grid< int64_t >(
"tmp_data_for_global_subdomain_indices", domain );
41 for (
const auto& [subdomain_info, value] : domain.
subdomains() )
43 const auto& [local_subdomain_id, neighborhood] = value;
45 const auto global_subdomain_id = subdomain_info.global_id();
48 "set_global_subdomain_id",
49 Kokkos::MDRangePolicy(
50 { 0, 0, 0 }, { mask_data.extent( 1 ), mask_data.extent( 2 ), mask_data.extent( 3 ) } ),
51 KOKKOS_LAMBDA(
const int x,
const int y,
const int r ) {
52 tmp_data_for_global_subdomain_indices( local_subdomain_id, x, y, r ) = global_subdomain_id;
58 domain, tmp_data_for_global_subdomain_indices, send_buffers, recv_buffers );
64 for (
const auto& [subdomain_info, value] : domain.
subdomains() )
66 const auto& [local_subdomain_id, neighborhood] = value;
68 const auto global_subdomain_id = subdomain_info.global_id();
71 "set_node_owner_flags",
72 Kokkos::MDRangePolicy(
73 { 0, 0, 0 }, { mask_data.extent( 1 ), mask_data.extent( 2 ), mask_data.extent( 3 ) } ),
74 KOKKOS_LAMBDA(
const int x,
const int y,
const int r ) {
75 if ( tmp_data_for_global_subdomain_indices( local_subdomain_id, x, y, r ) == global_subdomain_id )
Send and receive buffers for all process-local subdomain boundaries.
Definition communication.hpp:56
Parallel data structure organizing the thick spherical shell metadata for distributed (MPI parallel) ...
Definition spherical_shell.hpp:2498
const std::map< SubdomainInfo, std::tuple< LocalSubdomainIdx, SubdomainNeighborhood > > & subdomains() const
Definition spherical_shell.hpp:2580
Concept for types that behave like bitmask flags.
Definition bit_masking.hpp:17
void unpack_and_reduce_local_subdomain_boundaries(const grid::shell::DistributedDomain &domain, const GridDataType &data, SubdomainNeighborhoodSendRecvBuffer< typename GridDataType::value_type, grid::grid_data_vec_dim< GridDataType >() > &boundary_recv_buffers, CommunicationReduction reduction=CommunicationReduction::SUM)
Unpacks and reduces local subdomain boundaries.
Definition communication.hpp:672
void pack_send_and_recv_local_subdomain_boundaries(const grid::shell::DistributedDomain &domain, const GridDataType &data, SubdomainNeighborhoodSendRecvBuffer< typename GridDataType::value_type, grid::grid_data_vec_dim< GridDataType >() > &boundary_send_buffers, SubdomainNeighborhoodSendRecvBuffer< typename GridDataType::value_type, grid::grid_data_vec_dim< GridDataType >() > &boundary_recv_buffers)
Packs, sends and recvs local subdomain boundaries using two sets of buffers.
Definition communication.hpp:242
@ MIN
Stores the min of all received values during receive.
Definition bit_masks.hpp:8
Grid4DDataScalar< NodeOwnershipFlag > setup_node_ownership_mask_data(const shell::DistributedDomain &domain)
Set up mask data for a distributed shell domain. The mask encodes ownership information for each grid...
Definition bit_masks.hpp:29
Kokkos::View< ScalarType ****, Layout > Grid4DDataScalar
Definition grid_types.hpp:25
NodeOwnershipFlag
FlagLike enum class that indicates whether a node is owned on a subdomain.
Definition bit_masks.hpp:18