VirtualFluids 0.2.0
Parallel CFD LBM Solver
Loading...
Searching...
No Matches
CbArray4D< T, IndexClass > Class Template Reference

4D Array More...

#include <CbArray4D.h>

Public Types

using CbArray4DPtr = SPtr< CbArray4D< T, IndexClass > >
 
using value_type = T
 
using indexer_type = IndexClass
 
using size_type = typename IndexClass::size_type
 
using reference = typename std::vector< value_type >::reference
 
using const_reference = typename std::vector< value_type >::const_reference
 
using pointer = typename std::vector< value_type >::pointer
 
using const_pointer = typename std::vector< value_type >::const_pointer
 

Public Member Functions

 CbArray4D ()
 
 CbArray4D (const size_type &nx1, const size_type &nx2, const size_type &nx3, const size_type &nx4)
 
 CbArray4D (const size_type &nx1, const size_type &nx2, const size_type &nx3, const size_type &nx4, const value_type &val)
 
 CbArray4D (const size_type &uniformDimensionSize)
 
 CbArray4D (std::vector< value_type > &vec, const size_type &nx1, const size_type &nx2, const size_type &nx3, const size_type &nx4)
 
 CbArray4D (const CbArray4D &src)
 
template<typename value_type2 >
 CbArray4D (const CbArray4D< value_type2 > &src)
 
virtual ~CbArray4D ()=default
 
CbArray4D & operator= (const CbArray4D &rhs)
 
template<typename value_type2 , typename IndexClass2 >
CbArray4D & operator= (const CbArray4D< value_type2, IndexClass2 > &rhs)
 
bool operator== (const CbArray4D &rhs) const
 
template<typename value_type2 , typename IndexClass2 >
bool operator== (const CbArray4D< value_type2, IndexClass2 > &rhs) const
 
bool operator!= (const CbArray4D &rhs) const
 
template<typename value_type2 , typename IndexClass2 >
bool operator!= (const CbArray4D< value_type2, IndexClass2 > &rhs) const
 
reference operator() (const size_type &x1, const size_type &x2, const size_type &x3, const size_type &x4)
 
const_reference operator() (const size_type &x1, const size_type &x2, const size_type &x3, const size_type &x4) const
 
pointer getStartAdressOfSortedArray (const size_type &x1, const size_type &x2, const size_type &x3, const size_type &x4)
 
const_pointer getStartAdressOfSortedArray (const size_type &x1, const size_type &x2, const size_type &x3, const size_type &x4) const
 
void setObject (const size_type &x1, const size_type &x2, const size_type &x3, const size_type &x4, const value_type &value)
 
reference getObject (const size_type &x1, const size_type &x2, const size_type &x3, const size_type &x4)
 
const_reference getObject (const size_type &x1, const size_type &x2, const size_type &x3, const size_type &x4) const
 
bool isEmpty () const
 
size_type getNX1 () const
 
size_type getNX2 () const
 
size_type getNX3 () const
 
size_type getNX4 () const
 
void reset (const value_type &val)
 
std::string toString () const
 
std::string getInfo () const
 
void resize (const size_type &uniformDimensionSize)
 
void resize (const size_type &nx1, const size_type &nx2, const size_type &nx3, const size_type &nx4)
 
void resize (const size_type &nx1, const size_type &nx2, const size_type &nx3, const size_type &nx4, const value_type &val)
 
std::vector< value_type > & getDataVector ()
 
const std::vector< value_type > & getDataVector () const
 
std::size_t getDataVectorIndex (const size_type &x1, const size_type &x2, const size_type &x3, const size_type &x4) const
 

Protected Member Functions

bool indicesInRange (const size_type &x1, const size_type &x2, const size_type &x3, const size_type &x4) const
 
std::string getExceptionErrorString (const size_type &x1, const size_type &x2, const size_type &x3, const size_type &x4) const
 

Protected Attributes

size_type nx1
 
size_type nx2
 
size_type nx3
 
size_type nx4
 
indexer_type indexer
 
std::vector< value_type > data
 

Friends

template<typename value_type2 , typename IndexClass2 >
class CbArray4D
 

Detailed Description

template<typename T, typename IndexClass = IndexerX4X3X2X1>
class CbArray4D< T, IndexClass >

4D Array

The data is stored in a vector

Rangecheck active, if:

-debug : not defined "VF_NO_RANGECHECK"

-release: not defined "VF_NO_RANGECHECK" && defined "VF_RANGECHECK"

Definition at line 118 of file CbArray4D.h.

Member Typedef Documentation

◆ CbArray4DPtr

template<typename T , typename IndexClass = IndexerX4X3X2X1>
using CbArray4D< T, IndexClass >::CbArray4DPtr = SPtr<CbArray4D<T, IndexClass> >

Definition at line 121 of file CbArray4D.h.

◆ const_pointer

template<typename T , typename IndexClass = IndexerX4X3X2X1>
using CbArray4D< T, IndexClass >::const_pointer = typename std::vector<value_type>::const_pointer

Definition at line 129 of file CbArray4D.h.

◆ const_reference

template<typename T , typename IndexClass = IndexerX4X3X2X1>
using CbArray4D< T, IndexClass >::const_reference = typename std::vector<value_type>::const_reference

Definition at line 127 of file CbArray4D.h.

◆ indexer_type

template<typename T , typename IndexClass = IndexerX4X3X2X1>
using CbArray4D< T, IndexClass >::indexer_type = IndexClass

Definition at line 124 of file CbArray4D.h.

◆ pointer

template<typename T , typename IndexClass = IndexerX4X3X2X1>
using CbArray4D< T, IndexClass >::pointer = typename std::vector<value_type>::pointer

Definition at line 128 of file CbArray4D.h.

◆ reference

template<typename T , typename IndexClass = IndexerX4X3X2X1>
using CbArray4D< T, IndexClass >::reference = typename std::vector<value_type>::reference

Definition at line 126 of file CbArray4D.h.

◆ size_type

template<typename T , typename IndexClass = IndexerX4X3X2X1>
using CbArray4D< T, IndexClass >::size_type = typename IndexClass::size_type

Definition at line 125 of file CbArray4D.h.

◆ value_type

template<typename T , typename IndexClass = IndexerX4X3X2X1>
using CbArray4D< T, IndexClass >::value_type = T

Definition at line 123 of file CbArray4D.h.

Constructor & Destructor Documentation

◆ CbArray4D() [1/7]

template<typename T , typename IndexClass = IndexerX4X3X2X1>
CbArray4D< T, IndexClass >::CbArray4D ( )
inline

Definition at line 137 of file CbArray4D.h.

◆ CbArray4D() [2/7]

template<typename T , typename IndexClass = IndexerX4X3X2X1>
CbArray4D< T, IndexClass >::CbArray4D ( const size_type &  nx1,
const size_type &  nx2,
const size_type &  nx3,
const size_type &  nx4 
)
inline

Definition at line 139 of file CbArray4D.h.

◆ CbArray4D() [3/7]

template<typename T , typename IndexClass = IndexerX4X3X2X1>
CbArray4D< T, IndexClass >::CbArray4D ( const size_type &  nx1,
const size_type &  nx2,
const size_type &  nx3,
const size_type &  nx4,
const value_type &  val 
)
inline

Definition at line 144 of file CbArray4D.h.

◆ CbArray4D() [4/7]

template<typename T , typename IndexClass = IndexerX4X3X2X1>
CbArray4D< T, IndexClass >::CbArray4D ( const size_type &  uniformDimensionSize)
inline

Definition at line 150 of file CbArray4D.h.

◆ CbArray4D() [5/7]

template<typename T , typename IndexClass = IndexerX4X3X2X1>
CbArray4D< T, IndexClass >::CbArray4D ( std::vector< value_type > &  vec,
const size_type &  nx1,
const size_type &  nx2,
const size_type &  nx3,
const size_type &  nx4 
)
inline

Definition at line 156 of file CbArray4D.h.

◆ CbArray4D() [6/7]

template<typename T , typename IndexClass = IndexerX4X3X2X1>
CbArray4D< T, IndexClass >::CbArray4D ( const CbArray4D< T, IndexClass > &  src)
inline

Definition at line 164 of file CbArray4D.h.

◆ CbArray4D() [7/7]

template<typename T , typename IndexClass = IndexerX4X3X2X1>
template<typename value_type2 >
CbArray4D< T, IndexClass >::CbArray4D ( const CbArray4D< value_type2 > &  src)
inline

Definition at line 167 of file CbArray4D.h.

◆ ~CbArray4D()

template<typename T , typename IndexClass = IndexerX4X3X2X1>
virtual CbArray4D< T, IndexClass >::~CbArray4D ( )
virtualdefault

Member Function Documentation

◆ getDataVector() [1/2]

template<typename T , typename IndexClass = IndexerX4X3X2X1>
std::vector< value_type > & CbArray4D< T, IndexClass >::getDataVector ( )
inline

Definition at line 393 of file CbArray4D.h.

◆ getDataVector() [2/2]

template<typename T , typename IndexClass = IndexerX4X3X2X1>
const std::vector< value_type > & CbArray4D< T, IndexClass >::getDataVector ( ) const
inline

Definition at line 395 of file CbArray4D.h.

◆ getDataVectorIndex()

template<typename T , typename IndexClass = IndexerX4X3X2X1>
std::size_t CbArray4D< T, IndexClass >::getDataVectorIndex ( const size_type &  x1,
const size_type &  x2,
const size_type &  x3,
const size_type &  x4 
) const
inline

Definition at line 397 of file CbArray4D.h.

◆ getExceptionErrorString()

template<typename T , typename IndexClass = IndexerX4X3X2X1>
std::string CbArray4D< T, IndexClass >::getExceptionErrorString ( const size_type &  x1,
const size_type &  x2,
const size_type &  x3,
const size_type &  x4 
) const
inlineprotected

Definition at line 421 of file CbArray4D.h.

◆ getInfo()

template<typename T , typename IndexClass = IndexerX4X3X2X1>
std::string CbArray4D< T, IndexClass >::getInfo ( ) const
inline

Definition at line 361 of file CbArray4D.h.

◆ getNX1()

template<typename T , typename IndexClass = IndexerX4X3X2X1>
size_type CbArray4D< T, IndexClass >::getNX1 ( ) const
inline

Definition at line 334 of file CbArray4D.h.

◆ getNX2()

template<typename T , typename IndexClass = IndexerX4X3X2X1>
size_type CbArray4D< T, IndexClass >::getNX2 ( ) const
inline

Definition at line 335 of file CbArray4D.h.

◆ getNX3()

template<typename T , typename IndexClass = IndexerX4X3X2X1>
size_type CbArray4D< T, IndexClass >::getNX3 ( ) const
inline

Definition at line 336 of file CbArray4D.h.

◆ getNX4()

template<typename T , typename IndexClass = IndexerX4X3X2X1>
size_type CbArray4D< T, IndexClass >::getNX4 ( ) const
inline

Definition at line 337 of file CbArray4D.h.

◆ getObject() [1/2]

template<typename T , typename IndexClass = IndexerX4X3X2X1>
reference CbArray4D< T, IndexClass >::getObject ( const size_type &  x1,
const size_type &  x2,
const size_type &  x3,
const size_type &  x4 
)
inline

Definition at line 314 of file CbArray4D.h.

◆ getObject() [2/2]

template<typename T , typename IndexClass = IndexerX4X3X2X1>
const_reference CbArray4D< T, IndexClass >::getObject ( const size_type &  x1,
const size_type &  x2,
const size_type &  x3,
const size_type &  x4 
) const
inline

Definition at line 324 of file CbArray4D.h.

◆ getStartAdressOfSortedArray() [1/2]

template<typename T , typename IndexClass = IndexerX4X3X2X1>
pointer CbArray4D< T, IndexClass >::getStartAdressOfSortedArray ( const size_type &  x1,
const size_type &  x2,
const size_type &  x3,
const size_type &  x4 
)
inline

Definition at line 281 of file CbArray4D.h.

◆ getStartAdressOfSortedArray() [2/2]

template<typename T , typename IndexClass = IndexerX4X3X2X1>
const_pointer CbArray4D< T, IndexClass >::getStartAdressOfSortedArray ( const size_type &  x1,
const size_type &  x2,
const size_type &  x3,
const size_type &  x4 
) const
inline

Definition at line 292 of file CbArray4D.h.

◆ indicesInRange()

template<typename T , typename IndexClass = IndexerX4X3X2X1>
bool CbArray4D< T, IndexClass >::indicesInRange ( const size_type &  x1,
const size_type &  x2,
const size_type &  x3,
const size_type &  x4 
) const
inlineprotected

Definition at line 412 of file CbArray4D.h.

◆ isEmpty()

template<typename T , typename IndexClass = IndexerX4X3X2X1>
bool CbArray4D< T, IndexClass >::isEmpty ( ) const
inline

Definition at line 333 of file CbArray4D.h.

◆ operator!=() [1/2]

template<typename T , typename IndexClass = IndexerX4X3X2X1>
bool CbArray4D< T, IndexClass >::operator!= ( const CbArray4D< T, IndexClass > &  rhs) const
inline

Definition at line 253 of file CbArray4D.h.

◆ operator!=() [2/2]

template<typename T , typename IndexClass = IndexerX4X3X2X1>
bool CbArray4D< T, IndexClass >::operator!= ( const CbArray4D< value_type2, IndexClass2 > &  rhs) const
inline

Definition at line 256 of file CbArray4D.h.

◆ operator()() [1/2]

template<typename T , typename IndexClass = IndexerX4X3X2X1>
reference CbArray4D< T, IndexClass >::operator() ( const size_type &  x1,
const size_type &  x2,
const size_type &  x3,
const size_type &  x4 
)
inline

Definition at line 261 of file CbArray4D.h.

◆ operator()() [2/2]

template<typename T , typename IndexClass = IndexerX4X3X2X1>
const_reference CbArray4D< T, IndexClass >::operator() ( const size_type &  x1,
const size_type &  x2,
const size_type &  x3,
const size_type &  x4 
) const
inline

Definition at line 271 of file CbArray4D.h.

◆ operator=() [1/2]

template<typename T , typename IndexClass = IndexerX4X3X2X1>
CbArray4D & CbArray4D< T, IndexClass >::operator= ( const CbArray4D< T, IndexClass > &  rhs)
inline

Definition at line 177 of file CbArray4D.h.

◆ operator=() [2/2]

Definition at line 201 of file CbArray4D.h.

◆ operator==() [1/2]

template<typename T , typename IndexClass = IndexerX4X3X2X1>
bool CbArray4D< T, IndexClass >::operator== ( const CbArray4D< T, IndexClass > &  rhs) const
inline

Definition at line 223 of file CbArray4D.h.

◆ operator==() [2/2]

template<typename T , typename IndexClass = IndexerX4X3X2X1>
bool CbArray4D< T, IndexClass >::operator== ( const CbArray4D< value_type2, IndexClass2 > &  rhs) const
inline

Definition at line 237 of file CbArray4D.h.

◆ reset()

template<typename T , typename IndexClass = IndexerX4X3X2X1>
void CbArray4D< T, IndexClass >::reset ( const value_type &  val)
inline

Definition at line 339 of file CbArray4D.h.

◆ resize() [1/3]

template<typename T , typename IndexClass = IndexerX4X3X2X1>
void CbArray4D< T, IndexClass >::resize ( const size_type &  nx1,
const size_type &  nx2,
const size_type &  nx3,
const size_type &  nx4 
)
inline

Definition at line 374 of file CbArray4D.h.

◆ resize() [2/3]

template<typename T , typename IndexClass = IndexerX4X3X2X1>
void CbArray4D< T, IndexClass >::resize ( const size_type &  nx1,
const size_type &  nx2,
const size_type &  nx3,
const size_type &  nx4,
const value_type &  val 
)
inline

Definition at line 383 of file CbArray4D.h.

◆ resize() [3/3]

template<typename T , typename IndexClass = IndexerX4X3X2X1>
void CbArray4D< T, IndexClass >::resize ( const size_type &  uniformDimensionSize)
inline

Definition at line 369 of file CbArray4D.h.

◆ setObject()

template<typename T , typename IndexClass = IndexerX4X3X2X1>
void CbArray4D< T, IndexClass >::setObject ( const size_type &  x1,
const size_type &  x2,
const size_type &  x3,
const size_type &  x4,
const value_type &  value 
)
inline

Definition at line 303 of file CbArray4D.h.

◆ toString()

template<typename T , typename IndexClass = IndexerX4X3X2X1>
std::string CbArray4D< T, IndexClass >::toString ( ) const
inline

Definition at line 341 of file CbArray4D.h.

Friends And Related Symbol Documentation

◆ CbArray4D

template<typename T , typename IndexClass = IndexerX4X3X2X1>
friend class CbArray4D
friend

Definition at line 133 of file CbArray4D.h.

Member Data Documentation

◆ data

template<typename T , typename IndexClass = IndexerX4X3X2X1>
std::vector<value_type> CbArray4D< T, IndexClass >::data
protected

Definition at line 437 of file CbArray4D.h.

◆ indexer

template<typename T , typename IndexClass = IndexerX4X3X2X1>
indexer_type CbArray4D< T, IndexClass >::indexer
protected

Definition at line 436 of file CbArray4D.h.

◆ nx1

template<typename T , typename IndexClass = IndexerX4X3X2X1>
size_type CbArray4D< T, IndexClass >::nx1
protected

Definition at line 432 of file CbArray4D.h.

◆ nx2

template<typename T , typename IndexClass = IndexerX4X3X2X1>
size_type CbArray4D< T, IndexClass >::nx2
protected

Definition at line 433 of file CbArray4D.h.

◆ nx3

template<typename T , typename IndexClass = IndexerX4X3X2X1>
size_type CbArray4D< T, IndexClass >::nx3
protected

Definition at line 434 of file CbArray4D.h.

◆ nx4

template<typename T , typename IndexClass = IndexerX4X3X2X1>
size_type CbArray4D< T, IndexClass >::nx4
protected

Definition at line 435 of file CbArray4D.h.


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