Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
SPHColumnInteg.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"
20#include "shammath/AABB.hpp"
27
28#define NODE_EDGES(X_RO, X_RW) \
29 /* scalars */ \
30 X_RO(shamrock::solvergraph::IDataEdge<Tscal>, gpart_mass) \
31 X_RO(shamrock::solvergraph::IDataEdge<u32>, tree_reduction_level) \
32 \
33 /* counts */ \
34 X_RO(shamrock::solvergraph::Indexes<u32>, part_counts) \
35 \
36 /* fields */ \
37 X_RO(shamrock::solvergraph::IFieldRefs<Tvec>, positions) \
38 X_RO(shamrock::solvergraph::IFieldSpan<Tscal>, h_part) \
39 X_RO(shamrock::solvergraph::IFieldSpan<T>, field_data) \
40 X_RO(shamrock::solvergraph::DeviceBufferEdge<shammath::Ray<Tvec>>, rays) \
41 \
42 /* outputs */ \
43 X_RW(shamrock::solvergraph::DeviceBufferEdge<T>, interpolated_field)
44
46
47 template<class Tvec, class T, template<class> class SPHKernel>
49
50 using Tscal = shambase::VecComponent<Tvec>;
51 using Kernel = SPHKernel<Tscal>;
52
53 public:
54 EXPAND_NODE_EDGES(NODE_EDGES)
55
56 void _impl_evaluate_internal() override;
57
58 inline std::string _impl_get_label() const override { return "SPHColumnInteg"; }
59
60 std::string _impl_get_tex() const override;
61 };
62
63} // namespace shammodels::sph::modules
64
65#undef NODE_EDGES
Solver graph edge wrapping a global device buffer.
std::string _impl_get_tex() const override
get the tex of the node
void _impl_evaluate_internal() override
evaluate the node
std::string _impl_get_label() const override
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