|
| ElementId ()=default |
| Default constructor needed for Charm++ serialization.
|
|
| ElementId (const ElementId &)=default |
|
ElementId & | operator= (const ElementId &)=default |
|
| ElementId (ElementId &&)=default |
|
ElementId & | operator= (ElementId &&)=default |
|
| ElementId (size_t block_id, size_t grid_index=0) |
| Create the ElementId of the root Element of a Block.
|
|
| ElementId (size_t block_id, const std::array< SegmentId, VolumeDim > &segment_ids, size_t grid_index=0) |
| Create an arbitrary ElementId.
|
|
| ElementId (const std::string &grid_name) |
| Create an ElementId from its string representation (see operator<< ).
|
|
ElementId< VolumeDim > | id_of_child (size_t dim, Side side) const |
|
ElementId< VolumeDim > | id_of_parent (size_t dim) const |
|
size_t | block_id () const |
|
size_t | grid_index () const |
|
std::array< size_t, VolumeDim > | refinement_levels () const |
|
std::array< SegmentId, VolumeDim > | segment_ids () const |
|
SegmentId | segment_id (size_t dim) const |
|
size_t | number_of_block_boundaries () const |
| Returns the number of block boundaries the element has.
|
|
template<size_t VolumeDim>
class ElementId< VolumeDim >
An ElementId uniquely labels an Element.
It is constructed from the BlockId of the Block to which the Element belongs and the VolumeDim SegmentIds that label the segments of the Block that the Element covers. An optional grid_index
identifies elements with the same BlockId and SegmentIds across multiple grids.
Details
The ElementId
serves as an index that is compatible with Charm++ and therefore must adhere to the restrictions imposed by Charm++. These are:
template<size_t VolumeDim>
template<size_t Dim>
Returns a bool if the element is the zeroth element in the domain.
Details
An element is considered to be the zeroth element if its ElementId id
has
- id.block_id() == 0
- All id.segment_ids() have SegmentId.index() == 0
- If the argument
grid_index
is specified, id.grid_index() == grid_index.
This means that the only element in a domain that this function will return true
for is the element in the lower corner of Block0 of that domain. The grid_index
will determine which domain is used for the comparison. During evolutions, only one domain will be active at a time so it doesn't make sense to compare the grid_index
. However, during an elliptic solve when there are multiple grids, this grid_index
is useful for specifying only one element over all domains.
This function is useful if you need a unique element in the domain because only one element in the whole domain can be the zeroth element.
- Warning
- If you have multiple grids and you don't specify the
grid_index
argument, this function will return true
for one element in every grid and thus can't be used to determine a unique element in a simulation; only a unique element in each grid.
- Warning
- If the domain is re-gridded, a different ElementId may represent the zeroth element.