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
24
26
27 template<class Tvec, class TgridVec>
29
31 bool transform_vec_x = true;
32 bool transform_vec_y = true;
33 bool transform_vec_z = true;
34 std::shared_ptr<shamrock::patch::PatchDataLayerLayout> ghost_layer_layout;
35
36 public:
39 bool transform_vec_x,
40 bool transform_vec_y,
41 bool transform_vec_z,
42 std::shared_ptr<shamrock::patch::PatchDataLayerLayout> ghost_layer_layout)
43 : mode(mode), transform_vec_x(transform_vec_x), transform_vec_y(transform_vec_y),
44 transform_vec_z(transform_vec_z), ghost_layer_layout(ghost_layer_layout) {}
45
46 struct Edges {
47 // inputs
50 &ghost_layers_candidates;
51 // outputs
53 };
54
55 inline void set_edges(
58 ghost_layers_candidates,
59 std::shared_ptr<shamrock::solvergraph::PatchDataLayerDDShared> ghost_layer) {
60 __internal_set_ro_edges({sim_box, ghost_layers_candidates});
61 __internal_set_rw_edges({ghost_layer});
62 }
63
64 inline Edges get_edges() {
65 return Edges{
66 get_ro_edge<shamrock::solvergraph::ScalarEdge<shammath::AABB<TgridVec>>>(0),
68 get_rw_edge<shamrock::solvergraph::PatchDataLayerDDShared>(0),
69 };
70 }
71
73
74 inline virtual std::string _impl_get_label() const { return "TransformGhostLayer"; };
75
76 virtual std::string _impl_get_tex() const;
77 };
78} // namespace shammodels::basegodunov::modules
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:30
void __internal_set_rw_edges(std::vector< std::shared_ptr< IEdge > > new_rw_edges)
Set the read write edges.
Definition INode.hpp:181
void __internal_set_ro_edges(std::vector< std::shared_ptr< IEdge > > new_ro_edges)
Set the read only edges.
Definition INode.hpp:171
const T & get_ro_edge(int slot)
Get a read only edge and cast it to the type T.
Definition INode.hpp:80
Shared distributed data layer for patch data management.
namespace for the basegodunov model modules
Axis-Aligned bounding box.
Definition AABB.hpp:99