$treeview $search $mathjax
Palabos  Version 1.1
$projectbrief
$projectbrief
$searchbox

plb::Array< T, size > Class Template Reference

#include <array.h>

Inheritance diagram for plb::Array< T, size >:
Collaboration diagram for plb::Array< T, size >:

List of all members.

Public Member Functions

 Array ()
template<typename U >
 Array (Array< U, size > const &rhs)
template<typename U >
Array< T, size > & operator= (Array< U, size > const &rhs)
T & operator[] (pluint index)
T const & operator[] (pluint index) const
void from_cArray (T const *cArray)
void to_cArray (T *cArray) const
void resetToZero ()
Array< T, size > & operator+= (Array< T, size > const &b)
Array< T, size > & operator+= (T alpha)
Array< T, size > & operator-= (Array< T, size > const &b)
Array< T, size > & operator-= (T alpha)
Array< T, size > & operator*= (Array< T, size > const &b)
Array< T, size > & operator*= (T alpha)
Array< T, size > & operator/= (Array< T, size > const &b)
Array< T, size > & operator/= (T alpha)

Detailed Description

template<typename T, pluint size>
class plb::Array< T, size >

A simple array class, which is slightly more convenient to use than the pure C-array. It initializes the data to zero in the default constructor, can be assigned from an Array of different type, contains bound verifications for debugging, and is specialized for the 2D and 3D case.

ATTENTION: Values are not reset to zero in the constructor, for efficiency reason. If you need them to default to zero, you need to invoke method resetToZero() explicitly.


Constructor & Destructor Documentation

template<typename T, pluint size>
plb::Array< T, size >::Array (  )  [inline]
template<typename T, pluint size>
template<typename U >
plb::Array< T, size >::Array ( Array< U, size > const &  rhs  )  [inline]

Copy-construction is only allowed with same-size Arrays, to prevent bugs due to cutting off one of the arrays.


Member Function Documentation

template<typename T, pluint size>
Array<T,size>& plb::Array< T, size >::operator*= ( alpha  )  [inline]
template<typename T, pluint size>
Array<T,size>& plb::Array< T, size >::operator*= ( Array< T, size > const &  b  )  [inline]
template<typename T, pluint size>
Array<T,size>& plb::Array< T, size >::operator+= ( alpha  )  [inline]
template<typename T, pluint size>
Array<T,size>& plb::Array< T, size >::operator+= ( Array< T, size > const &  b  )  [inline]
template<typename T, pluint size>
Array<T,size>& plb::Array< T, size >::operator-= ( alpha  )  [inline]
template<typename T, pluint size>
Array<T,size>& plb::Array< T, size >::operator-= ( Array< T, size > const &  b  )  [inline]
template<typename T, pluint size>
Array<T,size>& plb::Array< T, size >::operator/= ( alpha  )  [inline]
template<typename T, pluint size>
Array<T,size>& plb::Array< T, size >::operator/= ( Array< T, size > const &  b  )  [inline]
template<typename T, pluint size>
template<typename U >
Array<T,size>& plb::Array< T, size >::operator= ( Array< U, size > const &  rhs  )  [inline]

Assignment is only allowed with same-size Arrays, to prevent bugs due to cutting off one of the arrays.

template<typename T, pluint size>
T const& plb::Array< T, size >::operator[] ( pluint  index  )  const [inline]
template<typename T, pluint size>
T& plb::Array< T, size >::operator[] ( pluint  index  )  [inline]
template<typename T, pluint size>
void plb::Array< T, size >::resetToZero (  )  [inline]

Referenced by plb::MultiTensorField3D< T, nDim >::clone(), plb::MultiTensorField2D< T, nDim >::clone(), plb::IncGuoExternalForceSmagorinskyBGKdynamics< T, Descriptor >::collide(), plb::GuoExternalForceSmagorinskyBGKdynamics< T, Descriptor >::collide(), plb::MomentumExchangeBounceBack< T, Descriptor >::collide(), plb::defaultGenerateMultiTensorField2D(), plb::defaultGenerateMultiTensorField3D(), plb::freeSurfaceCompletionImplementation3D(), plb::ShanChenSingleComponentProcessor3D< T, Descriptor >::process(), plb::ShanChenSingleComponentProcessor2D< T, Descriptor >::process(), plb::TensorInterpolateCoarseToFine3D< T, nDim >::process(), plb::TensorInterpolateCoarseToFine2D< T, nDim >::process(), plb::StoreSurfaceNormal3D< T, Descriptor >::process(), plb::FreeSurfaceFadingArea3D< T, Descriptor >::process(), plb::CopyCoarseToFineBoundaryCubicInterp2D< T, Descriptor1, Descriptor2 >::process(), plb::CopyCoarseToFineCubicInterpWithDeconvolution2D< T, Descriptor1, Descriptor2 >::process(), plb::CopyCoarseToFineCubicInterp2D< T, Descriptor1, Descriptor2 >::process(), plb::CopyCoarseToFineBoundaryLinearInterp2D< T, Descriptor1, Descriptor2 >::process(), plb::CopyCoarseToFineLinearInterp2D< T, Descriptor1, Descriptor2 >::process(), plb::XMLreaderProxy::read(), plb::StoreDensityAndVelocityDynamics< T, Descriptor >::StoreDensityAndVelocityDynamics(), plb::StoreTemperatureAndVelocityDynamics< T, Descriptor >::StoreTemperatureAndVelocityDynamics(), and plb::StoreVelocityDynamics< T, Descriptor >::StoreVelocityDynamics().


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