Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
ComputeAMRLevel.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
17
18#include "shambackends/vec.hpp"
23
24#define NODE_EDGES(X_RO, X_RW) \
25 /* ------------------- inputs ------------------- */ \
26 X_RO(shamrock::solvergraph::Indexes<u32>, sizes) \
27 X_RO(shamrock::solvergraph::ScalarsEdge<TgridVec>, level0_size) \
28 X_RO(shamrock::solvergraph::IFieldSpan<TgridVec>, block_min) \
29 X_RO(shamrock::solvergraph::IFieldSpan<TgridVec>, block_max) \
30 \
31 /* ------------------- outputs ------------------- */ \
32 X_RW(shamrock::solvergraph::IFieldSpan<TgridUint>, block_level)
33
35
36 template<class TgridVec>
37 class ComputeAMRLevel : public shamrock::solvergraph::INode {
38 using Tgridscal = shambase::VecComponent<TgridVec>;
39 using TgridUint = typename std::make_unsigned<shambase::VecComponent<TgridVec>>::type;
40
41 public:
42 ComputeAMRLevel() {}
43
44 EXPAND_NODE_EDGES(NODE_EDGES)
45
47
48 inline void _impl_reset_internal() {}
49
50 inline virtual std::string _impl_get_label() const { return "ComputeAMRLevel"; }
51
52 virtual std::string _impl_get_tex() const;
53 };
54
55} // namespace shammodels::basegodunov::modules
56
57#undef NODE_EDGES
virtual std::string _impl_get_label() const
get the label of the node
virtual std::string _impl_get_tex() const
get the tex of the node
Inode is node between data edges, takes multiple inputs, multiple outputs.
Definition INode.hpp:30
namespace for the basegodunov model modules