SpECTRE  2021.08.02
LinearSolver::Schwarz::ElementCenteredSubdomainDataIterator< Const, Dim, TagsList > Struct Template Reference

Iterate over LinearSolver::Schwarz::ElementCenteredSubdomainData More...

#include <ElementCenteredSubdomainData.hpp>

Public Types

using difference_type = ptrdiff_t
 
using value_type = double
 
using pointer = value_type *
 
using reference = value_type &
 
using iterator_category = std::forward_iterator_tag
 

Public Member Functions

 ElementCenteredSubdomainDataIterator (PtrType data) noexcept
 Construct begin state.
 
void reset () noexcept
 
 ElementCenteredSubdomainDataIterator () noexcept
 Construct end state.
 
ElementCenteredSubdomainDataIteratoroperator++ () noexcept
 
tmpl::conditional_t< Const, double, double & > operator* () const noexcept
 

Friends

bool operator== (const ElementCenteredSubdomainDataIterator &lhs, const ElementCenteredSubdomainDataIterator &rhs) noexcept
 
bool operator!= (const ElementCenteredSubdomainDataIterator &lhs, const ElementCenteredSubdomainDataIterator &rhs) noexcept
 

Detailed Description

template<bool Const, size_t Dim, typename TagsList>
struct LinearSolver::Schwarz::ElementCenteredSubdomainDataIterator< Const, Dim, TagsList >

Iterate over LinearSolver::Schwarz::ElementCenteredSubdomainData

This iterator guarantees that it steps through the data in the same order as long as these conditions are satisfied:

  • The set of overlap IDs in the overlap_data doesn't change
  • The extents of the element_data and the `overlap_data doesn't change

Iterating requires sorting the overlap IDs. If you find this impacts performance, be advised to implement the internal data storage in ElementCenteredSubdomainData so it stores its data contiguously, e.g. by implementing non-owning variables.