OPAL (Object Oriented Parallel Accelerator Library) 2022.1
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 <IpplParticleBase.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_tParticlePos_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, DimLayout_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)
 
PLayoutgetLayout ()
 
const PLayoutgetLayout () 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 void addAttribute (ParticleAttribBase &pa)=0
 
virtual size_t getTotalNum () const=0
 
virtual size_t getLocalNum () const=0
 
virtual size_t getDestroyNum () const=0
 
virtual size_t getGhostNum () const=0
 
virtual void setTotalNum (size_t n)=0
 
virtual void setLocalNum (size_t n)=0
 
virtual Layout_tgetLayout ()=0
 
virtual const Layout_tgetLayout () const=0
 
virtual bool getUpdateFlag (UpdateFlags f) const=0
 
virtual void setUpdateFlag (UpdateFlags f, bool val)=0
 
virtual ParticleBConds< Position_t, Dim > & getBConds ()=0
 
virtual void setBConds (const ParticleBConds< Position_t, Dim > &bc)=0
 
virtual bool singleInitNode () const=0
 
virtual void resetID ()=0
 
virtual void update ()=0
 
virtual void update (const ParticleAttrib< char > &canSwap)=0
 
virtual void createWithID (unsigned id)=0
 
virtual void create (size_t)=0
 
virtual void globalCreate (size_t np)=0
 
virtual void destroy (size_t, size_t, bool=false)=0
 
virtual void performDestroy (bool updateLocalNum=false)=0
 
virtual void ghostDestroy (size_t M, size_t I)=0
 

Public Attributes

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)
 
virtual DataSourceObjectcreateDataSourceObject (const char *, DataConnect *, int)=0
 

Protected Attributes

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

Private Member Functions

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
 

Detailed Description

template<class PLayout>
class IpplParticleBase< PLayout >

Definition at line 125 of file IpplParticleBase.h.

Member Typedef Documentation

◆ attrib_container_t

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

Definition at line 142 of file IpplParticleBase.h.

◆ attrib_iterator

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

Definition at line 143 of file IpplParticleBase.h.

◆ Index_t

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

Definition at line 134 of file IpplParticleBase.h.

◆ Layout_t

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

Definition at line 132 of file IpplParticleBase.h.

◆ pair_iterator

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

Definition at line 139 of file IpplParticleBase.h.

◆ pair_t

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

Definition at line 140 of file IpplParticleBase.h.

◆ ParticleIndex_t

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

Definition at line 137 of file IpplParticleBase.h.

◆ ParticlePos_t

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

Definition at line 136 of file IpplParticleBase.h.

◆ Position_t

Definition at line 133 of file IpplParticleBase.h.

◆ SortList_t

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

Definition at line 144 of file IpplParticleBase.h.

◆ UpdateFlags

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

Definition at line 141 of file IpplParticleBase.h.

Member Enumeration Documentation

◆ anonymous enum

template<class PLayout >
anonymous enum
Enumerator
Dim 

Definition at line 129 of file IpplParticleBase.h.

Constructor & Destructor Documentation

◆ IpplParticleBase() [1/2]

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

Definition at line 154 of file IpplParticleBase.h.

◆ IpplParticleBase() [2/2]

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

Definition at line 163 of file IpplParticleBase.h.

References IpplParticleBase< PLayout >::setup().

Here is the call graph for this function:

◆ ~IpplParticleBase()

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

Definition at line 174 of file IpplParticleBase.h.

References IpplParticleBase< PLayout >::Layout.

Member Function Documentation

◆ addAttribute()

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

◆ begin()

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

Definition at line 242 of file IpplParticleBase.h.

References IpplParticleBase< PLayout >::AttribList.

◆ create()

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

◆ createDataSourceObject()

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

Implements DataSource.

Definition at line 346 of file IpplParticleBase.h.

References make_DataSourceObject().

Here is the call graph for this function:

◆ createWithID()

template<class PLayout >
void IpplParticleBase< PLayout >::createWithID ( unsigned  id)
virtual

◆ destroy()

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

◆ end()

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

Definition at line 243 of file IpplParticleBase.h.

References IpplParticleBase< PLayout >::AttribList.

◆ getAttribute()

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

◆ getBConds()

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

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

Definition at line 207 of file IpplParticleBase.h.

References ParticleLayout< T, Dim >::getBConds(), and IpplParticleBase< PLayout >::Layout.

Here is the call graph for this function:

◆ getDestroyNum()

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

◆ getFormat()

template<class PLayout >
Format * IpplParticleBase< PLayout >::getFormat

Definition at line 250 of file IpplParticleBase.hpp.

◆ getGhostNum()

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

◆ getLayout() [1/2]

template<class PLayout >
PLayout & IpplParticleBase< PLayout >::getLayout ( )
inlinevirtual

◆ getLayout() [2/2]

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

◆ getLocalNum()

template<class PLayout >
size_t IpplParticleBase< PLayout >::getLocalNum ( ) const
inlinevirtual

◆ getMessage()

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

Definition at line 346 of file IpplParticleBase.hpp.

References Message::get(), and PAssert.

Here is the call graph for this function:

◆ getMessageAndCreate()

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

Definition at line 394 of file IpplParticleBase.hpp.

References ADDIPPLSTAT, getMessage(), and PAssert.

Referenced by DiscParticle::read().

Here is the call graph for this function:

◆ getNextID()

template<class PLayout >
unsigned IpplParticleBase< PLayout >::getNextID
private

Definition at line 86 of file IpplParticleBase.hpp.

References IpplInfo::Comm.

◆ getSingleMessage()

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

Definition at line 369 of file IpplParticleBase.hpp.

References PAssert.

◆ getTotalNum()

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

◆ getUpdateFlag()

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

◆ ghostDestroy()

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

◆ ghostGetMessage()

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

Definition at line 688 of file IpplParticleBase.hpp.

References Message::get(), and PAssert.

Here is the call graph for this function:

◆ ghostGetSingleMessage()

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

Definition at line 713 of file IpplParticleBase.hpp.

References PAssert.

◆ ghostPutMessage() [1/2]

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

Definition at line 663 of file IpplParticleBase.hpp.

References 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 
)

Definition at line 628 of file IpplParticleBase.hpp.

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

Here is the call graph for this function:

◆ globalCreate()

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

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

Definition at line 465 of file IpplParticleBase.hpp.

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

Here is the call graph for this function:

◆ initialize()

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

Definition at line 33 of file IpplParticleBase.hpp.

References PAssert.

◆ numAttributes()

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

◆ performDestroy()

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

◆ printDebug()

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

Definition at line 763 of file IpplParticleBase.hpp.

References endl().

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 
)

Definition at line 209 of file IpplParticleBase.hpp.

References PAssert.

◆ putMessage() [2/3]

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

Definition at line 232 of file IpplParticleBase.hpp.

References PAssert.

◆ putMessage() [3/3]

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

Definition at line 180 of file IpplParticleBase.hpp.

References 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 
)

Definition at line 330 of file IpplParticleBase.hpp.

◆ readMsgBuffer()

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

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  )
virtual

◆ setBConds()

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

Definition at line 210 of file IpplParticleBase.h.

References IpplParticleBase< PLayout >::Layout, and ParticleLayout< T, Dim >::setBConds().

Here is the call graph for this function:

◆ setLocalNum()

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

◆ setTotalNum()

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

◆ setup()

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

Definition at line 49 of file IpplParticleBase.hpp.

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

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

Here is the call graph for this function:

◆ setUpdateFlag()

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

◆ singleInitNode()

template<class PLayout >
bool IpplParticleBase< PLayout >::singleInitNode
virtual

◆ sort()

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

Definition at line 737 of file IpplParticleBase.hpp.

◆ update() [1/2]

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

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

Reimplemented in AmrParticleBase< PLayout >.

Definition at line 523 of file IpplParticleBase.hpp.

References INCIPPLSTAT, and PAssert.

Referenced by DiscParticle::read().

◆ update() [2/2]

template<class PLayout >
void IpplParticleBase< PLayout >::update ( const ParticleAttrib< char > &  canSwap)
virtual

◆ writeMsgBuffer()

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

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 
)

Definition at line 291 of file IpplParticleBase.hpp.

Member Data Documentation

◆ AttribList

template<class PLayout >
attrib_container_t IpplParticleBase< PLayout >::AttribList
private

◆ DestroyList

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

Definition at line 355 of file IpplParticleBase.h.

◆ DestroyNum

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

Definition at line 369 of file IpplParticleBase.h.

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

◆ GhostNum

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

Definition at line 370 of file IpplParticleBase.h.

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

◆ ID

Definition at line 148 of file IpplParticleBase.h.

◆ Layout

template<class PLayout >
PLayout* IpplParticleBase< PLayout >::Layout
private

◆ LocalNum

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

◆ NextID

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

Definition at line 373 of file IpplParticleBase.h.

◆ R

Definition at line 147 of file IpplParticleBase.h.

◆ TotalNum

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

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