Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
IFieldSpan.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
22
23namespace shamrock::solvergraph {
24
26 template<class T>
29
37 template<class T>
38 class IFieldSpan : public IEdgeNamed {
39 public:
40 using IEdgeNamed::IEdgeNamed;
41
44
46 virtual const DDPatchDataFieldSpanPointer<T> &get_spans() const = 0;
47
54 virtual void check_sizes(const shambase::DistributedData<u32> &sizes) const = 0;
55
62 virtual void ensure_sizes(const shambase::DistributedData<u32> &sizes) = 0;
63 };
64
65} // namespace shamrock::solvergraph
Represents a collection of objects distributed across patches identified by a u64 id.
Interface for a solver graph edge representing a field as spans.
virtual DDPatchDataFieldSpanPointer< T > & get_spans()=0
Get the DistributedData of spans attached to the underlying field.
virtual const DDPatchDataFieldSpanPointer< T > & get_spans() const =0
Const variant of get_spans.
virtual void check_sizes(const shambase::DistributedData< u32 > &sizes) const =0
Check that the sizes of the patches in the field match the given sizes.
virtual void ensure_sizes(const shambase::DistributedData< u32 > &sizes)=0
Ensure that the sizes of the patches in the field match the given sizes (Can resize the underlying fi...