31namespace shamrock::scheduler {
44 std::shared_ptr<PatchDataLayerLayout> pdl_ptr;
50 inline std::shared_ptr<shamrock::patch::PatchDataLayerLayout> get_layout_ptr()
const {
60 inline bool has_patch(
u64 id) {
return owned_data.has_key(
id); }
64 inline void for_each_patchdata(std::function<
void(
u64, PatchData &)> &&f) {
65 owned_data.for_each(std::forward<std::function<
void(
u64, PatchData &)>>(f));
90 void split_patchdata(
u64 key_orginal,
const std::array<shamrock::patch::Patch, 8> patches);
101 const std::shared_ptr<shamrock::patch::PatchDataLayerLayout> &pdl_ptr,
103 : pdl_ptr(pdl_ptr),
sim_box(pdl(), patch_coord_range) {}
function to run load balancing with the hilbert curve
Header file for the patch struct and related function.
std::uint64_t u64
64 bit unsigned integer
Handle the patch list of the mpi scheduler.
Represents a collection of objects distributed across patches identified by a u64 id.
PatchDataLayer container class, the layout is described in patchdata_layout.
Store the information related to the size of the simulation box to convert patch integer coordinates ...
Class to handle PatchData owned by the node.
void merge_patchdata(u64 new_key, const std::array< u64, 8 > old_keys)
merge 8 old patchdata into one
shamrock::patch::SimulationBoxInfo sim_box
simulation box geometry info
void apply_change_list(const shamrock::scheduler::LoadBalancingChangeList &change_list, SchedulerPatchList &patch_list)
apply a load balancing change list to shuffle patchdata arround the cluster
void split_patchdata(u64 key_orginal, const std::array< shamrock::patch::Patch, 8 > patches)
split a patchdata into 8 childs according to the 8 patches in arguments
shambase::DistributedData< PatchData > owned_data
map container for patchdata owned by the current node (layout : id_patch,data)
T & get_check_ref(const std::unique_ptr< T > &ptr, SourceLocation loc=SourceLocation())
Takes a std::unique_ptr and returns a reference to the object it holds. It throws a std::runtime_erro...
Class to handle the patch list of the mpi scheduler.
Patch object that contain generic patch information.