Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
HilbertLoadBalance.hpp
Go to the documentation of this file.
1// -------------------------------------------------------//
2//
3// SHAMROCK code for hydrodynamics
4// Copyright (c) 2021-2026 Timothée David--Cléris <tim.shamrock@proton.me>
5// SPDX-License-Identifier: CeCILL Free Software License Agreement v2.1
6// Shamrock is licensed under the CeCILL 2.1 License, see LICENSE for more information
7//
8// -------------------------------------------------------//
9
10#pragma once
11
21#include <tuple>
22#include <vector>
23
24namespace shamrock::scheduler {
25
27 struct ChangeOp {
28 u64 patch_id;
29 u64 patch_idx;
30 i32 rank_owner_old;
31 i32 rank_owner_new;
32 i32 tag_comm;
33 };
34
35 std::vector<ChangeOp> change_ops;
36 };
37
42 template<class hilbert_num>
44
46
47 public:
53
63 std::vector<shamrock::patch::Patch> &global_patch_list);
64 };
65
68
69} // namespace shamrock::scheduler
Header file for the patch struct and related function.
std::uint64_t u64
64 bit unsigned integer
std::int32_t i32
32 bit integer
static LoadBalancingChangeList make_change_list(std::vector< shamrock::patch::Patch > &global_patch_list)
generate the change list from the list of patch to run the load balancing
static constexpr u64 max_box_sz
maximal value along an axis for the patch coordinate
hilbert curve implementation from killing J., 2004