SpECTRE
v2024.09.29
|
A SegmentId labels a segment of the interval
#include <SegmentId.hpp>
Public Member Functions | |
SegmentId ()=default | |
Default constructor needed for Charm++ serialization. | |
SegmentId (const SegmentId &segment_id)=default | |
SegmentId (SegmentId &&segment_id)=default | |
SegmentId & | operator= (const SegmentId &segment_id)=default |
SegmentId & | operator= (SegmentId &&segment_id)=default |
SegmentId (size_t refinement_level, size_t index) | |
constexpr size_t | refinement_level () const |
constexpr size_t | index () const |
SegmentId | id_of_parent () const |
SegmentId | id_of_child (Side side) const |
SegmentId | id_of_sibling () const |
The other child of the parent of this segment. | |
SegmentId | id_of_abutting_nibling () const |
The child of the sibling of this segment that shares an endpoint with it. | |
Side | side_of_sibling () const |
The side on which this segment shares an endpoint with its sibling. | |
SegmentId | id_if_flipped () const |
The id this segment would have if the coordinate axis were flipped. | |
double | endpoint (Side side) const |
The block logical coordinate of the endpoint of the segment on the given Side. | |
double | midpoint () const |
The block logical coordinate of the midpoint of the segment. | |
bool | overlaps (const SegmentId &other) const |
Does the segment overlap with another? | |
void | pup (PUP::er &p) |
A SegmentId labels a segment of the interval
In index
and refinement_level
.
In the figure, The index
of segments increase from the lower side
to the upper side
in each dimension of a Block, while the refinement level
increases as the segments are subdivided. For example, let the segment labeled self
be on refinement level
index
parent
segment is on refinement level
index
children
of self
are on refinement level
index
sibling
and abutting nibling
(child of sibling) of self
. These relationships between segments are important for h-refinement, since in each dimension an Element can be flagged to split into its two children
segments, or join with its sibling
segment to form its parent
segment. As refinement levels of neighboring elements are kept within one, in the direction of its sibling
, a segment can only abut its sibling
or abutting nibling
, while on the opposite side, it can abut a segment on its level, the next-lower, or the next-higher level.