COOLFluiD
Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
|
A Buffer that is constructed passing a boost::multi_array<T,2> table. This class allows to interface this table by using a buffer. More...
#include <ListBufferT.hpp>
Classes | |
struct | Buffer |
Public Types | |
typedef ListBufferIterator< ListBufferT > | iterator |
type of the iterator More... | |
typedef ListBufferIterator< ListBufferT const > | const_iterator |
type of the iterator to constant Component More... | |
typedef boost::multi_array< T, 1 > | Array_t |
typedef T | value_type |
Public Member Functions | |
ListBufferT (Array_t &array, size_t nbRows) | |
virtual | ~ListBufferT () |
Virtual destructor. More... | |
void | change_buffersize (const size_t nbRows) |
Change the buffer to the new size. More... | |
void | flush () |
flush the buffer in the connectivity Buffer More... | |
Uint | add_row (const value_type &val) |
Uint | add_row_directly (const value_type &val) |
void | set_row (const Uint array_idx, const value_type &row) |
value_type & | get_row (const Uint idx) |
void | rm_row (const Uint array_idx) |
Array_t & | get_appointed () |
Uint | total_allocated () |
Uint | buffers_count () const |
void | increase_array_size (const size_t increase) |
increase the size of the array, only to be used when going to write directly in array More... | |
iterator | begin () |
The begin iterator for a range containing Components. More... | |
iterator | end () |
The end iterator for a range containing Components. More... | |
const_iterator | begin () const |
The begin iterator for a range containing Components (const version) More... | |
const_iterator | end () const |
The end iterator for a range containing Components (const version) More... | |
void | reset () |
std::string | string () |
Static Public Member Functions | |
static std::string | type_name () |
Get the class name. More... | |
Private Member Functions | |
void | add_buffer () |
Create a new buffer, allocate it with m_buffersize, and fill m_new_buffer_rows with the new ones. More... | |
bool | is_array_row_empty (const Uint row) const |
Private Attributes | |
Array_t & | m_array |
reference to the array that is buffered More... | |
Uint | m_buffersize |
std::vector< Buffer > | m_buffers |
vector of temporary buffers More... | |
std::deque< Uint > | m_empty_array_rows |
storage of removed array rows More... | |
std::deque< Uint > | m_new_array_rows |
storage of array rows where rows can be added directly using add_row_directly More... | |
std::deque< Uint > | m_empty_buffer_rows |
storage of removed buffer rows More... | |
std::deque< Uint > | m_new_buffer_rows |
storage of buffer rows where rows can be added More... | |
A Buffer that is constructed passing a boost::multi_array<T,2> table. This class allows to interface this table by using a buffer.
The idea is to add and remove rows from the table through this buffer. The table is resized when the buffer is full, and values are copied from the buffer into the table.
Definition at line 39 of file ListBufferT.hpp.
typedef boost::multi_array<T,1> Array_t |
Definition at line 49 of file ListBufferT.hpp.
typedef ListBufferIterator<ListBufferT const> const_iterator |
type of the iterator to constant Component
Definition at line 46 of file ListBufferT.hpp.
typedef ListBufferIterator<ListBufferT> iterator |
type of the iterator
Definition at line 44 of file ListBufferT.hpp.
typedef T value_type |
Definition at line 50 of file ListBufferT.hpp.
ListBufferT | ( | Array_t & | array, |
size_t | nbRows | ||
) |
Contructor
array | The table that will be interfaced with |
nbRows | The size the buffer will be allocated with |
Definition at line 210 of file ListBufferT.hpp.
|
virtual |
Virtual destructor.
Definition at line 219 of file ListBufferT.hpp.
|
inlineprivate |
Create a new buffer, allocate it with m_buffersize, and fill m_new_buffer_rows with the new ones.
Definition at line 374 of file ListBufferT.hpp.
|
inline |
Add a row to the buffer.
[in] | val | value to be added to buffer |
Definition at line 386 of file ListBufferT.hpp.
|
inline |
Add a row directly to the array
[in] | val | value to be added to buffer or array |
Definition at line 399 of file ListBufferT.hpp.
|
inline |
The begin iterator for a range containing Components.
Definition at line 130 of file ListBufferT.hpp.
|
inline |
The begin iterator for a range containing Components (const version)
Definition at line 142 of file ListBufferT.hpp.
|
inline |
Definition at line 123 of file ListBufferT.hpp.
|
inline |
Change the buffer to the new size.
Definition at line 467 of file ListBufferT.hpp.
|
inline |
The end iterator for a range containing Components.
Definition at line 136 of file ListBufferT.hpp.
|
inline |
The end iterator for a range containing Components (const version)
Definition at line 148 of file ListBufferT.hpp.
void flush | ( | ) |
flush the buffer in the connectivity Buffer
Definition at line 239 of file ListBufferT.hpp.
|
inline |
Definition at line 117 of file ListBufferT.hpp.
|
inline |
Definition at line 337 of file ListBufferT.hpp.
|
inline |
increase the size of the array, only to be used when going to write directly in array
Definition at line 360 of file ListBufferT.hpp.
|
inlineprivate |
Definition at line 176 of file ListBufferT.hpp.
|
inline |
Definition at line 153 of file ListBufferT.hpp.
|
inline |
Mark row as empty in array or buffer
[in] | array_idx | the index of the row to be removed |
Definition at line 439 of file ListBufferT.hpp.
|
inline |
copy a given row into the array or buffer, depending on the given index
[in] | array_idx | the index of the row that will be set (both in array and buffers) |
[in] | row | the row that will be copied into the buffer or array |
Definition at line 411 of file ListBufferT.hpp.
|
inline |
Definition at line 475 of file ListBufferT.hpp.
|
inline |
Definition at line 228 of file ListBufferT.hpp.
|
inlinestatic |
Get the class name.
Definition at line 84 of file ListBufferT.hpp.
|
private |
reference to the array that is buffered
Definition at line 184 of file ListBufferT.hpp.
|
private |
vector of temporary buffers
Definition at line 191 of file ListBufferT.hpp.
|
private |
The size newly created buffers will have
Definition at line 188 of file ListBufferT.hpp.
|
private |
storage of removed array rows
Definition at line 194 of file ListBufferT.hpp.
|
private |
storage of removed buffer rows
Definition at line 200 of file ListBufferT.hpp.
|
private |
storage of array rows where rows can be added directly using add_row_directly
Definition at line 197 of file ListBufferT.hpp.
|
private |
storage of buffer rows where rows can be added
Definition at line 203 of file ListBufferT.hpp.
Send comments to: COOLFluiD Web Admin |