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

Public Types

typedef BufferT::iterator PosT
 

Public Member Functions

 NodePacker (const mesh::Dictionary &dict, BufferT &buffer)
 
std::ptrdiff_t size (const Uint nb_entries)
 Return the size needed for the given number of entries. More...
 
void reset (const PosT position)
 Reset the internal pointer to the given position. More...
 
PosT position () const
 Return the current position. More...
 
void pack_local_id (const Uint local_id)
 
void pack_global_id (const Uint global_id)
 
template<typename NumberT >
void pack_number (const NumberT &number)
 Pack a single number. More...
 

Private Types

typedef std::vector< char > BufferT
 
typedef Uint GidT
 
typedef Uint RankT
 

Private Attributes

const mesh::Dictionarym_dict
 
BufferTm_buffer
 
const Uint m_nb_fields
 
PosT m_position
 
std::ptrdiff_t m_entry_size
 
std::vector< std::ptrdiff_t > m_field_sizes
 

Static Private Attributes

static const Uint gid_size = sizeof(GidT)
 
static const Uint rank_size = sizeof(RankT)
 

Detailed Description

Helper class to pack nodes in a char buffer, including all related fields. Packing is as follows:

Definition at line 245 of file PHG.cpp.

Member Typedef Documentation

typedef std::vector<char> BufferT
private

Definition at line 247 of file PHG.cpp.

typedef Uint GidT
private

Definition at line 316 of file PHG.cpp.

typedef BufferT::iterator PosT

Definition at line 250 of file PHG.cpp.

typedef Uint RankT
private

Definition at line 317 of file PHG.cpp.

Constructor & Destructor Documentation

NodePacker ( const mesh::Dictionary dict,
BufferT buffer 
)
inline

Definition at line 252 of file PHG.cpp.

Member Function Documentation

void pack_global_id ( const Uint  global_id)
inline

Definition at line 299 of file PHG.cpp.

void pack_local_id ( const Uint  local_id)
inline

Definition at line 286 of file PHG.cpp.

void pack_number ( const NumberT &  number)
inline

Pack a single number.

Definition at line 308 of file PHG.cpp.

PosT position ( ) const
inline

Return the current position.

Definition at line 281 of file PHG.cpp.

void reset ( const PosT  position)
inline

Reset the internal pointer to the given position.

Definition at line 275 of file PHG.cpp.

std::ptrdiff_t size ( const Uint  nb_entries)
inline

Return the size needed for the given number of entries.

Definition at line 269 of file PHG.cpp.

Member Data Documentation

const Uint gid_size = sizeof(GidT)
staticprivate

Definition at line 319 of file PHG.cpp.

BufferT& m_buffer
private

Definition at line 324 of file PHG.cpp.

const mesh::Dictionary& m_dict
private

Definition at line 323 of file PHG.cpp.

std::ptrdiff_t m_entry_size
private

Definition at line 328 of file PHG.cpp.

std::vector<std::ptrdiff_t> m_field_sizes
private

Definition at line 329 of file PHG.cpp.

const Uint m_nb_fields
private

Definition at line 325 of file PHG.cpp.

PosT m_position
private

Definition at line 327 of file PHG.cpp.

const Uint rank_size = sizeof(RankT)
staticprivate

Definition at line 320 of file PHG.cpp.


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