chombo-discharge
Loading...
Searching...
No Matches
CD_GraphCopyHeader.H
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2021-2026 SINTEF Energy Research
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6
12
13#ifndef CD_GRAPHCOPYHEADER_H
14#define CD_GRAPHCOPYHEADER_H
15
16// Std includes
17#include <type_traits>
18
19// Chombo includes
20#include <Box.H>
21
22// Our includes
23#include <CD_NamespaceHeader.H>
24
25namespace PolyhedralEB {
26
35{
40
45
50
55
59 int m_lo[SpaceDim];
60
64 int m_hi[SpaceDim];
65
70
75
80 inline Box
81 region() const noexcept
82 {
83 return Box(IntVect(D_DECL(m_lo[0], m_lo[1], m_lo[2])), IntVect(D_DECL(m_hi[0], m_hi[1], m_hi[2])));
84 }
85};
86
87// The header travels between ranks as raw bytes.
88static_assert(std::is_trivially_copyable<GraphCopyHeader>::value, "GraphCopyHeader must be trivially copyable");
89
90} // namespace PolyhedralEB
91
92#include <CD_NamespaceFooter.H>
93
94#endif
What a piece of a polyhedral graph is and where it goes, as it travels between ranks.
Definition CD_GraphCopyHeader.H:35
int m_hi[SpaceDim]
High corner of the piece, on the source level.
Definition CD_GraphCopyHeader.H:64
int m_sourceLevel
Geometry level the cells come from.
Definition CD_GraphCopyHeader.H:49
int m_sourceBox
Index of the box of the source level's graph layout that holds the cells.
Definition CD_GraphCopyHeader.H:54
int m_overrideBytes
Bytes of face overrides the piece carries.
Definition CD_GraphCopyHeader.H:74
int m_destBox
Index of the destination box in its level's layout.
Definition CD_GraphCopyHeader.H:44
int m_numSurfaces
Number of surfaces the piece carries.
Definition CD_GraphCopyHeader.H:69
int m_destLevel
Level of the destination box in the destination hierarchy.
Definition CD_GraphCopyHeader.H:39
Box region() const noexcept
The piece as a box.
Definition CD_GraphCopyHeader.H:81
int m_lo[SpaceDim]
Low corner of the piece, on the source level.
Definition CD_GraphCopyHeader.H:59