Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
FindGhostLayerIndices.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
20
22
23 template<class TgridVec>
25
27
28 public:
29 FindGhostLayerIndices(GhostLayerGenMode mode) : mode(mode) {}
30
41
42 inline void set_edges(
44 std::shared_ptr<shamrock::solvergraph::IPatchDataLayerRefs> patch_data_layers,
46 ghost_layers_candidates,
48 patch_boxes,
49 std::shared_ptr<shamrock::solvergraph::DDSharedBuffers<u32>> idx_in_ghost) {
51 {sim_box, patch_data_layers, ghost_layers_candidates, patch_boxes});
52 __internal_set_rw_edges({idx_in_ghost});
53 }
54
55 inline Edges get_edges() {
56 return Edges{
57 get_ro_edge<shamrock::solvergraph::ScalarEdge<shammath::AABB<TgridVec>>>(0),
58 get_ro_edge<shamrock::solvergraph::IPatchDataLayerRefs>(1),
59 get_ro_edge<shamrock::solvergraph::DDSharedScalar<GhostLayerCandidateInfos>>(2),
61 get_rw_edge<shamrock::solvergraph::DDSharedBuffers<u32>>(0),
62 };
63 }
64
66
67 inline virtual std::string _impl_get_label() const { return "FindGhostLayerIndices"; };
68
69 virtual std::string _impl_get_tex() const;
70 };
71} // namespace shammodels::basegodunov::modules
Defines the DDSharedBuffers class for managing buffers contained in a distributed data shared.
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
const T & get_ro_edge(int slot)
Get a read only edge and cast it to the type T.
Definition INode.hpp:80
namespace for the basegodunov model modules
Axis-Aligned bounding box.
Definition AABB.hpp:99