Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
ComputeSumOverV.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
18
19#include "shambackends/vec.hpp"
27
28#define NODE_EDGES(X_RO, X_RW) \
29 /* ------------------- inputs ------------------- */ \
30 X_RO(shamrock::solvergraph::Indexes<u32>, sizes) \
31 X_RO(shamrock::solvergraph::IFieldRefs<T>, spans_field) \
32 X_RO(shamrock::solvergraph::ScalarEdge<T>, total_volume) \
33 \
34 /* ------------------- outputs ------------------- */ \
35 X_RW(shamrock::solvergraph::ScalarEdge<T>, mean_val)
36
38
39 template<class T>
40 class NodeComputeSumOverV : public shamrock::solvergraph::INode {
41
42 u32 block_size;
43
44 public:
45 NodeComputeSumOverV(u32 block_size) : block_size(block_size) {}
46
47 EXPAND_NODE_EDGES(NODE_EDGES)
48
50
51 inline virtual std::string _impl_get_label() const { return "NodeComputeSumOverV"; }
52
53 virtual std::string _impl_get_tex() const;
54 };
55
56} // namespace shammodels::basegodunov::modules
57
58#undef NODE_EDGES
std::uint32_t u32
32 bit unsigned integer
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