Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
ComputeOmega.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
19
21#include "shambackends/vec.hpp"
26
27#define NODE_EDGES(X_RO, X_RW) \
28 X_RO(shamrock::solvergraph::Indexes<u32>, part_counts) \
29 X_RO(shammodels::sph::solvergraph::NeighCache, neigh_cache) \
30 X_RO(shamrock::solvergraph::IFieldSpan<Tvec>, xyz) \
31 X_RO(shamrock::solvergraph::IFieldSpan<Tscal>, hpart) \
32 X_RW(shamrock::solvergraph::IFieldSpan<Tscal>, omega)
33
35
36 template<class Tvec, template<class> class SPHKernel>
37 class NodeComputeOmega : public shamrock::solvergraph::INode {
38
39 using Tscal = shambase::VecComponent<Tvec>;
40
41 static constexpr Tscal kernel_radius = SPHKernel<Tscal>::Rkern;
42 Tscal part_mass;
43
44 public:
45 NodeComputeOmega(Tscal part_mass) : part_mass(part_mass) {}
46
47 EXPAND_NODE_EDGES(NODE_EDGES)
48
50
51 inline virtual std::string _impl_get_label() const { return "ComputeOmega"; };
52
53 virtual std::string _impl_get_tex() const;
54 };
55
56} // namespace shammodels::sph::modules
57
58#undef NODE_EDGES
virtual std::string _impl_get_tex() const
get the tex of the node
void _impl_evaluate_internal()
evaluate 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:31
namespace for the sph model modules