Iterate over grid points in a region that extends partially into the volume.
More...
#include <OverlapHelpers.hpp>
|
template<size_t Dim> |
| OverlapIterator (const Index< Dim > &volume_extents, size_t overlap_extent, const Direction< Dim > &direction) |
|
| operator bool () const |
|
OverlapIterator & | operator++ () |
|
size_t | volume_offset () const |
| Offset into a DataVector that holds full volume data.
|
|
size_t | overlap_offset () const |
| Offset into a DataVector that holds data only on the overlap region.
|
|
void | reset () |
|
Iterate over grid points in a region that extends partially into the volume.
Here's an example how to use this iterator:
const Index<2> volume_extents{{{3, 2}}};
size_t i = 0;
direction};
overlap_iterator; ++overlap_iterator) {
CHECK(overlap_iterator.volume_offset() ==
gsl::at(expected_volume_offsets, i));
CHECK(overlap_iterator.overlap_offset() == i);
++i;
}
CHECK(i == expected_volume_offsets.size());
static Direction< VolumeDim > lower_xi()
Helper functions for creating specific Directions. These are labeled by the logical-coordinate names ...
An integer multi-index.
Definition: Index.hpp:31
constexpr T & at(std::array< T, N > &arr, Size index)
Retrieve a entry from a container, with checks in Debug mode that the index being retrieved is valid.
Definition: Gsl.hpp:126
size_t overlap_extent(size_t volume_extent, size_t max_overlap)
The number of points that an overlap extends into the volume_extent
The documentation for this class was generated from the following file:
- src/ParallelAlgorithms/LinearSolver/Schwarz/OverlapHelpers.hpp