Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
ExtractGhostLayer.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
23
25
27 std::shared_ptr<shamrock::patch::PatchDataLayerLayout> ghost_layer_layout;
28
29 public:
30 ExtractGhostLayer(std::shared_ptr<shamrock::patch::PatchDataLayerLayout> ghost_layer_layout)
31 : ghost_layer_layout(ghost_layer_layout) {}
32
33 struct Edges {
34 // inputs
35 const shamrock::solvergraph::IPatchDataLayerRefs &patch_data_layers;
37 // outputs
39 };
40
41 inline void set_edges(
42 std::shared_ptr<shamrock::solvergraph::IPatchDataLayerRefs> patch_data_layers,
43 std::shared_ptr<shamrock::solvergraph::DDSharedBuffers<u32>> idx_in_ghost,
44 std::shared_ptr<shamrock::solvergraph::PatchDataLayerDDShared> ghost_layer) {
45 __internal_set_ro_edges({patch_data_layers, idx_in_ghost});
46 __internal_set_rw_edges({ghost_layer});
47 }
48
49 inline Edges get_edges() {
50 return Edges{
51 get_ro_edge<shamrock::solvergraph::IPatchDataLayerRefs>(0),
52 get_ro_edge<shamrock::solvergraph::DDSharedBuffers<u32>>(1),
53 get_rw_edge<shamrock::solvergraph::PatchDataLayerDDShared>(0),
54 };
55 }
56
58
59 inline virtual std::string _impl_get_label() const { return "ExtractGhostLayer"; };
60
61 virtual std::string _impl_get_tex() const;
62 };
63} // namespace shammodels::basegodunov::modules
Defines the DDSharedBuffers class for managing buffers contained in a distributed data shared.
Shared distributed data layer for patch data management in solver graphs.
Defines the PatchDataLayerRefs class for managing distributed references to patch data layers.
virtual std::string _impl_get_label() const
get the label of the node
virtual std::string _impl_get_tex() const
get the tex of the node
Interface for a solver graph edge representing a buffer contained in a distributed data shared.
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
Shared distributed data layer for patch data management.
namespace for the basegodunov model modules