SpECTRE  v2024.04.12
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)
 Construct begin state.
 
void reset ()
 
 ElementCenteredSubdomainDataIterator ()
 Construct end state.
 
ElementCenteredSubdomainDataIteratoroperator++ ()
 
tmpl::conditional_t< Const, double, double & > operator* () const
 

Friends

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

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.


The documentation for this struct was generated from the following file: