OpenLB 1.8.1
Loading...
Searching...
No Matches
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)
 
const COLUMN::value_t * getComponentPointer (unsigned iDim) const
 
COLUMN::value_t * getComponentPointer (unsigned iDim)
 
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< COLUMN::value_t, D, ptr >
constexpr GenericVector ()=default
 
 GenericVector (const GenericVector &)=delete
 
 GenericVector (GenericVector &&)=delete
 
GenericVectoroperator= (GenericVector &&rhs)=delete
 
constexpr ptr & operator= (const GenericVector< COLUMN::value_t, D, IMPL_ > &rhs) any_platform
 
constexpr const COLUMN::value_t & operator[] (unsigned iDim) const any_platform
 
constexpr COLUMN::value_t & operator[] (unsigned iDim) any_platform
 
constexpr ptr & operator+= (const GenericVector< U, D, IMPL_ > &rhs) any_platform
 
constexpr meta::enable_if_arithmetic_t< U, ptr & > operator+= (const U &rhs) any_platform
 
constexpr ptr & operator-= (const GenericVector< COLUMN::value_t, D, IMPL_ > &rhs) any_platform
 
constexpr meta::enable_if_arithmetic_t< U, ptr & > operator-= (const U &rhs) any_platform
 
constexpr ptr & operator*= (const GenericVector< U, D, IMPL_ > &rhs) any_platform
 
constexpr meta::enable_if_arithmetic_t< U, ptr & > operator*= (const U &rhs) any_platform
 
constexpr meta::enable_if_arithmetic_t< U, ptr & > operator/= (const U &rhs) any_platform
 
constexpr bool operator== (const GenericVector< COLUMN::value_t, D, IMPL_ > &rhs) const any_platform
 
constexpr bool operator!= (const GenericVector< COLUMN::value_t, D, IMPL_ > &rhs) const any_platform
 
constexpr bool operator!= (COLUMN::value_t rhs) const any_platform
 

Additional Inherited Members

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

Detailed Description

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

Proxy for accessing a column vector entry.

Definition at line 227 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 237 of file columnVector.h.

237 :
238 _data(columns),
239 _index(index) { }

◆ ptr() [2/2]

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

Definition at line 241 of file columnVector.h.

241 :
242 _data(rhs._data),
243 _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)
inline

Definition at line 250 of file columnVector.h.

251 {
252 return &_data[iDim][_index];
253 }

◆ getComponentPointer() [2/2]

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

Definition at line 245 of file columnVector.h.

246 {
247 return &_data[iDim][_index];
248 }

◆ getIndex()

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

Definition at line 264 of file columnVector.h.

265 {
266 return _index;
267 }

◆ getSize()

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

Definition at line 274 of file columnVector.h.

275 {
276 return D;
277 }

◆ 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 256 of file columnVector.h.

257 {
258 for (unsigned iDim=0; iDim < D; ++iDim) {
259 this->operator[](iDim) = rhs[iDim];
260 }
261 return *this;
262 }
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 269 of file columnVector.h.

270 {
271 _index = index;
272 }

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