Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
AMRHandler.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
19#include "AMRCell.hpp"
22
23namespace shamrock::amr {
24
25 template<class Tcoord, u32 dim, class AMRModel>
26 class AMRHandler {
27
28 PatchScheduler &sched;
29
30 public:
31 using CellCoord = AMRCellCoord<Tcoord, dim>;
32 static constexpr u32 split_count = CellCoord::splts_count;
33
34 void update_grid() {
35
36 using namespace patch;
37
38 // split
39
40 sched.for_each_patch_data([&](u64 id_patch, Patch cur_p, PatchData &pdat) {
41 sycl::buffer<u32> split_list = AMRModel::get_split_table(pdat, cur_p);
42 });
43
44 // merge
45 }
46 };
47
48} // namespace shamrock::amr
MPI scheduler.
std::uint32_t u32
32 bit unsigned integer
std::uint64_t u64
64 bit unsigned integer
The MPI scheduler.
void for_each_patch_data(Function &&fct)
for each macro for patchadata example usage