Class Halo¶
Defined in File Halo.hpp
Class Documentation¶
-
class Halo¶
A class to facilitate halo exchange between MPI ranks.
Public Functions
-
inline Halo(ModelArray &ma)¶
Constructs a halo object from ModelArray.
- Parameters:
ma – ModelArray object to create halo from
-
template<int N>
inline Halo(DGVectorHolder<N> &dgvh)¶ Constructs a halo object from DGVectorHolder.
- Parameters:
dgvh – DGVectorHolder object to create halo from
-
template<int N>
inline Halo(DGVector<N> &dgv)¶ Constructs a halo object from DGVector.
- Parameters:
dgv – DGVector object to create halo from
-
template<int N>
inline Halo(CGVector<N> &cgv)¶ Constructs a halo object from CGVector.
- Parameters:
cgv – CGVector object to create halo from
-
inline size_t getInnerSize()¶
Returns size of the inner flattened array.
-
template<typename S, typename T = S>
inline void getInnerBlock(S &source, T &target)¶ Get inner block from source array and copy into target.
- Parameters:
source – Source ModelArray-like object to extract inner block from
target – Target ModelArray-like object to store the extracted inner block
-
template<typename S, typename T = S>
inline void setInnerBlock(S &source, T &target)¶ Set inner block of the target array from a given source.
- Parameters:
source – Source ModelArray-like object containing data to set in the inner block
target – Target ModelArray-like object to have its inner block set
-
template<typename T>
inline void exchangeHalos(T &target)¶ Exchanges halo regions between neighboring MPI ranks.
Performs a complete halo exchange operation by:
Populating send buffers with local halo data
Receiving halo data from neighboring ranks into receive buffers
Transposing corner data for CGVector fields (if needed)
Populating the target array with the received halo data
- Parameters:
target – The target array to update with exchanged halo data
Public Static Functions
-
static inline const bool isDimLateral(const ModelArray::Dimension dim)¶
Check if dimension is in the lateral direction i.e., X, Y, XVERTEX, or YVERTEX.
Determines whether a dimension represents a lateral (horizontal) direction, which includes both cell centers and vertices in X and Y dimensions.
- Parameters:
dim – The dimension to check
- Returns:
true if dimension is X, Y, XVERTEX, or YVERTEX, false otherwise
Public Static Attributes
-
static const size_t haloWidth = 1¶
-
inline Halo(ModelArray &ma)¶