ESyS-Particle  2.3.4
TTempPartStore< T > Class Template Reference

class for the temporary storage and distribution of particle data More...

#include <TempPartStore.h>

Inheritance diagram for TTempPartStore< T >:
Collaboration diagram for TTempPartStore< T >:

Public Member Functions

 TTempPartStore (const Vec3 &, const Vec3 &, int, int, int)
 
virtual void addSlaveID (int, int, int, int)
 
virtual void addParticle (const T &)
 
virtual void addConnection (int, int, int)
 
const multimap< int, T > & getMap () const
 
- Public Member Functions inherited from ATempPartStore
virtual ~ATempPartStore ()
 

Private Member Functions

int coordsToIndex (int, int, int)
 
int posToIndex (const Vec3 &)
 

Private Attributes

multimap< int, T > m_mmap
 
map< int, typename multimap< int, T >::iterator > m_by_id
 
map< int, int > m_slave_id_map
 
double m_xmin
 
double m_xsize
 
double m_ymin
 
double m_ysize
 
double m_zmin
 
double m_zsize
 
int m_nx
 
int m_ny
 
int m_nz
 

Detailed Description

template<typename T>
class TTempPartStore< T >

class for the temporary storage and distribution of particle data

Constructor & Destructor Documentation

◆ TTempPartStore()

template<typename T >
TTempPartStore< T >::TTempPartStore ( const Vec3 min,
const Vec3 max,
int  nx,
int  ny,
int  nz 
)

Construct a new TTempPartStore

Parameters
minminimum corner of the volume
maxmaximum corner of the volume
nxnr. of slaves in x-direction
nynr. of slaves in y-direction
nznr. of slaves in z-direction

References Vec3::X(), Vec3::Y(), and Vec3::Z().

Here is the call graph for this function:

Member Function Documentation

◆ addConnection()

template<typename T >
void TTempPartStore< T >::addConnection ( int  id1,
int  id2,
int  tag 
)
virtual

add a connection between2 particles to the storage

Parameters
id1the Id of the first particle
id2the Id of the second particle
tagthe connection tag
Warning
not implemented

Implements ATempPartStore.

◆ addParticle()

template<typename T >
void TTempPartStore< T >::addParticle ( const T &  p)
virtual

add a new particle to the storage

Parameters
pthe particle

◆ addSlaveID()

template<typename T >
void TTempPartStore< T >::addSlaveID ( int  cx,
int  cy,
int  cz,
int  rank 
)
virtual

add a new slave to the coordinate->rank mapping table

Parameters
cxx-coordinate of the slave
cyy-coordinate of the slave
czz-coordinate of the slave
rankthe rank of the slave (in MPI_COMM_WORLD)

Implements ATempPartStore.

◆ coordsToIndex()

template<typename T >
int TTempPartStore< T >::coordsToIndex ( int  x,
int  y,
int  z 
)
private

helper function which translates block coordinates into an index

Parameters
xthe x coordinate
ythe y coordinate
zthe z coordinate
Returns
the index

◆ getMap()

template<typename T >
const multimap<int,T>& TTempPartStore< T >::getMap ( ) const
inline

◆ posToIndex()

template<typename T >
int TTempPartStore< T >::posToIndex ( const Vec3 pos)
private

helper function which returns the index of the block in which a given point is located.

Parameters
posthe position of the point
Returns
the index

References Vec3::X(), Vec3::Y(), and Vec3::Z().

Here is the call graph for this function:

Member Data Documentation

◆ m_by_id

template<typename T >
map<int,typename multimap<int,T>::iterator> TTempPartStore< T >::m_by_id
private

◆ m_mmap

template<typename T >
multimap<int,T> TTempPartStore< T >::m_mmap
private

◆ m_nx

template<typename T >
int TTempPartStore< T >::m_nx
private

◆ m_ny

template<typename T >
int TTempPartStore< T >::m_ny
private

◆ m_nz

template<typename T >
int TTempPartStore< T >::m_nz
private

◆ m_slave_id_map

template<typename T >
map<int,int> TTempPartStore< T >::m_slave_id_map
private

◆ m_xmin

template<typename T >
double TTempPartStore< T >::m_xmin
private

◆ m_xsize

template<typename T >
double TTempPartStore< T >::m_xsize
private

◆ m_ymin

template<typename T >
double TTempPartStore< T >::m_ymin
private

◆ m_ysize

template<typename T >
double TTempPartStore< T >::m_ysize
private

◆ m_zmin

template<typename T >
double TTempPartStore< T >::m_zmin
private

◆ m_zsize

template<typename T >
double TTempPartStore< T >::m_zsize
private

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