Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
NodeBuildTrees.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
24
26
27 template<class Umorton, class TgridVec>
29
30 u32 reduction_level = 0;
31
33
34 public:
36
43
44 inline void set_edges(
45 std::shared_ptr<shamrock::solvergraph::Indexes<u32>> sizes,
46 std::shared_ptr<shamrock::solvergraph::FieldRefs<TgridVec>> block_min,
47 std::shared_ptr<shamrock::solvergraph::FieldRefs<TgridVec>> block_max,
48 std::shared_ptr<solvergraph::TreeEdge<Umorton, TgridVec>> trees) {
49 __internal_set_ro_edges({sizes, block_min, block_max});
51 }
52
53 inline Edges get_edges() {
54 return Edges{
55 get_ro_edge<shamrock::solvergraph::Indexes<u32>>(0),
57 get_ro_edge<shamrock::solvergraph::FieldRefs<TgridVec>>(2),
58 get_rw_edge<solvergraph::TreeEdge<Umorton, TgridVec>>(0)};
59 }
60
62
63 void _impl_reset_internal() {};
64
65 inline virtual std::string _impl_get_label() const { return "BuildTrees"; };
66
67 virtual std::string _impl_get_tex() const;
68 };
69
70} // namespace shammodels::basegodunov::modules
std::uint32_t u32
32 bit unsigned integer
The radix tree.
Definition RadixTree.hpp:50
virtual std::string _impl_get_tex() const
get the tex of the node
virtual std::string _impl_get_label() const
get the label of the node
Inode is node between data edges, takes multiple inputs, multiple outputs.
Definition INode.hpp:30
T & get_rw_edge(int slot)
Get a read write edge and cast it to the type T.
Definition INode.hpp:86
void __internal_set_rw_edges(std::vector< std::shared_ptr< IEdge > > new_rw_edges)
Set the read write edges.
Definition INode.hpp:181
void __internal_set_ro_edges(std::vector< std::shared_ptr< IEdge > > new_ro_edges)
Set the read only edges.
Definition INode.hpp:171
const T & get_ro_edge(int slot)
Get a read only edge and cast it to the type T.
Definition INode.hpp:80
namespace for the basegodunov model modules