ESyS-Particle  2.3
NTBlock< T > Class Template Reference

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

#include <nt_block.h>

Public Types

typedef NTBlock_iter< T > iterator
 
typedef NTBlock_iter< T > const_iterator
 
typedef T value_type
 

Public Member Functions

 NTBlock ()
 
 NTBlock (NeighborTable< T > *, int, int, int, int, int, int)
 
unsigned int size ()
 
iterator begin ()
 
iterator end ()
 
unsigned int nparts_at_gridpoint (int x, int y, int z) const
 < number of particles at a given gridpoint More...
 
T * ptr (int, int, int, int)
 
T & ref (int, int, int, int)
 

Private Attributes

NeighborTable< T > * m_table
 
int m_xmin
 
int m_xmax
 
int m_ymin
 
int m_ymax
 
int m_zmin
 
int m_zmax
 

Friends

class NTBlock_iter< T >
 
bool operator== (const NTBlock &, const NTBlock &)
 
bool operator!= (const NTBlock &, const NTBlock &)
 
ostream & operator<< (ostream &, const NTBlock &)
 

Detailed Description

template<typename T>
class NTBlock< T >

representation of a slab of the search array of a NeigborTable

Member Typedef Documentation

template<typename T>
typedef NTBlock_iter<T> NTBlock< T >::const_iterator
template<typename T>
typedef NTBlock_iter<T> NTBlock< T >::iterator
template<typename T>
typedef T NTBlock< T >::value_type

Constructor & Destructor Documentation

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

construct empty block

template<typename T>
NTBlock< T >::NTBlock ( NeighborTable< T > *  t,
int  xmin,
int  xmax,
int  ymin,
int  ymax,
int  zmin,
int  zmax 
)

Construct a NTBlock from a pointer to a NeigborTable and the min and max inices in each dimension

Parameters
tthe pointer to the NeighborTable
xminthe minimum x index
xmaxthe maximum x index
yminthe minimum y index
ymaxthe maximum y index
zminthe minimum z index
zmaxthe maximum z index

Member Function Documentation

template<typename T>
unsigned int NTBlock< T >::nparts_at_gridpoint ( int  x,
int  y,
int  z 
) const
inline

< number of particles at a given gridpoint

References NeighborTable< T >::index(), and NeighborTable< T >::nparts_at_gridpoint().

Here is the call graph for this function:

template<typename T >
T * NTBlock< T >::ptr ( int  ix,
int  iy,
int  iz,
int  j 
)

Return an iterator pointing to the last particle in the slab

Todo:
check for end

Return an iterator pointing before the first particle in the slab

Return pointer to particle at index.

References NeighborTable< T >::index(), and NeighborTable< T >::ptr().

Here is the call graph for this function:

template<typename T >
T & NTBlock< T >::ref ( int  ix,
int  iy,
int  iz,
int  j 
)

Return reference to particle at index.

References NeighborTable< T >::index(), and NeighborTable< T >::ref().

Here is the call graph for this function:

template<typename T >
unsigned int NTBlock< T >::size ( )

get the number of particles in the block

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

Here is the caller graph for this function:

Friends And Related Function Documentation

template<typename T>
friend class NTBlock_iter< T >
friend
template<typename T>
bool operator!= ( const NTBlock< T > &  b1,
const NTBlock< T > &  b2 
)
friend

inequality operator

template<typename T>
ostream& operator<< ( ostream &  ost,
const NTBlock< T > &  NTB 
)
friend

output operator for NTBlock

Parameters
ostthe output stream
NTBthe NTBlock
template<typename T>
bool operator== ( const NTBlock< T > &  b1,
const NTBlock< T > &  b2 
)
friend

equality operator

Member Data Documentation

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

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

template<typename T>
int NTBlock< T >::m_xmax
private

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

template<typename T>
int NTBlock< T >::m_xmin
private

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

template<typename T>
int NTBlock< T >::m_ymax
private

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

template<typename T>
int NTBlock< T >::m_ymin
private

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

template<typename T>
int NTBlock< T >::m_zmax
private

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

template<typename T>
int NTBlock< T >::m_zmin
private

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


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