Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
CopyPatchDataLayerFields.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
25#include <memory>
26
27namespace shamrock::solvergraph {
28
30
31 public:
33 std::shared_ptr<patch::PatchDataLayerLayout> layout_source,
34 std::shared_ptr<patch::PatchDataLayerLayout> layout_target)
35 : layout_source(layout_source), layout_target(layout_target) {}
36
37 std::shared_ptr<patch::PatchDataLayerLayout> layout_source;
38 std::shared_ptr<patch::PatchDataLayerLayout> layout_target;
39
40 struct Edges {
41 const IPatchDataLayerRefs &original;
42 PatchDataLayerEdge &target;
43 };
44
45 void set_edges(
46 std::shared_ptr<IPatchDataLayerRefs> original,
47 std::shared_ptr<PatchDataLayerEdge> target) {
48 __internal_set_ro_edges({original});
50 }
51
52 Edges get_edges() {
53 return Edges{get_ro_edge<IPatchDataLayerRefs>(0), get_rw_edge<PatchDataLayerEdge>(0)};
54 }
55
57
58 std::string _impl_get_label() const { return "CopyPatchDataLayerFields"; }
59
60 std::string _impl_get_tex() const { return "TODO"; }
61 };
62} // namespace shamrock::solvergraph
Defines the PatchDataLayerRefs class for managing distributed references to patch data layers.
Defines the PatchDataLayerEdge class for managing patch data layer edges.
std::string _impl_get_label() const
get the label of the node
std::string _impl_get_tex() const
get the tex 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
This header file contains utility functions related to exception handling in the code.