Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
NodeUpdateDerivsMonofluidTVI.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"
25
26#define NODE_EDGES(X_RO, X_RW) \
27 /* ------------------- inputs ------------------- */ \
28 /* scalars */ \
29 X_RO(shamrock::solvergraph::ScalarEdge<Tscal>, gpart_mass) \
30 \
31 /* counts */ \
32 X_RO(shamrock::solvergraph::Indexes<u32>, part_counts) \
33 X_RO(shamrock::solvergraph::Indexes<u32>, part_counts_with_ghost) \
34 \
35 /* fields */ \
36 X_RO(shamrock::solvergraph::IFieldSpan<Tvec>, xyz) \
37 X_RO(shamrock::solvergraph::IFieldSpan<Tscal>, hpart) \
38 X_RO(shamrock::solvergraph::IFieldSpan<Tvec>, vxyz) \
39 X_RO(shamrock::solvergraph::IFieldSpan<Tscal>, omega) \
40 X_RO(shamrock::solvergraph::IFieldSpan<Tscal>, pressure) \
41 X_RO(shamrock::solvergraph::IFieldSpan<Tscal>, s_j) \
42 X_RO(shamrock::solvergraph::IFieldSpan<Tscal>, Ttilde_sj) \
43 \
44 /* neigh */ \
45 X_RO(shammodels::sph::solvergraph::NeighCache, neigh_cache) \
46 \
47 /* ------------------- outputs ------------------- */ \
48 X_RW(shamrock::solvergraph::IFieldSpan<Tscal>, ds_j_dt)
49
51
52 template<class Tvec, template<class> class SPHKernel>
53 class NodeUpdateDerivsMonofluidTVI : public shamrock::solvergraph::INode {
54
55 using Tscal = shambase::VecComponent<Tvec>;
56
57 static constexpr Tscal kernel_radius = SPHKernel<Tscal>::Rkern;
58
59 u32 ndust;
60
61 public:
62 NodeUpdateDerivsMonofluidTVI(u32 ndust) : ndust(ndust) {}
63
64 EXPAND_NODE_EDGES(NODE_EDGES)
65
67
68 inline virtual std::string _impl_get_label() const {
69 return "NodeUpdateDerivsMonofluidTVI";
70 };
71
72 virtual std::string _impl_get_tex() const;
73 };
74} // namespace shammodels::sph::modules
75
76#undef NODE_EDGES
std::uint32_t u32
32 bit unsigned integer
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
namespace for the sph model modules