Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
NodeEvolveDustCOALASourceTerm.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"
24#include <experimental/mdspan>
25#include <vector>
26
27#define NODE_EDGES(X_RO, X_RW) \
28 /* scalars */ \
29 X_RO(shamrock::solvergraph::ScalarEdge<Tscal>, rhodust_eps) \
30 X_RO(shamrock::solvergraph::ScalarEdge<Tscal>, dv_max) \
31 X_RO(shamrock::solvergraph::ScalarEdge<std::vector<Tscal>>, massgrid) \
32 X_RO(shamrock::solvergraph::ScalarEdge<std::vector<Tscal>>, tensor_tabflux_coag) \
33 \
34 /* counts */ \
35 X_RO(shamrock::solvergraph::Indexes<u32>, part_counts) \
36 \
37 /* to get rho_dust_j */ \
38 X_RO(shamrock::solvergraph::IFieldSpan<Tscal>, s_j) \
39 \
40 /* Here it is the delta_v in the monofluid sense not the coala sense */ \
41 X_RO(shamrock::solvergraph::IFieldSpan<Tvec>, delta_v_j) \
42 \
43 /* outputs */ \
44 X_RW(shamrock::solvergraph::IFieldSpan<Tscal>, S_coag)
45
47
48 template<class Tvec>
49 class NodeEvolveDustCOALASourceTerm : public shamrock::solvergraph::INode {
50
51 using Tscal = shambase::VecComponent<Tvec>;
52
53 u32 nbins;
54
55 public:
56 NodeEvolveDustCOALASourceTerm(u32 nbins) : nbins(nbins) {}
57
58 EXPAND_NODE_EDGES(NODE_EDGES)
59
61
62 inline virtual std::string _impl_get_label() const {
63 return "NodeEvolveDustCOALASourceTerm";
64 };
65
66 virtual std::string _impl_get_tex() const;
67 };
68} // namespace shammodels::sph::modules
69
70#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 sph model modules