Shamrock
2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
shamrock
include
shamrock
legacy
patch
utility
full_tree_field.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
// plan for a tree that can combine both a radix tree field and a patch tree
12
19
#include "
patch_field.hpp
"
20
21
template
<
class
T,
class
DeviceTree>
22
class
FullTreeField
{
23
public
:
24
using
TreeField_t =
typename
DeviceTree::template
RadixTreeField<T>
;
25
26
legacy::PatchField<T>
patch_field;
27
std::unordered_map<u64, std::unique_ptr<TreeField_t>> patch_tree_fields;
28
29
// inline FullTreeField(
30
// PatchField<T> && pf,
31
// std::unordered_map<u64, std::unique_ptr<TreeField_t>> && ptf) :
32
// patch_field(pf), patch_tree_fields(ptf)
33
//{}
34
35
class
BufferedFullTreeField
{
36
public
:
37
BufferedPField<T>
patch_field;
38
std::unordered_map<u64, std::unique_ptr<TreeField_t>> &patch_tree_fields;
39
};
40
41
inline
BufferedFullTreeField
get_buffers() {
42
return
BufferedFullTreeField
{patch_field.get_buffers(), patch_tree_fields};
43
}
44
};
BufferedPField
Definition
patch_field.hpp:23
FullTreeField::BufferedFullTreeField
Definition
full_tree_field.hpp:35
FullTreeField
Definition
full_tree_field.hpp:22
RadixTreeField
Definition
RadixTreeField.hpp:23
legacy::PatchField
Define a field attached to a patch (example: FMM multipoles, hmax in SPH)
Definition
patch_field.hpp:37
patch_field.hpp
Generated on Wed May 13 2026 13:21:49 for Shamrock by
1.9.8