Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
TransformGhostLayer.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
24
25#define NODE_EDGES(X_RO, X_RW) \
26 /* ------------------- inputs ------------------- */ \
27 X_RO(shamrock::solvergraph::ScalarEdge<shammath::AABB<TgridVec>>, sim_box) \
28 X_RO(shamrock::solvergraph::DDSharedScalar<GhostLayerCandidateInfos>, ghost_layers_candidates) \
29 \
30 /* ------------------- outputs ------------------- */ \
31 X_RW(shamrock::solvergraph::PatchDataLayerDDShared, ghost_layer)
32
34
35 template<class Tvec, class TgridVec>
36 class TransformGhostLayer : public shamrock::solvergraph::INode {
37
39 bool transform_vec_x = true;
40 bool transform_vec_y = true;
41 bool transform_vec_z = true;
42 std::shared_ptr<shamrock::patch::PatchDataLayerLayout> ghost_layer_layout;
43
44 public:
45 TransformGhostLayer(
47 bool transform_vec_x,
48 bool transform_vec_y,
49 bool transform_vec_z,
50 std::shared_ptr<shamrock::patch::PatchDataLayerLayout> ghost_layer_layout)
51 : mode(mode), transform_vec_x(transform_vec_x), transform_vec_y(transform_vec_y),
52 transform_vec_z(transform_vec_z), ghost_layer_layout(ghost_layer_layout) {}
53
54 EXPAND_NODE_EDGES(NODE_EDGES)
55
57
58 inline virtual std::string _impl_get_label() const { return "TransformGhostLayer"; };
59
60 virtual std::string _impl_get_tex() const;
61 };
62} // namespace shammodels::basegodunov::modules
63
64#undef NODE_EDGES
Shared distributed data layer for patch data management in solver graphs.
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 basegodunov model modules