ESyS-Particle  2.3.4
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

◆ const_iterator

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

◆ iterator

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

◆ value_type

template<typename T >
typedef T NTSlab< T >::value_type

Constructor & Destructor Documentation

◆ NTSlab() [1/2]

template<typename T >
NTSlab< T >::NTSlab

Construct an empty NTSlab

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

◆ NTSlab() [2/2]

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

◆ begin()

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:

◆ end()

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:

◆ erase() [1/2]

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

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

Here is the caller graph for this function:

◆ erase() [2/2]

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

◆ insert()

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:

◆ nparts_at_gridpoint()

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

◆ ptr()

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:

◆ rbegin()

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:

◆ ref()

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:

◆ rend()

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:

◆ size()

template<typename T >
unsigned int NTSlab< T >::size

get the number of particles in the slab

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

Here is the caller graph for this function:

◆ slab_size()

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

References NTSlab< T >::m_sl, and DSlice::size().

Referenced by operator<<().

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator!=

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

◆ operator<<

template<typename T >
ostream& operator<< ( ostream &  ost,
const NTSlab< T > &  NTS 
)
friend

output operator for NTSlab

Parameters
ostthe output stream
NTSthe NTSlab

◆ operator==

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

Member Data Documentation

◆ m_sl

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

◆ m_table

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

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