OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
IpplParticleBase< PLayout > Class Template Reference

#include <MakeDataSource.h>

Inheritance diagram for IpplParticleBase< PLayout >:
Inheritance graph
[legend]
Collaboration diagram for IpplParticleBase< PLayout >:
Collaboration graph
[legend]

Public Types

enum  { Dim = PLayout::Dimension }
 
typedef PLayout Layout_t
 
typedef PLayout::Position_t Position_t
 
typedef PLayout::Index_t Index_t
 
typedef PLayout::ParticlePos_t ParticlePos_t
 
typedef PLayout::ParticleIndex_t ParticleIndex_t
 
typedef PLayout::pair_iterator pair_iterator
 
typedef PLayout::pair_t pair_t
 
typedef PLayout::UpdateFlags UpdateFlags
 
typedef std::vector
< ParticleAttribBase * > 
attrib_container_t
 
typedef
attrib_container_t::iterator 
attrib_iterator
 
typedef
ParticleAttribBase::SortList_t 
SortList_t
 
- Public Types inherited from DataSource
enum  DsMode { INPUT, OUTPUT, BOTH, DEFAULT }
 
typedef std::vector
< DataSourceObject * > 
container_t
 
- Public Types inherited from AbstractParticle< PLayout::Position_t, PLayout::Dimension >
typedef ParticleLayout
< PLayout::Position_t, Dim >
::SingleParticlePos_t 
SingleParticlePos_t
 
typedef ParticleLayout
< PLayout::Position_t, Dim >
::Index_t 
Index_t
 
typedef ParticleAttrib
< SingleParticlePos_t
ParticlePos_t
 
typedef ParticleAttrib< Index_tParticleIndex_t
 
typedef ParticleLayout
< PLayout::Position_t, Dim >
::UpdateFlags 
UpdateFlags
 
typedef ParticleLayout
< PLayout::Position_t, Dim >
::Position_t 
Position_t
 
typedef ParticleLayout
< PLayout::Position_t, Dim
Layout_t
 

Public Member Functions

 IpplParticleBase ()
 
 IpplParticleBase (PLayout *layout)
 
 ~IpplParticleBase ()
 
void initialize (PLayout *)
 
size_t getTotalNum () const
 
size_t getLocalNum () const
 
size_t getDestroyNum () const
 
size_t getGhostNum () const
 
void setTotalNum (size_t n)
 
void setLocalNum (size_t n)
 
unsigned int getMinimumNumberOfParticlesPerCore () const
 
void setMinimumNumberOfParticlesPerCore (unsigned int n)
 
PLayout & getLayout ()
 
const PLayout & getLayout () const
 
ParticleBConds< Position_t,
PLayout::Dimension > & 
getBConds ()
 
void setBConds (const ParticleBConds< Position_t, PLayout::Dimension > &bc)
 
bool singleInitNode () const
 
bool getUpdateFlag (UpdateFlags f) const
 
void setUpdateFlag (UpdateFlags f, bool val)
 
void addAttribute (ParticleAttribBase &pa)
 
ParticleAttribBasegetAttribute (attrib_container_t::size_type N)
 
attrib_container_t::size_type numAttributes () const
 
attrib_iterator begin ()
 
attrib_iterator end ()
 
void resetID ()
 
virtual void update ()
 
virtual void update (const ParticleAttrib< char > &canSwap)
 
void createWithID (unsigned id)
 
void create (size_t)
 
void globalCreate (size_t np)
 
void destroy (size_t, size_t, bool=false)
 
size_t putMessage (Message &, size_t, size_t)
 
size_t putMessage (Message &, const std::vector< size_t > &)
 
size_t putMessage (Message &, size_t)
 
FormatgetFormat ()
 
size_t writeMsgBuffer (MsgBuffer *&, const std::vector< size_t > &)
 
template<class O >
size_t writeMsgBufferWithOffsets (MsgBuffer *&, const std::vector< size_t > &, const std::vector< O > &)
 
size_t readMsgBuffer (MsgBuffer *)
 
size_t readGhostMsgBuffer (MsgBuffer *, int)
 
size_t getMessage (Message &)
 
size_t getSingleMessage (Message &)
 
size_t getMessageAndCreate (Message &)
 
void performDestroy (bool updateLocalNum=false)
 
void sort (SortList_t &)
 
size_t ghostPutMessage (Message &, size_t, size_t)
 
size_t ghostPutMessage (Message &, const std::vector< size_t > &)
 
size_t ghostGetMessage (Message &, int)
 
size_t ghostGetSingleMessage (Message &, int)
 
void ghostDestroy (size_t, size_t)
 
void printDebug (Inform &)
 
- Public Member Functions inherited from DataSource
 DataSource ()
 
virtual ~DataSource ()
 
bool connected (DataConnect *=0) const
 
DataSourceObjectfindDataSourceObject (DataConnect *) const
 
DataConnectconnect (const char *, DataConnect *=0, int=DataSource::DEFAULT)
 
bool connect (DataSourceObject *)
 
bool disconnect (DataConnect *=0)
 
bool updateConnection (DataConnect *=0)
 
void interact (DataConnect *=0)
 
void interact (const char *, DataConnect *=0)
 
- Public Member Functions inherited from AbstractParticle< PLayout::Position_t, PLayout::Dimension >
 AbstractParticle ()
 
virtual ~AbstractParticle ()
 
virtual bool getUpdateFlag (UpdateFlags f) const =0
 
virtual void setUpdateFlag (UpdateFlags f, bool val)=0
 
virtual void setBConds (const ParticleBConds< Position_t, Dim > &bc)=0
 

Public Attributes

unsigned int MIN_NUM_PART_PER_CORE
 
ParticlePos_t R
 
ParticleIndex_t ID
 
- Public Attributes inherited from AbstractParticle< PLayout::Position_t, PLayout::Dimension >
ParticlePos_tR_p
 
ParticleIndex_tID_p
 

Protected Member Functions

virtual DataSourceObjectcreateDataSourceObject (const char *nm, DataConnect *dc, int tm)
 

Protected Attributes

std::vector< std::pair< size_t,
size_t > > 
DestroyList
 

Private Member Functions

void setup ()
 
unsigned getNextID ()
 

Private Attributes

PLayout * Layout
 
attrib_container_t AttribList
 
size_t TotalNum
 
size_t LocalNum
 
size_t DestroyNum
 
size_t GhostNum
 
unsigned NextID
 

Detailed Description

template<class PLayout>
class IpplParticleBase< PLayout >

Definition at line 26 of file MakeDataSource.h.

Member Typedef Documentation

template<class PLayout>
typedef std::vector<ParticleAttribBase *> IpplParticleBase< PLayout >::attrib_container_t

Definition at line 139 of file IpplParticleBase.h.

template<class PLayout>
typedef attrib_container_t::iterator IpplParticleBase< PLayout >::attrib_iterator

Definition at line 140 of file IpplParticleBase.h.

template<class PLayout>
typedef PLayout::Index_t IpplParticleBase< PLayout >::Index_t

Definition at line 131 of file IpplParticleBase.h.

template<class PLayout>
typedef PLayout IpplParticleBase< PLayout >::Layout_t

Definition at line 129 of file IpplParticleBase.h.

template<class PLayout>
typedef PLayout::pair_iterator IpplParticleBase< PLayout >::pair_iterator

Definition at line 136 of file IpplParticleBase.h.

template<class PLayout>
typedef PLayout::pair_t IpplParticleBase< PLayout >::pair_t

Definition at line 137 of file IpplParticleBase.h.

template<class PLayout>
typedef PLayout::ParticleIndex_t IpplParticleBase< PLayout >::ParticleIndex_t

Definition at line 134 of file IpplParticleBase.h.

template<class PLayout>
typedef PLayout::ParticlePos_t IpplParticleBase< PLayout >::ParticlePos_t

Definition at line 133 of file IpplParticleBase.h.

template<class PLayout>
typedef PLayout::Position_t IpplParticleBase< PLayout >::Position_t

Definition at line 130 of file IpplParticleBase.h.

template<class PLayout>
typedef ParticleAttribBase::SortList_t IpplParticleBase< PLayout >::SortList_t

Definition at line 141 of file IpplParticleBase.h.

template<class PLayout>
typedef PLayout::UpdateFlags IpplParticleBase< PLayout >::UpdateFlags

Definition at line 138 of file IpplParticleBase.h.

Member Enumeration Documentation

template<class PLayout>
anonymous enum
Enumerator
Dim 

Definition at line 126 of file IpplParticleBase.h.

Constructor & Destructor Documentation

template<class PLayout>
IpplParticleBase< PLayout >::IpplParticleBase ( )
inline

Definition at line 154 of file IpplParticleBase.h.

template<class PLayout>
IpplParticleBase< PLayout >::IpplParticleBase ( PLayout *  layout)
inline

Definition at line 164 of file IpplParticleBase.h.

template<class PLayout>
IpplParticleBase< PLayout >::~IpplParticleBase ( )
inline

Definition at line 176 of file IpplParticleBase.h.

Member Function Documentation

template<class PLayout>
void IpplParticleBase< PLayout >::addAttribute ( ParticleAttribBase pa)
inlinevirtual
template<class PLayout>
attrib_iterator IpplParticleBase< PLayout >::begin ( )
inline

Definition at line 248 of file IpplParticleBase.h.

template<class PLayout >
void IpplParticleBase< PLayout >::create ( size_t  M)
virtual
template<class PLayout>
virtual DataSourceObject* IpplParticleBase< PLayout >::createDataSourceObject ( const char *  nm,
DataConnect dc,
int  tm 
)
inlineprotectedvirtual

Implements DataSource.

Definition at line 352 of file IpplParticleBase.h.

template<class PLayout >
void IpplParticleBase< PLayout >::createWithID ( unsigned  id)
virtual
template<class PLayout >
void IpplParticleBase< PLayout >::destroy ( size_t  M,
size_t  I,
bool  doNow = false 
)
virtual
template<class PLayout>
attrib_iterator IpplParticleBase< PLayout >::end ( )
inline

Definition at line 249 of file IpplParticleBase.h.

template<class PLayout>
ParticleAttribBase& IpplParticleBase< PLayout >::getAttribute ( attrib_container_t::size_type  N)
inline

Definition at line 241 of file IpplParticleBase.h.

Referenced by DiscParticle::read(), and DiscParticle::write().

template<class PLayout>
ParticleBConds<Position_t,PLayout::Dimension>& IpplParticleBase< PLayout >::getBConds ( )
inlinevirtual
template<class PLayout>
size_t IpplParticleBase< PLayout >::getDestroyNum ( ) const
inlinevirtual
template<class PLayout >
Format * IpplParticleBase< PLayout >::getFormat ( )

Definition at line 253 of file IpplParticleBase.hpp.

References putMessage().

Here is the call graph for this function:

template<class PLayout>
size_t IpplParticleBase< PLayout >::getGhostNum ( ) const
inlinevirtual
template<class PLayout>
PLayout& IpplParticleBase< PLayout >::getLayout ( )
inlinevirtual
template<class PLayout>
const PLayout& IpplParticleBase< PLayout >::getLayout ( ) const
inlinevirtual
template<class PLayout>
size_t IpplParticleBase< PLayout >::getLocalNum ( ) const
inlinevirtual
template<class PLayout >
size_t IpplParticleBase< PLayout >::getMessage ( Message msg)

Definition at line 349 of file IpplParticleBase.hpp.

References Message::get(), and PAssert.

Referenced by ParticleLayoutFromGrid::redistribute_particles().

Here is the call graph for this function:

template<class PLayout >
size_t IpplParticleBase< PLayout >::getMessageAndCreate ( Message msg)

Definition at line 397 of file IpplParticleBase.hpp.

References ADDIPPLSTAT, getMessage(), and PAssert.

Referenced by DiscParticle::read().

Here is the call graph for this function:

template<class PLayout>
unsigned int IpplParticleBase< PLayout >::getMinimumNumberOfParticlesPerCore ( ) const
inlinevirtual
template<class PLayout >
unsigned IpplParticleBase< PLayout >::getNextID ( )
private

Definition at line 97 of file IpplParticleBase.hpp.

References IpplInfo::Comm.

template<class PLayout >
size_t IpplParticleBase< PLayout >::getSingleMessage ( Message msg)

Definition at line 372 of file IpplParticleBase.hpp.

References PAssert.

template<class PLayout>
size_t IpplParticleBase< PLayout >::getTotalNum ( ) const
inlinevirtual
template<class PLayout>
bool IpplParticleBase< PLayout >::getUpdateFlag ( UpdateFlags  f) const
inline

Definition at line 225 of file IpplParticleBase.h.

template<class PLayout >
void IpplParticleBase< PLayout >::ghostDestroy ( size_t  M,
size_t  I 
)
virtual
template<class PLayout >
size_t IpplParticleBase< PLayout >::ghostGetMessage ( Message msg,
int  node 
)

Definition at line 691 of file IpplParticleBase.hpp.

References Message::get(), and PAssert.

Here is the call graph for this function:

template<class PLayout >
size_t IpplParticleBase< PLayout >::ghostGetSingleMessage ( Message msg,
int   
)

Definition at line 716 of file IpplParticleBase.hpp.

References PAssert.

template<class PLayout >
size_t IpplParticleBase< PLayout >::ghostPutMessage ( Message msg,
size_t  M,
size_t  I 
)

Definition at line 631 of file IpplParticleBase.hpp.

References PAssert, Message::put(), and Attrib::Distribution::R.

Here is the call graph for this function:

template<class PLayout >
size_t IpplParticleBase< PLayout >::ghostPutMessage ( Message msg,
const std::vector< size_t > &  pl 
)

Definition at line 666 of file IpplParticleBase.hpp.

References PAssert, and Message::put().

Here is the call graph for this function:

template<class PLayout >
void IpplParticleBase< PLayout >::globalCreate ( size_t  np)
virtual

Implements AbstractParticle< PLayout::Position_t, PLayout::Dimension >.

Definition at line 468 of file IpplParticleBase.hpp.

References IpplInfo::getNodes(), IpplInfo::myNode(), and PAssert.

Here is the call graph for this function:

template<class PLayout>
void IpplParticleBase< PLayout >::initialize ( PLayout *  layout)

Definition at line 44 of file IpplParticleBase.hpp.

References PAssert.

template<class PLayout>
attrib_container_t::size_type IpplParticleBase< PLayout >::numAttributes ( ) const
inline

Definition at line 245 of file IpplParticleBase.h.

Referenced by DiscParticle::read(), and DiscParticle::write().

template<class PLayout >
void IpplParticleBase< PLayout >::performDestroy ( bool  updateLocalNum = false)
virtual
template<class PLayout >
void IpplParticleBase< PLayout >::printDebug ( Inform o)

Definition at line 766 of file IpplParticleBase.hpp.

References endl().

Here is the call graph for this function:

template<class PLayout >
size_t IpplParticleBase< PLayout >::putMessage ( Message msg,
size_t  M,
size_t  I 
)

Definition at line 183 of file IpplParticleBase.hpp.

References PAssert, PAssert_LE, PAssert_LT, Message::put(), and Attrib::Distribution::R.

Referenced by ParticleLayoutFromGrid::redistribute_particles(), and DiscParticle::write().

Here is the call graph for this function:

template<class PLayout >
size_t IpplParticleBase< PLayout >::putMessage ( Message msg,
const std::vector< size_t > &  putList 
)

Definition at line 212 of file IpplParticleBase.hpp.

References PAssert, and Message::put().

Here is the call graph for this function:

template<class PLayout >
size_t IpplParticleBase< PLayout >::putMessage ( Message msg,
size_t  I 
)

Definition at line 235 of file IpplParticleBase.hpp.

References PAssert.

template<class PLayout >
size_t IpplParticleBase< PLayout >::readGhostMsgBuffer ( MsgBuffer msgbuf,
int  node 
)

Definition at line 333 of file IpplParticleBase.hpp.

References MsgBuffer::get().

Here is the call graph for this function:

template<class PLayout >
size_t IpplParticleBase< PLayout >::readMsgBuffer ( MsgBuffer msgbuf)

Definition at line 317 of file IpplParticleBase.hpp.

References MsgBuffer::get().

Here is the call graph for this function:

template<class PLayout >
void IpplParticleBase< PLayout >::resetID ( void  )
virtual
template<class PLayout>
void IpplParticleBase< PLayout >::setBConds ( const ParticleBConds< Position_t, PLayout::Dimension > &  bc)
inline

Definition at line 216 of file IpplParticleBase.h.

template<class PLayout>
void IpplParticleBase< PLayout >::setLocalNum ( size_t  n)
inlinevirtual
template<class PLayout>
void IpplParticleBase< PLayout >::setMinimumNumberOfParticlesPerCore ( unsigned int  n)
inlinevirtual
template<class PLayout>
void IpplParticleBase< PLayout >::setTotalNum ( size_t  n)
inlinevirtual
template<class PLayout >
void IpplParticleBase< PLayout >::setup ( void  )
private

Definition at line 60 of file IpplParticleBase.hpp.

References IpplInfo::Comm, Communicate::getNodes(), INCIPPLSTAT, Communicate::myNode(), and Attrib::Distribution::R.

Referenced by IpplParticleBase< T >::IpplParticleBase().

Here is the call graph for this function:

template<class PLayout>
void IpplParticleBase< PLayout >::setUpdateFlag ( UpdateFlags  f,
bool  val 
)
inline

Definition at line 228 of file IpplParticleBase.h.

template<class PLayout >
bool IpplParticleBase< PLayout >::singleInitNode ( ) const
virtual
template<class PLayout >
void IpplParticleBase< PLayout >::sort ( SortList_t sortlist)

Definition at line 740 of file IpplParticleBase.hpp.

template<class PLayout >
void IpplParticleBase< PLayout >::update ( )
virtual

Implements AbstractParticle< PLayout::Position_t, PLayout::Dimension >.

Reimplemented in AmrParticleBase< PLayout >.

Definition at line 526 of file IpplParticleBase.hpp.

References INCIPPLSTAT, and PAssert.

Referenced by DiscParticle::read().

template<class PLayout >
void IpplParticleBase< PLayout >::update ( const ParticleAttrib< char > &  canSwap)
virtual
template<class PLayout >
size_t IpplParticleBase< PLayout >::writeMsgBuffer ( MsgBuffer *&  msgbuf,
const std::vector< size_t > &  list 
)

Definition at line 278 of file IpplParticleBase.hpp.

References MsgBuffer::add(), and putMessage().

Here is the call graph for this function:

template<class PLayout >
template<class O >
size_t IpplParticleBase< PLayout >::writeMsgBufferWithOffsets ( MsgBuffer *&  msgbuf,
const std::vector< size_t > &  list,
const std::vector< O > &  offset 
)

Definition at line 294 of file IpplParticleBase.hpp.

References MsgBuffer::add(), Dim, putMessage(), and Attrib::Distribution::R.

Here is the call graph for this function:

Member Data Documentation

template<class PLayout>
attrib_container_t IpplParticleBase< PLayout >::AttribList
private
template<class PLayout>
std::vector< std::pair<size_t,size_t> > IpplParticleBase< PLayout >::DestroyList
protected

Definition at line 361 of file IpplParticleBase.h.

template<class PLayout>
size_t IpplParticleBase< PLayout >::DestroyNum
private

Definition at line 375 of file IpplParticleBase.h.

Referenced by IpplParticleBase< T >::getDestroyNum().

template<class PLayout>
size_t IpplParticleBase< PLayout >::GhostNum
private

Definition at line 376 of file IpplParticleBase.h.

Referenced by IpplParticleBase< T >::getGhostNum().

template<class PLayout>
ParticleIndex_t IpplParticleBase< PLayout >::ID

Definition at line 148 of file IpplParticleBase.h.

template<class PLayout>
PLayout* IpplParticleBase< PLayout >::Layout
private
template<class PLayout>
size_t IpplParticleBase< PLayout >::LocalNum
private
template<class PLayout>
unsigned int IpplParticleBase< PLayout >::MIN_NUM_PART_PER_CORE
template<class PLayout>
unsigned IpplParticleBase< PLayout >::NextID
private

Definition at line 379 of file IpplParticleBase.h.

template<class PLayout>
ParticlePos_t IpplParticleBase< PLayout >::R

Definition at line 147 of file IpplParticleBase.h.

Referenced by ParticleLayoutFromGrid::redistribute_particles().

template<class PLayout>
size_t IpplParticleBase< PLayout >::TotalNum
private

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