OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | Friends | List of all members
ParticleAttrib< T > Class Template Reference

#include <ParticleAttrib.h>

Inheritance diagram for ParticleAttrib< T >:
Inheritance graph
[legend]
Collaboration diagram for ParticleAttrib< T >:
Collaboration graph
[legend]

Public Types

enum  { IsExpr = 0 }
 
typedef T Return_t
 
typedef std::vector< T > ParticleList_t
 
typedef ParticleAttribIterator< T > iterator
 
typedef ParticleAttribConstIterator< T > const_iterator
 
typedef ParticleAttribBase::SortListIndex_t SortListIndex_t
 
typedef ParticleAttribBase::SortList_t SortList_t
 
typedef const_iterator PETE_Expr_t
 
- Public Types inherited from ParticleAttribBase
typedef long SortListIndex_t
 
typedef std::vector< SortListIndex_tSortList_t
 
- Public Types inherited from DataSource
enum  DsMode { INPUT , OUTPUT , BOTH , DEFAULT }
 
typedef std::vector< DataSourceObject * > container_t
 
- Public Types inherited from PETE_Expr< ParticleAttrib< T > >
typedef ParticleAttrib< T > Wrapped
 

Public Member Functions

 ParticleAttrib ()
 
 ParticleAttrib (const ParticleAttrib< T > &pa)
 
 ~ParticleAttrib ()
 
bool isDirty ()
 
void resetDirtyFlag ()
 
ParticleList_t::reference operator[] (size_t n)
 
ParticleList_t::const_reference operator[] (size_t n) const
 
template<unsigned Dim>
SubParticleAttrib< ParticleAttrib< T >, T, Dimoperator[] (const SIndex< Dim > &s) const
 
PETE_Expr_t MakeExpression () const
 
iterator begin ()
 
iterator end ()
 
const_iterator cbegin () const
 
const_iterator cend () const
 
size_t size (void) const
 
ParticleAttribElem< T, 1U > operator() (unsigned)
 
ParticleAttribElem< T, 2U > operator() (unsigned, unsigned)
 
ParticleAttribElem< T, 3U > operator() (unsigned, unsigned, unsigned)
 
template<unsigned Dim, class M , class C , class PT , class IntOp >
void scatter (Field< T, Dim, M, C > &f, const ParticleAttrib< Vektor< PT, Dim > > &pp, const IntOp &) const
 
template<unsigned Dim, class M , class C , class PT , class IntOp , class CacheData >
void scatter (Field< T, Dim, M, C > &f, const ParticleAttrib< Vektor< PT, Dim > > &pp, const IntOp &, ParticleAttrib< CacheData > &cache) const
 
template<unsigned Dim, class M , class C , class IntOp , class CacheData >
void scatter (Field< T, Dim, M, C > &f, const IntOp &, const ParticleAttrib< CacheData > &cache) const
 
template<unsigned Dim, class M , class C , class PT , class IntOp >
void gather (const Field< T, Dim, M, C > &f, const ParticleAttrib< Vektor< PT, Dim > > &pp, const IntOp &)
 
template<unsigned Dim, class M , class C , class PT , class IntOp , class CacheData >
void gather (const Field< T, Dim, M, C > &f, const ParticleAttrib< Vektor< PT, Dim > > &pp, const IntOp &, ParticleAttrib< CacheData > &cache)
 
template<unsigned Dim, class M , class C , class IntOp , class CacheData >
void gather (const Field< T, Dim, M, C > &f, const IntOp &, const ParticleAttrib< CacheData > &cache)
 
template<class T1 >
const ParticleAttrib< T > & operator= (const PETE_Expr< T1 > &rhs)
 
const ParticleAttrib< T > & operator= (const ParticleAttrib< T > &rhs)
 
const ParticleAttrib< T > & operator= (T rhs)
 
virtual void create (size_t)
 
virtual void destroy (size_t M, size_t I, bool optDestroy=true)
 
virtual void destroy (const std::vector< std::pair< size_t, size_t > > &dlist, bool optDestroy=true)
 
virtual size_t putMessage (Message &, size_t, size_t)
 
virtual size_t putMessage (Message &, const std::vector< size_t > &)
 
virtual size_t getMessage (Message &, size_t)
 
virtual size_t ghostDestroy (size_t, size_t)
 
virtual void ghostCreate (size_t)
 
virtual size_t ghostPutMessage (Message &, size_t, size_t)
 
virtual size_t ghostPutMessage (Message &, const std::vector< size_t > &)
 
virtual size_t ghostGetMessage (Message &, size_t)
 
virtual void calcSortList (SortList_t &slist, bool ascending=true)
 
virtual void sort (SortList_t &slist)
 
virtual void printDebug (Inform &)
 
- Public Member Functions inherited from ParticleAttribBase
 ParticleAttribBase (unsigned int size, const std::string &typestr)
 
 ParticleAttribBase (const ParticleAttribBase &pa)
 
virtual ~ParticleAttribBase ()
 
unsigned int elementSize () const
 
const std::string & typeString () const
 
void setTemporary (bool t)
 
bool isTemporary () const
 
- 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 PETE_Expr< ParticleAttrib< T > >
ParticleAttrib< T > & PETE_unwrap ()
 
const ParticleAttrib< T > & PETE_unwrap () const
 

Protected Member Functions

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

Protected Attributes

ParticleList_t ParticleList
 
size_t LocalSize
 

Private Attributes

bool attributeIsDirty_
 

Friends

class ParticleAttribIterator< T >
 
class ParticleAttribConstIterator< T >
 

Detailed Description

template<class T>
class ParticleAttrib< T >

Definition at line 98 of file ParticleAttrib.h.

Member Typedef Documentation

◆ const_iterator

template<class T >
typedef ParticleAttribConstIterator<T> ParticleAttrib< T >::const_iterator

Definition at line 110 of file ParticleAttrib.h.

◆ iterator

template<class T >
typedef ParticleAttribIterator<T> ParticleAttrib< T >::iterator

Definition at line 109 of file ParticleAttrib.h.

◆ ParticleList_t

template<class T >
typedef std::vector<T> ParticleAttrib< T >::ParticleList_t

Definition at line 108 of file ParticleAttrib.h.

◆ PETE_Expr_t

template<class T >
typedef const_iterator ParticleAttrib< T >::PETE_Expr_t

Definition at line 170 of file ParticleAttrib.h.

◆ Return_t

template<class T >
typedef T ParticleAttrib< T >::Return_t

Definition at line 107 of file ParticleAttrib.h.

◆ SortList_t

template<class T >
typedef ParticleAttribBase::SortList_t ParticleAttrib< T >::SortList_t

Definition at line 112 of file ParticleAttrib.h.

◆ SortListIndex_t

Definition at line 111 of file ParticleAttrib.h.

Member Enumeration Documentation

◆ anonymous enum

template<class T >
anonymous enum
Enumerator
IsExpr 

Definition at line 169 of file ParticleAttrib.h.

Constructor & Destructor Documentation

◆ ParticleAttrib() [1/2]

template<class T >
ParticleAttrib< T >::ParticleAttrib ( )
inline

Definition at line 116 of file ParticleAttrib.h.

References INCIPPLSTAT.

◆ ParticleAttrib() [2/2]

template<class T >
ParticleAttrib< T >::ParticleAttrib ( const ParticleAttrib< T > &  pa)
inline

Definition at line 121 of file ParticleAttrib.h.

References INCIPPLSTAT.

◆ ~ParticleAttrib()

template<class T >
ParticleAttrib< T >::~ParticleAttrib ( )
inline

Definition at line 127 of file ParticleAttrib.h.

Member Function Documentation

◆ begin()

template<class T >
iterator ParticleAttrib< T >::begin ( )
inline

◆ calcSortList()

template<class T >
void ParticleAttrib< T >::calcSortList ( SortList_t slist,
bool  ascending = true 
)
virtual

Implements ParticleAttribBase.

Definition at line 422 of file ParticleAttrib.hpp.

◆ cbegin()

template<class T >
const_iterator ParticleAttrib< T >::cbegin ( ) const
inline

◆ cend()

template<class T >
const_iterator ParticleAttrib< T >::cend ( ) const
inline

Definition at line 178 of file ParticleAttrib.h.

References ParticleAttrib< T >::LocalSize.

◆ create()

template<class T >
void ParticleAttrib< T >::create ( size_t  M)
virtual

◆ createDataSourceObject()

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

Implements DataSource.

Definition at line 502 of file ParticleAttrib.h.

References make_DataSourceObject().

Here is the call graph for this function:

◆ destroy() [1/2]

template<class T >
void ParticleAttrib< T >::destroy ( const std::vector< std::pair< size_t, size_t > > &  dlist,
bool  optDestroy = true 
)
virtual

Implements ParticleAttribBase.

Definition at line 140 of file ParticleAttrib.hpp.

◆ destroy() [2/2]

template<class T >
void ParticleAttrib< T >::destroy ( size_t  M,
size_t  I,
bool  optDestroy = true 
)
virtual

◆ end()

template<class T >
iterator ParticleAttrib< T >::end ( )
inline

Definition at line 175 of file ParticleAttrib.h.

References ParticleAttrib< T >::LocalSize.

◆ gather() [1/3]

template<class T >
template<unsigned Dim, class M , class C , class IntOp , class CacheData >
void ParticleAttrib< T >::gather ( const Field< T, Dim, M, C > &  f,
const IntOp &  ,
const ParticleAttrib< CacheData > &  cache 
)
inline

◆ gather() [2/3]

template<class T >
template<unsigned Dim, class M , class C , class PT , class IntOp >
void ParticleAttrib< T >::gather ( const Field< T, Dim, M, C > &  f,
const ParticleAttrib< Vektor< PT, Dim > > &  pp,
const IntOp &   
)
inline

◆ gather() [3/3]

template<class T >
template<unsigned Dim, class M , class C , class PT , class IntOp , class CacheData >
void ParticleAttrib< T >::gather ( const Field< T, Dim, M, C > &  f,
const ParticleAttrib< Vektor< PT, Dim > > &  pp,
const IntOp &  ,
ParticleAttrib< CacheData > &  cache 
)
inline

◆ getMessage()

template<class T >
size_t ParticleAttrib< T >::getMessage ( Message msg,
size_t  M 
)
virtual

Implements ParticleAttribBase.

Definition at line 279 of file ParticleAttrib.hpp.

References getMessage(), getMessage_iter(), and PAssert_EQ.

Referenced by DiscParticle::read().

Here is the call graph for this function:

◆ ghostCreate()

template<class T >
void ParticleAttrib< T >::ghostCreate ( size_t  M)
virtual

Implements ParticleAttribBase.

Definition at line 328 of file ParticleAttrib.hpp.

References Attrib::Legacy::Distribution::T.

◆ ghostDestroy()

template<class T >
size_t ParticleAttrib< T >::ghostDestroy ( size_t  M,
size_t  I 
)
virtual

Implements ParticleAttribBase.

Reimplemented in ParticleInteractAttrib< T >.

Definition at line 341 of file ParticleAttrib.hpp.

◆ ghostGetMessage()

template<class T >
size_t ParticleAttrib< T >::ghostGetMessage ( Message msg,
size_t  M 
)
virtual

Implements ParticleAttribBase.

Reimplemented in ParticleInteractAttrib< T >.

Definition at line 354 of file ParticleAttrib.hpp.

References getMessage_iter().

Here is the call graph for this function:

◆ ghostPutMessage() [1/2]

template<class T >
size_t ParticleAttrib< T >::ghostPutMessage ( Message ,
const std::vector< size_t > &   
)
virtual

Implements ParticleAttribBase.

Reimplemented in ParticleInteractAttrib< T >.

Definition at line 318 of file ParticleAttrib.hpp.

◆ ghostPutMessage() [2/2]

template<class T >
size_t ParticleAttrib< T >::ghostPutMessage ( Message ,
size_t  ,
size_t   
)
virtual

Implements ParticleAttribBase.

Reimplemented in ParticleInteractAttrib< T >.

Definition at line 312 of file ParticleAttrib.hpp.

◆ isDirty()

template<class T >
bool ParticleAttrib< T >::isDirty ( )
inline

notify user that attribute has changed. The user is responsible to define the meaning of the dirt and clean state

Definition at line 135 of file ParticleAttrib.h.

References ParticleAttrib< T >::attributeIsDirty_, and reduce().

Referenced by AmrPartBunch::boundp().

Here is the call graph for this function:

◆ MakeExpression()

template<class T >
PETE_Expr_t ParticleAttrib< T >::MakeExpression ( ) const
inline

Definition at line 171 of file ParticleAttrib.h.

References ParticleAttrib< T >::cbegin().

Here is the call graph for this function:

◆ operator()() [1/3]

template<class T >
ParticleAttribElem< T, 1U > ParticleAttrib< T >::operator() ( unsigned  i)

Definition at line 41 of file ParticleAttrib.hpp.

References PInsist.

◆ operator()() [2/3]

template<class T >
ParticleAttribElem< T, 2U > ParticleAttrib< T >::operator() ( unsigned  i,
unsigned  j 
)

Definition at line 52 of file ParticleAttrib.hpp.

References PInsist.

◆ operator()() [3/3]

template<class T >
ParticleAttribElem< T, 3U > ParticleAttrib< T >::operator() ( unsigned  i,
unsigned  j,
unsigned  k 
)

Definition at line 63 of file ParticleAttrib.hpp.

References PInsist.

◆ operator=() [1/3]

template<class T >
const ParticleAttrib<T>& ParticleAttrib< T >::operator= ( const ParticleAttrib< T > &  rhs)
inline

Definition at line 387 of file ParticleAttrib.h.

References assign(), endl(), ERRORMSG, and ParticleAttrib< T >::size().

Here is the call graph for this function:

◆ operator=() [2/3]

template<class T >
template<class T1 >
const ParticleAttrib<T>& ParticleAttrib< T >::operator= ( const PETE_Expr< T1 > &  rhs)
inline

Definition at line 381 of file ParticleAttrib.h.

References assign().

Here is the call graph for this function:

◆ operator=() [3/3]

template<class T >
const ParticleAttrib<T>& ParticleAttrib< T >::operator= ( rhs)
inline

Definition at line 397 of file ParticleAttrib.h.

References assign().

Here is the call graph for this function:

◆ operator[]() [1/3]

template<class T >
template<unsigned Dim>
SubParticleAttrib<ParticleAttrib<T>, T, Dim> ParticleAttrib< T >::operator[] ( const SIndex< Dim > &  s) const
inline

Definition at line 161 of file ParticleAttrib.h.

References a, Dim, and Attrib::Legacy::Distribution::T.

◆ operator[]() [2/3]

template<class T >
ParticleList_t::reference ParticleAttrib< T >::operator[] ( size_t  n)
inline

◆ operator[]() [3/3]

template<class T >
ParticleList_t::const_reference ParticleAttrib< T >::operator[] ( size_t  n) const
inline

Definition at line 151 of file ParticleAttrib.h.

References Hypervolume::n, and ParticleAttrib< T >::ParticleList.

◆ printDebug()

template<class T >
void ParticleAttrib< T >::printDebug ( Inform o)
virtual

Implements ParticleAttribBase.

Reimplemented in ParticleInteractAttrib< T >.

Definition at line 371 of file ParticleAttrib.hpp.

◆ putMessage() [1/2]

template<class T >
size_t ParticleAttrib< T >::putMessage ( Message msg,
const std::vector< size_t > &  putList 
)
virtual

Implements ParticleAttribBase.

Reimplemented in ParticleInteractAttrib< T >.

Definition at line 254 of file ParticleAttrib.hpp.

References putMessage().

Here is the call graph for this function:

◆ putMessage() [2/2]

template<class T >
size_t ParticleAttrib< T >::putMessage ( Message msg,
size_t  M,
size_t  I 
)
virtual

Implements ParticleAttribBase.

Reimplemented in ParticleInteractAttrib< T >.

Definition at line 231 of file ParticleAttrib.hpp.

References putMessage().

Referenced by ParticleInteractAttrib< T >::putMessage(), and DiscParticle::write().

Here is the call graph for this function:

◆ resetDirtyFlag()

template<class T >
void ParticleAttrib< T >::resetDirtyFlag ( )
inline

Definition at line 140 of file ParticleAttrib.h.

References ParticleAttrib< T >::attributeIsDirty_.

Referenced by AmrPartBunch::boundp().

◆ scatter() [1/3]

template<class T >
template<unsigned Dim, class M , class C , class IntOp , class CacheData >
void ParticleAttrib< T >::scatter ( Field< T, Dim, M, C > &  f,
const IntOp &  ,
const ParticleAttrib< CacheData > &  cache 
) const
inline

◆ scatter() [2/3]

template<class T >
template<unsigned Dim, class M , class C , class PT , class IntOp >
void ParticleAttrib< T >::scatter ( Field< T, Dim, M, C > &  f,
const ParticleAttrib< Vektor< PT, Dim > > &  pp,
const IntOp &   
) const
inline

◆ scatter() [3/3]

template<class T >
template<unsigned Dim, class M , class C , class PT , class IntOp , class CacheData >
void ParticleAttrib< T >::scatter ( Field< T, Dim, M, C > &  f,
const ParticleAttrib< Vektor< PT, Dim > > &  pp,
const IntOp &  ,
ParticleAttrib< CacheData > &  cache 
) const
inline

◆ size()

template<class T >
size_t ParticleAttrib< T >::size ( void  ) const
inline

◆ sort()

template<class T >
void ParticleAttrib< T >::sort ( SortList_t slist)
virtual

Implements ParticleAttribBase.

Definition at line 492 of file ParticleAttrib.hpp.

References PAssert_GE.

Friends And Related Function Documentation

◆ ParticleAttribConstIterator< T >

template<class T >
friend class ParticleAttribConstIterator< T >
friend

Definition at line 920 of file ParticleAttrib.h.

◆ ParticleAttribIterator< T >

template<class T >
friend class ParticleAttribIterator< T >
friend

Definition at line 920 of file ParticleAttrib.h.

Member Data Documentation

◆ attributeIsDirty_

template<class T >
bool ParticleAttrib< T >::attributeIsDirty_
private

◆ LocalSize

template<class T >
size_t ParticleAttrib< T >::LocalSize
protected

◆ ParticleList

template<class T >
ParticleList_t ParticleAttrib< T >::ParticleList
protected

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