OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
olb::ColumnVector< COLUMN, D >::ptr Class Reference

Proxy for accessing a column vector entry. More...

#include <columnVector.h>

+ Inheritance diagram for olb::ColumnVector< COLUMN, D >::ptr:
+ Collaboration diagram for olb::ColumnVector< COLUMN, D >::ptr:

Public Member Functions

 ptr (ColumnVector< COLUMN, D > &columns, std::size_t index)
 
 ptr (ptr &&rhs)
 
template<typename U , typename IMPL >
ptroperator= (const GenericVector< U, D, IMPL > &rhs)
 
std::size_t getIndex () const
 
void setIndex (std::size_t index)
 
unsigned getSize () const
 
- Public Member Functions inherited from olb::ScalarVector< COLUMN::value_t, D, ptr >
constexpr ScalarVector ()=default
 
 ScalarVector (const ScalarVector &)=delete
 
 ScalarVector (ScalarVector &&)=delete
 
- Public Member Functions inherited from olb::GenericVector< T, D, IMPL >
constexpr GenericVector ()=default
 
 GenericVector (const GenericVector &)=delete
 
 GenericVector (GenericVector &&)=delete
 
GenericVectoroperator= (GenericVector &&rhs)=delete
 
constexpr const T & operator[] (unsigned iDim) const any_platform
 
constexpr T & operator[] (unsigned iDim) any_platform
 
template<typename IMPL_ >
constexpr IMPL & operator= (const GenericVector< T, D, IMPL_ > &rhs) any_platform
 
template<typename U , typename IMPL_ >
constexpr IMPL & operator+= (const GenericVector< U, D, IMPL_ > &rhs) any_platform
 
template<typename IMPL_ >
constexpr IMPL & operator-= (const GenericVector< T, D, IMPL_ > &rhs) any_platform
 
template<typename U , typename IMPL_ >
constexpr IMPL & operator*= (const GenericVector< U, D, IMPL_ > &rhs) any_platform
 
template<typename U >
constexpr meta::enable_if_arithmetic_t< U, IMPL & > operator+= (const U &rhs) any_platform
 
template<typename U >
constexpr meta::enable_if_arithmetic_t< U, IMPL & > operator-= (const U &rhs) any_platform
 
template<typename U >
constexpr meta::enable_if_arithmetic_t< U, IMPL & > operator*= (const U &rhs) any_platform
 
template<typename U >
constexpr meta::enable_if_arithmetic_t< U, IMPL & > operator/= (const U &rhs) any_platform
 
template<typename IMPL_ >
constexpr bool operator== (const GenericVector< T, D, IMPL_ > &rhs) const any_platform
 
template<typename IMPL_ >
constexpr bool operator!= (const GenericVector< T, D, IMPL_ > &rhs) const any_platform
 

Protected Member Functions

const COLUMN::value_t * getComponentPointer (unsigned iDim) const
 
COLUMN::value_t * getComponentPointer (unsigned iDim)
 

Additional Inherited Members

- Public Types inherited from olb::ScalarVector< COLUMN::value_t, D, ptr >
using type
 
- Public Types inherited from olb::GenericVector< T, D, IMPL >
using value_type = T
 
- Static Public Member Functions inherited from olb::GenericVector< T, D, IMPL >
static constexpr unsigned size ()
 
- Static Public Attributes inherited from olb::GenericVector< T, D, IMPL >
static constexpr unsigned d = D
 

Detailed Description

template<typename COLUMN, unsigned D>
class olb::ColumnVector< COLUMN, D >::ptr

Proxy for accessing a column vector entry.

Definition at line 226 of file columnVector.h.

Constructor & Destructor Documentation

◆ ptr() [1/2]

template<typename COLUMN , unsigned D>
olb::ColumnVector< COLUMN, D >::ptr::ptr ( ColumnVector< COLUMN, D > & columns,
std::size_t index )
inline

Definition at line 244 of file columnVector.h.

244 :
245 _data(columns),
246 _index(index) { }

◆ ptr() [2/2]

template<typename COLUMN , unsigned D>
olb::ColumnVector< COLUMN, D >::ptr::ptr ( ptr && rhs)
inline

Definition at line 248 of file columnVector.h.

248 :
249 _data(rhs._data),
250 _index(rhs._index) { }

Member Function Documentation

◆ getComponentPointer() [1/2]

template<typename COLUMN , unsigned D>
COLUMN::value_t * olb::ColumnVector< COLUMN, D >::ptr::getComponentPointer ( unsigned iDim)
inlineprotected

Definition at line 238 of file columnVector.h.

239 {
240 return &_data[iDim][_index];
241 }

◆ getComponentPointer() [2/2]

template<typename COLUMN , unsigned D>
const COLUMN::value_t * olb::ColumnVector< COLUMN, D >::ptr::getComponentPointer ( unsigned iDim) const
inlineprotected

Definition at line 234 of file columnVector.h.

235 {
236 return &_data[iDim][_index];
237 }

◆ getIndex()

template<typename COLUMN , unsigned D>
std::size_t olb::ColumnVector< COLUMN, D >::ptr::getIndex ( ) const
inline

Definition at line 261 of file columnVector.h.

262 {
263 return _index;
264 }

◆ getSize()

template<typename COLUMN , unsigned D>
unsigned olb::ColumnVector< COLUMN, D >::ptr::getSize ( ) const
inline

Definition at line 271 of file columnVector.h.

272 {
273 return D;
274 }

◆ operator=()

template<typename COLUMN , unsigned D>
template<typename U , typename IMPL >
ptr & olb::ColumnVector< COLUMN, D >::ptr::operator= ( const GenericVector< U, D, IMPL > & rhs)
inline

Definition at line 253 of file columnVector.h.

254 {
255 for (unsigned iDim=0; iDim < D; ++iDim) {
256 this->operator[](iDim) = rhs[iDim];
257 }
258 return *this;
259 }
const COLUMN & operator[](unsigned iDim) const

◆ setIndex()

template<typename COLUMN , unsigned D>
void olb::ColumnVector< COLUMN, D >::ptr::setIndex ( std::size_t index)
inline

Definition at line 266 of file columnVector.h.

267 {
268 _index = index;
269 }

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