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