Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
NodeLinCombThreeVectors.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
21
22#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::IFieldSpan<T>, spans_x) \
32 X_RO(shamrock::solvergraph::IFieldSpan<T>, spans_y) \
33 X_RO(shamrock::solvergraph::IDataEdge<Tscal>, alpha_0) \
34 X_RO(shamrock::solvergraph::IDataEdge<Tscal>, alpha_1) \
35 X_RO(shamrock::solvergraph::IDataEdge<Tscal>, alpha_2) \
36 \
37 /* ------------------- outputs ------------------- */ \
38 X_RW(shamrock::solvergraph::IFieldSpan<T>, spans_z)
39
40namespace shamrock::solvergraph {
41
51 template<class T>
52 class NodeLinCombThreeVectors : public shamrock::solvergraph::INode {
53 using Tscal = shambase::VecComponent<T>;
54
55 u32 nvar;
56
57 public:
58 NodeLinCombThreeVectors(u32 nvar) : nvar(nvar) {}
59
60 EXPAND_NODE_EDGES(NODE_EDGES)
61
63
64 inline virtual std::string _impl_get_label() const { return "NodeLinCombThreeVectors"; }
65
66 virtual std::string _impl_get_tex() const;
67 };
68
69} // namespace shamrock::solvergraph
70
71#undef NODE_EDGES
std::uint32_t u32
32 bit unsigned integer
Inode is node between data edges, takes multiple inputs, multiple outputs.
Definition INode.hpp:31
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