Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
CopyPatchDataField.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
24#include <memory>
25
26namespace shamrock::solvergraph {
27
58 template<class T>
59 class CopyPatchDataField : public INode {
60
61 public:
64
70
78 std::shared_ptr<IFieldRefs<T>> original, std::shared_ptr<IFieldRefs<T>> target) {
79 __internal_set_ro_edges({original});
81 }
82
91
101
107 std::string _impl_get_label() const { return "CopyPatchDataField"; }
108
114 std::string _impl_get_tex() const;
115 };
116} // namespace shamrock::solvergraph
void set_edges(std::shared_ptr< IFieldRefs< T > > original, std::shared_ptr< IFieldRefs< T > > target)
Sets the input and output edges for the copy operation.
std::string _impl_get_label() const
Returns the human-readable label for this node.
Edges get_edges()
Retrieves the current edges of the node.
void _impl_evaluate_internal()
Internal implementation of the field copying operation.
std::string _impl_get_tex() const
Returns the LaTeX representation of this node for documentation.
Interface for a solver graph edge representing a field as references to the underlying patch fields.
T & get_rw_edge(int slot)
Get a read write edge and cast it to the type T.
Definition INode.hpp:87
void __internal_set_rw_edges(std::vector< std::shared_ptr< IEdge > > new_rw_edges)
Set the read write edges.
Definition INode.hpp:220
void __internal_set_ro_edges(std::vector< std::shared_ptr< IEdge > > new_ro_edges)
Set the read only edges.
Definition INode.hpp:210
const T & get_ro_edge(int slot)
Get a read only edge and cast it to the type T.
Definition INode.hpp:81
Structure containing references to the node's input and output edges.
IFieldRefs< T > & target
Reference to the target field for copying.
const IFieldRefs< T > & original
Reference to the source field data.