27 auto edges = get_edges();
30 auto &ghost_layer = edges.ghost_layer;
35 shamalgs::collective::serialize_sparse_comm<PatchDataField<T>>(
36 shamsys::instance::get_compute_scheduler_ptr(),
37 std::move(ghost_layer.patchdata_fields),
40 return rank_owner.get_rank_owner(
id);
44 ser.allocate(pdat.serialize_full_byte_size());
45 pdat.serialize_full(ser);
46 return ser.finalize();
51 shamsys::instance::get_compute_scheduler_ptr(),
57 ghost_layer.patchdata_fields = std::move(recv_dat);
65 std::string tex = R
"tex(
66 Exchange ghost field data between distributed processes
69 {ghost_layer}_{i \rightarrow \underline{j}} = \text{Sparse comm}({ghost_layer}_{\underline{i} \rightarrow j}) \\
70 \text{where } {rank_owner}_{\underline{j}} = \text{MPI world rank} \\
71 \text{and } {rank_owner}_{\underline{i}} = \text{MPI world rank} \\
72 \text{and } i \in [0, N_{\rm patch}] \\
73 \text{and } j \in [0, N_{\rm patch}] \\
75 underlined indices denotes one that currently owned by the local process.
89 #define X(a) template class shamrock::solvergraph::ExchangeGhostField<a>;
90XMAC_LIST_ENABLED_FIELD
Solver graph node for exchanging ghost field data between distributed processes.
std::uint64_t u64
64 bit unsigned integer
static PatchDataField deserialize_full(shamalgs::SerializeHelper &serializer)
deserialize a field inverse of serialize_full
A buffer allocated in USM (Unified Shared Memory).
Container for objects shared between two distributed data elements.
virtual std::string _impl_get_tex() const
Returns the TeX representation for this node.
void _impl_evaluate_internal()
Performs the ghost field data exchange computation.
IEdge & get_rw_edge_base(int slot)
Get a reference to a read write edge and cast it to the type IEdge.
const IEdge & get_ro_edge_base(int slot)
Get a reference to a read only edge.
void replace_all(std::string &inout, std::string_view what, std::string_view with)
replace all occurence of a search string with another