32namespace shamrock::solvergraph {
47 const std::shared_ptr<shamrock::patch::PatchDataLayerLayout> &layout,
48 const std::string &field_name)
57 std::shared_ptr<IPatchDataLayerRefs> original, std::shared_ptr<
IFieldRefs<T>> target) {
63 return Edges{get_ro_edge<IPatchDataLayerRefs>(0), get_rw_edge<IFieldRefs<T>>(0)};
70 auto edges = get_edges();
72 auto source_refs = edges.original.get_const_refs();
78 sizes.add_obj(id_patch, pdat.get_obj_cnt());
81 edges.target.ensure_sizes(sizes);
84 auto target_refs = edges.target.get_refs();
88 dest.overwrite(source.get_field<T>(field_idx), source.get_obj_cnt());
Defines the PatchDataLayerRefs class for managing distributed references to patch data layers.
Defines the PatchDataLayerEdge class for managing patch data layer edges.
std::uint32_t u32
32 bit unsigned integer
std::uint64_t u64
64 bit unsigned integer
Represents a collection of objects distributed across patches identified by a u64 id.
u32 get_field_idx(const std::string &field_name) const
Get the field id if matching name & type.
PatchDataLayer container class, the layout is described in patchdata_layout.
void _impl_evaluate_internal()
evaluate the node
std::string _impl_get_tex() const
get the tex of the node
std::string _impl_get_label() const
get the label of the node
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.
void __internal_set_rw_edges(std::vector< std::shared_ptr< IEdge > > new_rw_edges)
Set the read write edges.
void __internal_set_ro_edges(std::vector< std::shared_ptr< IEdge > > new_ro_edges)
Set the read only edges.
This header file contains utility functions related to exception handling in the code.
T & get_check_ref(const std::unique_ptr< T > &ptr, SourceLocation loc=SourceLocation())
Takes a std::unique_ptr and returns a reference to the object it holds. It throws a std::runtime_erro...
#define __shamrock_stack_entry()
Macro to create a stack entry.