walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor > Class Template Reference

Detailed Description

template<typename AdaptedIterator, typename FieldAdaptor>
class walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >

Iterator class for Adaptors.

Implements same functions as walberla::field::FieldIterator by wrapping a FieldIterator object. When dereferenced the value is first transformed by a functor object provided by the Adaptor.

Template Parameters AdaptedIterator: The iterator type of the base field FieldAdaptor: The Field adaptor class

#include <AdaptorIterator.h>

Public Types

using T = typename FieldAdaptor::value_type
 
using Functor = typename FieldAdaptor::functor_t
 
using OwnType = AdaptorIterator< AdaptedIterator, FieldAdaptor >
 

Public Member Functions

 AdaptorIterator (const AdaptedIterator &baseIterator, const FieldAdaptor *adaptedField)
 
Operators
bool operator== (const OwnType &it) const
 
bool operator!= (const OwnType &it) const
 
AdaptorIteratoroperator++ ()
 
AdaptorIteratoroperator-- ()
 
Access Functions
T operator* () const
 
T operator-> () const
 
T getF (cell_idx_t cf) const
 
T getF (uint_t cf) const
 
T neighbor (stencil::Direction d, cell_idx_t cf=0) const
 
T neighbor (stencil::Direction d, uint_t cf) const
 
T neighbor (cell_idx_t cx, cell_idx_t cy, cell_idx_t cz, cell_idx_t cf=0) const
 
T neighbor (cell_idx_t cx, cell_idx_t cy, cell_idx_t cz, uint_t cf) const
 
Coordinates of current position
cell_idx_t x () const
 
cell_idx_t y () const
 
cell_idx_t z () const
 
cell_idx_t f () const
 
Cell cell () const
 
Utility Functions
void print (std::ostream &str) const
 
const FieldAdaptor * getField () const
 

Fast Iteration

AdaptedIterator base_
 
const FieldAdaptor * adaptedField_
 
const Functorfunctor_
 
void incrOuter ()
 
void incrInner ()
 
bool testInner () const
 

Member Typedef Documentation

◆ Functor

template<typename AdaptedIterator , typename FieldAdaptor >
using walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >::Functor = typename FieldAdaptor::functor_t

◆ OwnType

template<typename AdaptedIterator , typename FieldAdaptor >
using walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >::OwnType = AdaptorIterator<AdaptedIterator, FieldAdaptor>

◆ T

template<typename AdaptedIterator , typename FieldAdaptor >
using walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >::T = typename FieldAdaptor::value_type

Constructor & Destructor Documentation

◆ AdaptorIterator()

template<typename AdaptedIterator , typename FieldAdaptor >
walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >::AdaptorIterator ( const AdaptedIterator &  baseIterator,
const FieldAdaptor *  adaptedField 
)
inline

Member Function Documentation

◆ cell()

template<typename AdaptedIterator , typename FieldAdaptor >
Cell walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >::cell ( ) const
inline

◆ f()

template<typename AdaptedIterator , typename FieldAdaptor >
cell_idx_t walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >::f ( ) const
inline

◆ getF() [1/2]

template<typename AdaptedIterator , typename FieldAdaptor >
T walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >::getF ( cell_idx_t  cf) const
inline

◆ getF() [2/2]

template<typename AdaptedIterator , typename FieldAdaptor >
T walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >::getF ( uint_t  cf) const
inline

◆ getField()

template<typename AdaptedIterator , typename FieldAdaptor >
const FieldAdaptor* walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >::getField ( ) const
inline

◆ incrInner()

template<typename AdaptedIterator , typename FieldAdaptor >
void walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >::incrInner ( )
inline

◆ incrOuter()

template<typename AdaptedIterator , typename FieldAdaptor >
void walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >::incrOuter ( )
inline

◆ neighbor() [1/4]

template<typename AdaptedIterator , typename FieldAdaptor >
T walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >::neighbor ( cell_idx_t  cx,
cell_idx_t  cy,
cell_idx_t  cz,
cell_idx_t  cf = 0 
) const
inline

◆ neighbor() [2/4]

template<typename AdaptedIterator , typename FieldAdaptor >
T walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >::neighbor ( cell_idx_t  cx,
cell_idx_t  cy,
cell_idx_t  cz,
uint_t  cf 
) const
inline

◆ neighbor() [3/4]

template<typename AdaptedIterator , typename FieldAdaptor >
T walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >::neighbor ( stencil::Direction  d,
cell_idx_t  cf = 0 
) const
inline

◆ neighbor() [4/4]

template<typename AdaptedIterator , typename FieldAdaptor >
T walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >::neighbor ( stencil::Direction  d,
uint_t  cf 
) const
inline

◆ operator!=()

template<typename AdaptedIterator , typename FieldAdaptor >
bool walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >::operator!= ( const OwnType it) const
inline

◆ operator*()

template<typename AdaptedIterator , typename FieldAdaptor >
T walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >::operator* ( ) const
inline

◆ operator++()

template<typename AdaptedIterator , typename FieldAdaptor >
AdaptorIterator& walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >::operator++ ( )
inline

◆ operator--()

template<typename AdaptedIterator , typename FieldAdaptor >
AdaptorIterator& walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >::operator-- ( )
inline

◆ operator->()

template<typename AdaptedIterator , typename FieldAdaptor >
T walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >::operator-> ( ) const
inline

◆ operator==()

template<typename AdaptedIterator , typename FieldAdaptor >
bool walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >::operator== ( const OwnType it) const
inline

◆ print()

template<typename AdaptedIterator , typename FieldAdaptor >
void walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >::print ( std::ostream &  str) const
inline

◆ testInner()

template<typename AdaptedIterator , typename FieldAdaptor >
bool walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >::testInner ( ) const
inline

◆ x()

template<typename AdaptedIterator , typename FieldAdaptor >
cell_idx_t walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >::x ( ) const
inline

◆ y()

template<typename AdaptedIterator , typename FieldAdaptor >
cell_idx_t walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >::y ( ) const
inline

◆ z()

template<typename AdaptedIterator , typename FieldAdaptor >
cell_idx_t walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >::z ( ) const
inline

Member Data Documentation

◆ adaptedField_

template<typename AdaptedIterator , typename FieldAdaptor >
const FieldAdaptor* walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >::adaptedField_
protected

◆ base_

template<typename AdaptedIterator , typename FieldAdaptor >
AdaptedIterator walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >::base_
protected

◆ functor_

template<typename AdaptedIterator , typename FieldAdaptor >
const Functor& walberla::field::AdaptorIterator< AdaptedIterator, FieldAdaptor >::functor_
protected

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