COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
Public Types | Public Member Functions | Private Attributes | List of all members
ArrayBase< ValueT > Class Template Reference

#include <ArrayBase.hpp>

Public Types

typedef ValueT value_type
 
typedef boost::multi_array< ValueT, 2 > ArrayT
 
typedef boost::subarray_gen< ArrayT, 1 >::type Row
 
typedef const boost::const_subarray_gen< ArrayT, 1 >::type ConstRow
 
typedef ArrayBufferT< ValueT > Buffer
 

Public Member Functions

void initialize (const Uint nb_cols)
 Initialize the array with a fixed column size and remove all existing rows, if any. More...
 
void resize (const Uint nb_rows)
 Resize the array to the given number of rows. More...
 
ArrayTarray ()
 
const ArrayTarray () const
 
Buffer create_buffer (const size_t buffersize=16384)
 
Row operator[] (const Uint idx)
 
ConstRow operator[] (const Uint idx) const
 
Uint size () const
 
Uint row_size () const
 
template<typename VectorT >
void set_row (const Uint array_idx, const VectorT &row)
 

Private Attributes

ArrayT m_array
 storage of the array More...
 

Detailed Description

template<typename ValueT>
class cf3::common::ArrayBase< ValueT >

Base class for 2-dimensional array data

Author
Willem Deconinck, Tiago Quintino, Bart Janssens

Definition at line 23 of file ArrayBase.hpp.

Member Typedef Documentation

typedef boost::multi_array<ValueT,2> ArrayT

Definition at line 27 of file ArrayBase.hpp.

typedef ArrayBufferT<ValueT> Buffer

Definition at line 30 of file ArrayBase.hpp.

typedef const boost::const_subarray_gen<ArrayT,1>::type ConstRow

Definition at line 29 of file ArrayBase.hpp.

typedef boost::subarray_gen<ArrayT,1>::type Row

Definition at line 28 of file ArrayBase.hpp.

typedef ValueT value_type

Definition at line 26 of file ArrayBase.hpp.

Member Function Documentation

ArrayT& array ( )
inline
Returns
A reference to the array data

Definition at line 47 of file ArrayBase.hpp.

const ArrayT& array ( ) const
inline
Returns
A const reference to the array data

Definition at line 50 of file ArrayBase.hpp.

Buffer create_buffer ( const size_t  buffersize = 16384)
inline
Returns
A Buffer object that can fill this Array

Definition at line 53 of file ArrayBase.hpp.

void initialize ( const Uint  nb_cols)
inline

Initialize the array with a fixed column size and remove all existing rows, if any.

Definition at line 35 of file ArrayBase.hpp.

Row operator[] ( const Uint  idx)
inline
Returns
A mutable row of the underlying array

Definition at line 61 of file ArrayBase.hpp.

ConstRow operator[] ( const Uint  idx) const
inline
Returns
A const row of the underlying array

Definition at line 64 of file ArrayBase.hpp.

void resize ( const Uint  nb_rows)
inline

Resize the array to the given number of rows.

Definition at line 41 of file ArrayBase.hpp.

Uint row_size ( ) const
inline
Returns
The number of elements in each row, i.e. the number of columns of the array

Definition at line 70 of file ArrayBase.hpp.

void set_row ( const Uint  array_idx,
const VectorT &  row 
)
inline

copy a given row into the array

Parameters
[in]array_idxthe index of the row that will be set
[in]rowthe row that will be copied into the array

Definition at line 76 of file ArrayBase.hpp.

Uint size ( ) const
inline
Returns
The number of local rows in the array

Definition at line 67 of file ArrayBase.hpp.

Member Data Documentation

ArrayT m_array
private

storage of the array

Definition at line 89 of file ArrayBase.hpp.


The documentation for this class was generated from the following file:
Send comments to:
COOLFluiD Web Admin