OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
GenParticle< PLayout, T > Class Template Referenceabstract

#include <GenParticle.h>

Inheritance diagram for GenParticle< PLayout, T >:
Collaboration diagram for GenParticle< PLayout, T >:

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
enum  DsMode { INPUT , OUTPUT , BOTH , DEFAULT }
typedef std::vector< DataSourceObject * > container_t
typedef ParticleLayout< PLayout::Position_t, Dim >::SingleParticlePos_t SingleParticlePos_t

Public Member Functions

 GenParticle (PLayout *L)
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)
PLayoutgetLayout ()
const PLayoutgetLayout () const
ParticleBConds< Position_t, PLayout::Dimension > & getBConds ()
void setBConds (const ParticleBConds< Position_t, PLayout::Dimension > &bc)
virtual void setBConds (const ParticleBConds< Position_t, Dim > &bc)=0
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 &)
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 Attributes

ParticleAttrib< T > data
ParticlePos_t R
ParticleIndex_t ID
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

 GenParticle ()
void setup ()
unsigned getNextID ()

Private Attributes

PLayoutLayout
attrib_container_t AttribList
size_t TotalNum
size_t LocalNum
size_t DestroyNum
size_t GhostNum
unsigned NextID
container_t ConnectionList

Detailed Description

template<class PLayout, class T>
class GenParticle< PLayout, T >

Definition at line 28 of file GenParticle.h.

Member Typedef Documentation

◆ attrib_container_t

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

Definition at line 142 of file IpplParticleBase.h.

◆ attrib_iterator

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

Definition at line 143 of file IpplParticleBase.h.

◆ container_t

typedef std::vector<DataSourceObject *> DataSource::container_t
inherited

Definition at line 67 of file DataSource.h.

◆ Index_t

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

Definition at line 134 of file IpplParticleBase.h.

◆ Layout_t

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

Definition at line 132 of file IpplParticleBase.h.

◆ pair_iterator

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

Definition at line 139 of file IpplParticleBase.h.

◆ pair_t

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

Definition at line 140 of file IpplParticleBase.h.

◆ ParticleIndex_t

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

Definition at line 137 of file IpplParticleBase.h.

◆ ParticlePos_t

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

Definition at line 136 of file IpplParticleBase.h.

◆ Position_t

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

Definition at line 133 of file IpplParticleBase.h.

◆ SingleParticlePos_t

typedef ParticleLayout<PLayout::Position_t,Dim>::SingleParticlePos_t AbstractParticle< PLayout::Position_t, Dim >::SingleParticlePos_t
inherited

Definition at line 34 of file AbstractParticle.h.

◆ SortList_t

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

Definition at line 144 of file IpplParticleBase.h.

◆ UpdateFlags

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

Definition at line 141 of file IpplParticleBase.h.

Member Enumeration Documentation

◆ anonymous enum

template<class PLayout>
anonymous enum
inherited
Enumerator
Dim 

Definition at line 129 of file IpplParticleBase.h.

◆ DsMode

enum DataSource::DsMode
inherited
Enumerator
INPUT 
OUTPUT 
BOTH 
DEFAULT 

Definition at line 64 of file DataSource.h.

Constructor & Destructor Documentation

◆ GenParticle() [1/2]

template<class PLayout, class T>
GenParticle< PLayout, T >::GenParticle ( PLayout * L)
inline

Definition at line 35 of file GenParticle.h.

References IpplParticleBase< PLayout >::addAttribute(), data, and IpplParticleBase< PLayout >::IpplParticleBase().

Here is the call graph for this function:

◆ GenParticle() [2/2]

template<class PLayout, class T>
GenParticle< PLayout, T >::GenParticle ( )
private

Member Function Documentation

◆ addAttribute()

◆ begin()

template<class PLayout>
attrib_iterator IpplParticleBase< PLayout >::begin ( )
inlineinherited

Definition at line 242 of file IpplParticleBase.h.

◆ connect() [1/2]

DataConnect * DataSource::connect ( const char * nm,
DataConnect * dataconn = 0,
int tm = DataSource::DEFAULT )
inherited

Definition at line 83 of file DataSource.cpp.

Referenced by DataConnect::connect(), and DataConnect::connect().

◆ connect() [2/2]

bool DataSource::connect ( DataSourceObject * dso)
inherited

Definition at line 127 of file DataSource.cpp.

References DataConnect::checkin(), DataSourceObject::connected(), ConnectionList, DataSourceObject::getConnection(), and DataSourceObject::getSource().

Here is the call graph for this function:

◆ connected()

bool DataSource::connected ( DataConnect * dataconn = 0) const
inherited

Definition at line 69 of file DataSource.cpp.

References ConnectionList, and findDataSourceObject().

Here is the call graph for this function:

◆ create()

template<class PLayout>
void IpplParticleBase< PLayout >::create ( size_t M)
virtualinherited

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

Reimplemented in ParticleIndex_t< PLayout >, ParticleLevelCounter_t< PLayout >, ParticlePos_t< PLayout >, and SingleParticlePos_t< PLayout >.

Definition at line 410 of file IpplParticleBase.hpp.

References ADDIPPLSTAT, AttribList, getNextID(), ID, Layout, LocalNum, and PAssert.

Referenced by globalCreate().

Here is the call graph for this function:

◆ createDataSourceObject()

template<class PLayout>
virtual DataSourceObject * IpplParticleBase< PLayout >::createDataSourceObject ( const char * nm,
DataConnect * dc,
int tm )
inlineprotectedvirtualinherited

Implements DataSource.

Definition at line 346 of file IpplParticleBase.h.

◆ createWithID()

◆ destroy()

template<class PLayout>
void IpplParticleBase< PLayout >::destroy ( size_t M,
size_t I,
bool doNow = false )
virtualinherited

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

Reimplemented in ParticleIndex_t< PLayout >, ParticleLevelCounter_t< PLayout >, ParticlePos_t< PLayout >, and SingleParticlePos_t< PLayout >.

Definition at line 491 of file IpplParticleBase.hpp.

References ADDIPPLSTAT, AttribList, DestroyList, DestroyNum, getUpdateFlag(), Layout, LocalNum, ParticleLayout< T, Dim >::OPTDESTROY, and PAssert.

Referenced by DiscParticle::read().

Here is the call graph for this function:

◆ disconnect()

bool DataSource::disconnect ( DataConnect * dataconn = 0)
inherited

Definition at line 143 of file DataSource.cpp.

References a, DataConnect::checkout(), and ConnectionList.

Referenced by DataConnect::checkout(), and ~DataSource().

Here is the call graph for this function:

◆ end()

template<class PLayout>
attrib_iterator IpplParticleBase< PLayout >::end ( )
inlineinherited

Definition at line 243 of file IpplParticleBase.h.

◆ findDataSourceObject()

DataSourceObject * DataSource::findDataSourceObject ( DataConnect * dc) const
inherited

Definition at line 55 of file DataSource.cpp.

References a, and ConnectionList.

Referenced by connected().

◆ getAttribute()

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

Definition at line 235 of file IpplParticleBase.h.

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

◆ getBConds()

template<class PLayout>
ParticleBConds< Position_t, PLayout::Dimension > & IpplParticleBase< PLayout >::getBConds ( )
inlinevirtualinherited

◆ getDestroyNum()

template<class PLayout>
size_t IpplParticleBase< PLayout >::getDestroyNum ( ) const
inlinevirtualinherited

◆ getFormat()

template<class PLayout>
Format * IpplParticleBase< PLayout >::getFormat ( )
inherited

Definition at line 250 of file IpplParticleBase.hpp.

◆ getGhostNum()

template<class PLayout>
size_t IpplParticleBase< PLayout >::getGhostNum ( ) const
inlinevirtualinherited

◆ getLayout() [1/2]

◆ getLayout() [2/2]

template<class PLayout>
const PLayout & IpplParticleBase< PLayout >::getLayout ( ) const
inlineinherited

Definition at line 204 of file IpplParticleBase.h.

◆ getLocalNum()

◆ getMessage()

template<class PLayout>
size_t IpplParticleBase< PLayout >::getMessage ( Message & msg)
inherited

Definition at line 346 of file IpplParticleBase.hpp.

References AttribList, Message::get(), Layout, and PAssert.

Here is the call graph for this function:

◆ getMessageAndCreate()

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

Definition at line 394 of file IpplParticleBase.hpp.

References ADDIPPLSTAT, getMessage(), Layout, LocalNum, and PAssert.

Referenced by DiscParticle::read().

Here is the call graph for this function:

◆ getNextID()

template<class PLayout>
unsigned IpplParticleBase< PLayout >::getNextID ( )
privateinherited

Definition at line 86 of file IpplParticleBase.hpp.

References IpplInfo::Comm, and NextID.

Referenced by create().

◆ getSingleMessage()

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

Definition at line 369 of file IpplParticleBase.hpp.

References AttribList, Layout, and PAssert.

◆ getTotalNum()

template<class PLayout>
size_t IpplParticleBase< PLayout >::getTotalNum ( ) const
inlinevirtualinherited

◆ getUpdateFlag()

template<class PLayout>
bool IpplParticleBase< PLayout >::getUpdateFlag ( UpdateFlags f) const
inlinevirtualinherited

◆ ghostDestroy()

template<class PLayout>
void IpplParticleBase< PLayout >::ghostDestroy ( size_t M,
size_t I )
virtualinherited

◆ ghostGetMessage()

template<class PLayout>
size_t IpplParticleBase< PLayout >::ghostGetMessage ( Message & msg,
int  )
inherited

Definition at line 688 of file IpplParticleBase.hpp.

References AttribList, Message::get(), GhostNum, Layout, and PAssert.

Here is the call graph for this function:

◆ ghostGetSingleMessage()

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

Definition at line 713 of file IpplParticleBase.hpp.

References AttribList, GhostNum, Layout, and PAssert.

◆ ghostPutMessage() [1/2]

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

Definition at line 663 of file IpplParticleBase.hpp.

References AttribList, Layout, PAssert, and Message::put().

Here is the call graph for this function:

◆ ghostPutMessage() [2/2]

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

Definition at line 628 of file IpplParticleBase.hpp.

References AttribList, GhostNum, Layout, PAssert, Message::put(), and R.

Here is the call graph for this function:

◆ globalCreate()

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

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

Definition at line 465 of file IpplParticleBase.hpp.

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

Here is the call graph for this function:

◆ initialize()

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

Definition at line 33 of file IpplParticleBase.hpp.

References Layout, PAssert, and setup().

Here is the call graph for this function:

◆ interact() [1/2]

void DataSource::interact ( const char * str,
DataConnect * dataconn = 0 )
inherited

Definition at line 208 of file DataSource.cpp.

References a, and ConnectionList.

◆ interact() [2/2]

void DataSource::interact ( DataConnect * dataconn = 0)
inherited

Definition at line 195 of file DataSource.cpp.

References a, and ConnectionList.

◆ numAttributes()

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

Definition at line 239 of file IpplParticleBase.h.

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

◆ performDestroy()

template<class PLayout>
void IpplParticleBase< PLayout >::performDestroy ( bool updateLocalNum = false)
virtualinherited

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

Reimplemented in ParticleIndex_t< PLayout >, ParticleLevelCounter_t< PLayout >, ParticlePos_t< PLayout >, and SingleParticlePos_t< PLayout >.

Definition at line 557 of file IpplParticleBase.hpp.

References AttribList, DestroyList, DestroyNum, getUpdateFlag(), Layout, LocalNum, ParticleLayout< T, Dim >::OPTDESTROY, and PAssert.

Here is the call graph for this function:

◆ printDebug()

template<class PLayout>
void IpplParticleBase< PLayout >::printDebug ( Inform & o)
inherited

Definition at line 763 of file IpplParticleBase.hpp.

References AttribList, endl(), getLocalNum(), getTotalNum(), and Layout.

Here is the call graph for this function:

◆ putMessage() [1/3]

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

Definition at line 209 of file IpplParticleBase.hpp.

References Layout, and PAssert.

◆ putMessage() [2/3]

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

Definition at line 232 of file IpplParticleBase.hpp.

References AttribList, Layout, and PAssert.

◆ putMessage() [3/3]

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

Definition at line 180 of file IpplParticleBase.hpp.

References Layout, PAssert, and Message::put().

Referenced by DiscParticle::write().

Here is the call graph for this function:

◆ readGhostMsgBuffer()

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

Definition at line 330 of file IpplParticleBase.hpp.

◆ readMsgBuffer()

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

Definition at line 314 of file IpplParticleBase.hpp.

References MsgBuffer::get().

Here is the call graph for this function:

◆ resetID()

template<class PLayout>
void IpplParticleBase< PLayout >::resetID ( void )
virtualinherited

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

Definition at line 96 of file IpplParticleBase.hpp.

References IpplInfo::Comm, COMM_ANY_NODE, Message::get(), getLocalNum(), IpplInfo::getNodes(), ID, IpplInfo::myNode(), P_LAYOUT_CYCLE, P_RESET_ID_TAG, PAssert, Message::put(), and sum().

Here is the call graph for this function:

◆ setBConds() [1/2]

virtual void AbstractParticle< PLayout::Position_t, Dim >::setBConds ( const ParticleBConds< Position_t, Dim > & bc)
pure virtualinherited

◆ setBConds() [2/2]

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

Definition at line 210 of file IpplParticleBase.h.

◆ setLocalNum()

template<class PLayout>
void IpplParticleBase< PLayout >::setLocalNum ( size_t n)
inlinevirtualinherited

◆ setTotalNum()

template<class PLayout>
void IpplParticleBase< PLayout >::setTotalNum ( size_t n)
inlinevirtualinherited

◆ setup()

template<class PLayout>
void IpplParticleBase< PLayout >::setup ( )
privateinherited

Definition at line 49 of file IpplParticleBase.hpp.

References addAttribute(), IpplInfo::Comm, DestroyNum, GhostNum, ID, AbstractParticle< PLayout::Position_t, PLayout::Dimension >::ID_p, INCIPPLSTAT, LocalNum, NextID, R, AbstractParticle< PLayout::Position_t, PLayout::Dimension >::R_p, and TotalNum.

Referenced by initialize(), and IpplParticleBase< Layout_t >::IpplParticleBase().

Here is the call graph for this function:

◆ setUpdateFlag()

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

◆ singleInitNode()

template<class PLayout>
bool IpplParticleBase< PLayout >::singleInitNode ( ) const
virtualinherited

◆ sort()

template<class PLayout>
void IpplParticleBase< PLayout >::sort ( SortList_t & sortlist)
inherited

Definition at line 737 of file IpplParticleBase.hpp.

References AttribList.

◆ update() [1/2]

◆ update() [2/2]

◆ updateConnection()

bool DataSource::updateConnection ( DataConnect * dataconn = 0)
inherited

Definition at line 176 of file DataSource.cpp.

References a, and ConnectionList.

◆ writeMsgBuffer()

template<class PLayout>
size_t IpplParticleBase< PLayout >::writeMsgBuffer ( MsgBuffer *& msgbuf,
const std::vector< size_t > & list )
inherited

Definition at line 275 of file IpplParticleBase.hpp.

◆ writeMsgBufferWithOffsets()

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

Definition at line 291 of file IpplParticleBase.hpp.

Member Data Documentation

◆ AttribList

◆ ConnectionList

container_t DataSource::ConnectionList
privateinherited

◆ data

template<class PLayout, class T>
ParticleAttrib<T> GenParticle< PLayout, T >::data

Definition at line 32 of file GenParticle.h.

Referenced by GenParticle().

◆ DestroyList

template<class PLayout>
std::vector< std::pair<size_t,size_t> > IpplParticleBase< PLayout >::DestroyList
protectedinherited

◆ DestroyNum

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

Definition at line 369 of file IpplParticleBase.h.

Referenced by destroy(), performDestroy(), and setup().

◆ GhostNum

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

◆ ID

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

Definition at line 148 of file IpplParticleBase.h.

Referenced by create(), createWithID(), resetID(), and setup().

◆ ID_p

◆ Layout

◆ LocalNum

template<class PLayout>
size_t IpplParticleBase< PLayout >::LocalNum
privateinherited

◆ NextID

template<class PLayout>
unsigned IpplParticleBase< PLayout >::NextID
privateinherited

Definition at line 373 of file IpplParticleBase.h.

Referenced by getNextID(), and setup().

◆ R

◆ R_p

◆ TotalNum

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

Definition at line 367 of file IpplParticleBase.h.

Referenced by setup().


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