Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
ReplaceGhostField.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#include <memory>
24
25namespace shamrock::solvergraph {
26
27 template<class T>
28 class ReplaceGhostField : public INode {
29
30 public:
32
37
38 inline void set_edges(
39 std::shared_ptr<shamrock::solvergraph::PatchDataFieldDDShared<T>> ghost_fields,
40 std::shared_ptr<shamrock::solvergraph::IFieldRefs<T>> fields) {
41 __internal_set_ro_edges({ghost_fields});
43 }
44
45 inline Edges get_edges() {
46 return Edges{
47 get_rw_edge<shamrock::solvergraph::PatchDataFieldDDShared<T>>(0),
49 }
50
52
53 inline virtual std::string _impl_get_label() { return "ReplaceGhostField"; };
54
55 virtual std::string _impl_get_tex() { return "ReplaceGhostField"; };
56 };
57} // namespace shamrock::solvergraph
Shared distributed data field for patch data management in solver graphs.
Interface for a solver graph edge representing a field as references to the underlying patch fields.
Inode is node between data edges, takes multiple inputs, multiple outputs.
Definition INode.hpp:30
T & get_rw_edge(int slot)
Get a read write edge and cast it to the type T.
Definition INode.hpp:86
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 field for patch data management.