ESyS-Particle  2.3
NTSlab< T > Class Template Reference

representation of a slab of the search array of a NeigborTable More...

#include <nt_slab.h>

Collaboration diagram for NTSlab< T >:

Public Types

typedef NTSlab_iter< T > iterator
 
typedef NTSlab_iter< T > const_iterator
 
typedef T value_type
 

Public Member Functions

 NTSlab ()
 
 NTSlab (NeighborTable< T > *, DSlice)
 
unsigned int slab_size () const
 
unsigned int size () const
 
iterator begin ()
 
iterator end ()
 
iterator rbegin ()
 
iterator rend ()
 number of particles at a given gridpoint More...
 
unsigned int nparts_at_gridpoint (unsigned int idx) const
 
T * ptr (typename NeighborTable< T >::indextype)
 
T & ref (typename NeighborTable< T >::indextype)
 
void insert (iterator, const T &)
 
void erase (iterator)
 
void erase (iterator, iterator)
 

Private Attributes

NeighborTable< T > * m_table
 
DSlice m_sl
 

Friends

bool operator== (const NTSlab &, const NTSlab &)
 
bool operator!= (const NTSlab &, const NTSlab &)
 
ostream & operator<< (ostream &, const NTSlab &)
 

Detailed Description

template<typename T>
class NTSlab< T >

representation of a slab of the search array of a NeigborTable

Member Typedef Documentation

template<typename T>
typedef NTSlab_iter<T> NTSlab< T >::const_iterator
template<typename T>
typedef NTSlab_iter<T> NTSlab< T >::iterator
template<typename T>
typedef T NTSlab< T >::value_type

Constructor & Destructor Documentation

template<typename T >
NTSlab< T >::NTSlab ( )

Construct an empty NTSlab

References NTSlab< T >::m_table, and NULL.

template<typename T>
NTSlab< T >::NTSlab ( NeighborTable< T > *  t,
DSlice  s 
)

Construct a NTSlab from a pointer to a NeigborTable and an valarray slice

Parameters
athe pointer to the search array
sthe DSlice containing the slab parameters

Member Function Documentation

template<typename T >
NTSlab< T >::iterator NTSlab< T >::begin ( )

Return an iterator pointing to the first particle in the slab

Todo:
check for end

Referenced by ParallelParticleArray< T >::exchange_single(), ParallelParticleArray< T >::get2ndSlabIds(), ParallelParticleArray< T >::getBoundarySlabIds(), main(), and ParallelParticleArray< T >::rebuild().

Here is the caller graph for this function:

template<typename T >
NTSlab< T >::iterator NTSlab< T >::end ( )

Return an iterator pointing past the last particle in the slab

Referenced by ParallelParticleArray< T >::exchange_single(), ParallelParticleArray< T >::get2ndSlabIds(), ParallelParticleArray< T >::getBoundarySlabIds(), main(), and ParallelParticleArray< T >::rebuild().

Here is the caller graph for this function:

template<typename T>
void NTSlab< T >::erase ( iterator  )

Referenced by ParallelParticleArray< T >::rebuild().

Here is the caller graph for this function:

template<typename T>
void NTSlab< T >::erase ( iterator  ,
iterator   
)
template<typename T>
void NTSlab< T >::insert ( iterator  ,
const T &   
)

Insert single item. The iterator parameter is only there to ensure inteface compatibility with STL containers and ignored otherwise.

Parameters
datathe item to be inserted

Referenced by main().

Here is the caller graph for this function:

template<typename T>
unsigned int NTSlab< T >::nparts_at_gridpoint ( unsigned int  idx) const
inline

References NeighborTable< T >::nparts_at_gridpoint().

Here is the call graph for this function:

template<typename T>
T * NTSlab< T >::ptr ( typename NeighborTable< T >::indextype  idx)

Return pointer to particle at index. Does the translation from the slab index to the array index.

Parameters
idxthe index

References NeighborTable< T >::ptr().

Here is the call graph for this function:

template<typename T >
NTSlab< T >::iterator NTSlab< T >::rbegin ( )

Return an iterator pointing to the last particle in the slab

Todo:
check for end

Referenced by main().

Here is the caller graph for this function:

template<typename T>
T & NTSlab< T >::ref ( typename NeighborTable< T >::indextype  idx)

Return reference to particle at index. Does the translation from the slab index to the array index.

Parameters
idxthe index

References NeighborTable< T >::ref().

Here is the call graph for this function:

template<typename T >
NTSlab< T >::iterator NTSlab< T >::rend ( )

number of particles at a given gridpoint

Return an iterator pointing before the first particle in the slab

Referenced by main().

Here is the caller graph for this function:

template<typename T >
unsigned int NTSlab< T >::size ( ) const

get the number of particles in the slab

Referenced by ParallelParticleArray< T >::exchange_single(), and main().

Here is the caller graph for this function:

template<typename T>
unsigned int NTSlab< T >::slab_size ( ) const
inline

References DSlice::size().

Here is the call graph for this function:

Friends And Related Function Documentation

template<typename T>
bool operator!= ( const NTSlab< T > &  s1,
const NTSlab< T > &  s2 
)
friend
template<typename T>
ostream& operator<< ( ostream &  ost,
const NTSlab< T > &  NTS 
)
friend

output operator for NTSlab

Parameters
ostthe output stream
NTSthe NTSlab
template<typename T>
bool operator== ( const NTSlab< T > &  s1,
const NTSlab< T > &  s2 
)
friend

Member Data Documentation

template<typename T>
DSlice NTSlab< T >::m_sl
private

Referenced by operator!=(), and operator==().

template<typename T>
NeighborTable<T>* NTSlab< T >::m_table
private

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