Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
ComputeNeighStats.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
25#define NODE_EDGES(X_RO, X_RW) \
26 X_RO(shamrock::solvergraph::Indexes<u32>, part_counts) \
27 X_RO(shammodels::sph::solvergraph::NeighCache, neigh_cache) \
28 X_RO(shamrock::solvergraph::IFieldSpan<Tvec>, xyz) \
29 X_RO(shamrock::solvergraph::IFieldSpan<Tscal>, hpart)
30
32
33 template<class Tvec>
34 class ComputeNeighStats : public shamrock::solvergraph::INode {
35
36 using Tscal = shambase::VecComponent<Tvec>;
37
38 Tscal kernel_radius;
39
40 public:
41 ComputeNeighStats(Tscal kernel_radius) : kernel_radius(kernel_radius) {}
42
43 EXPAND_NODE_EDGES(NODE_EDGES)
44
46
47 inline virtual std::string _impl_get_label() const { return "ComputeNeighStats"; };
48
49 virtual std::string _impl_get_tex() const;
50 };
51} // namespace shammodels::sph::modules
52
53#undef NODE_EDGES
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:31
namespace for the sph model modules