24namespace shamrock::solvergraph {
39 on_distributeddata_diff(
48 "Missing field span in distributed data at id {}\n"
50 "Field texsymbol: {}",
53 this->get_tex_symbol()));
60 "Extra field span in distributed data at id {}\n"
62 "Field texsymbol: {}",
65 this->get_tex_symbol()));
75 DDPatchDataFieldSpanPointer<T> extract() {
76 DDPatchDataFieldSpanPointer<T> spans = std::exchange(this->spans, {});
std::uint64_t u64
64 bit unsigned integer
Represents a collection of objects distributed across patches identified by a u64 id.
void for_each(std::function< void(u64, T &)> &&f)
Applies a function to each object in the collection.
Represents a span of data within a PatchDataField.
virtual void free_alloc()
Free allocated memory.
virtual const DDPatchDataFieldSpanPointer< T > & get_spans() const
Const variant of get_spans.
virtual void ensure_sizes(const shambase::DistributedData< u32 > &sizes)
Ensure that the sizes of the patches in the field match the given sizes (Can resize the underlying fi...
virtual DDPatchDataFieldSpanPointer< T > & get_spans()
Get the DistributedData of spans attached to the underlying field.
virtual void check_sizes(const shambase::DistributedData< u32 > &sizes) const
Check that the sizes of the patches in the field match the given sizes.
Interface for a solver graph edge representing a field as spans.
void throw_with_loc(std::string message, SourceLocation loc=SourceLocation{})
Throw an exception and append the source location to it.