PhyStar  v0.0.0 thu24
dmdyn::SmartPList< T > Class Template Reference

particle field list model More...

#include <SmartPList.hpp>

Collaboration diagram for dmdyn::SmartPList< T >:

Classes

class  Iterator
 

Public Member Functions

Iterator begin ()
 
Iterator end ()
 
Iterator vbegin ()
 
Iterator vend ()
 
 SmartPList ()
 
 SmartPList (const int &num, const int vnum=0)
 
void Init (const int &num, const int vnum=0)
 
void Clear ()
 
void InitPresreveBuffer ()
 
void ChangeStatus (const SPLTag &status)
 
void AllocateBuffer ()
 
void AllocateBuffer (const int lens0)
 
const T & Add (const T &val)
 add element to pfield list More...
 
void InitVirtualRegion ()
 set the virtual particle length to zero More...
 
const T & AddVirtual (const T &val)
 add a virtual particle More...
 
const T & GetAndRemove (const int &ind)
 Get element and Remove it. More...
 
void Compact ()
 remove all empty cavity, will be called after particle send and recieve More...
 
void InitCavityIndex ()
 
const int Length ()
 length of valid field list More...
 
const int MaxLength ()
 length of field list including removed position, not including the virtual particle part More...
 
const int MaxLengthIncludeVirtual ()
 
const int MaxVirtualRegionLength ()
 
const int BufferLength ()
 length of the buffer More...
 
T & RemovedList (const int &i)
 
int RemovedMaxSize ()
 
std::string PrintRemovedInd ()
 
T & operator() (const int &i)
 
void InitVirtualWaitingList ()
 
void AddIndexToVirtualWaitingList (const int vind)
 
int VirtualWaitingListMaxSize ()
 
T & VirtualWaitingList (const int i)
 
T & VirtualRegion (const int i)
 
void SetAuxstep (const int &aup, const int &auf)
 

Public Attributes

int auxstep_pdata = 0
 
int auxstep_fdata = 0
 

Private Attributes

Array1< T > _buffer
 
CavityIndex _cind
 
CavityIndex _vindtemp
 
int _len = 0
 
int _vlen = 0
 
SPLTag _status = SPLTag::Free
 

Detailed Description

template<typename T>
class dmdyn::SmartPList< T >

particle field list model

buffer model:

|0|1|2|...|10|11|12|...|20|21|...|29|30| | | | | V V V V start _len-1 _len+_vlen-1 buffer size-1 =1.5(_len+_vlen)-1;

Template Parameters
T

Constructor & Destructor Documentation

◆ SmartPList() [1/2]

template<typename T >
dmdyn::SmartPList< T >::SmartPList ( )
inline

◆ SmartPList() [2/2]

template<typename T >
dmdyn::SmartPList< T >::SmartPList ( const int &  num,
const int  vnum = 0 
)
inline

Member Function Documentation

◆ Add()

template<typename T >
const T& dmdyn::SmartPList< T >::Add ( const T &  val)
inline

add element to pfield list

Parameters
val

References dmdyn::AddOnly, dmdyn::CavityQueue< T >::Dequeue(), and dmdyn::CavityQueue< T >::IsEmpty().

Here is the call graph for this function:

◆ AddIndexToVirtualWaitingList()

template<typename T >
void dmdyn::SmartPList< T >::AddIndexToVirtualWaitingList ( const int  vind)
inline

References dmdyn::CavityQueue< T >::Inqueue().

Here is the call graph for this function:

◆ AddVirtual()

template<typename T >
const T& dmdyn::SmartPList< T >::AddVirtual ( const T &  val)
inline

add a virtual particle

Parameters
valusually a particleField
Returns

References dmdyn::AddVirtualListOnly.

◆ AllocateBuffer() [1/2]

template<typename T >
void dmdyn::SmartPList< T >::AllocateBuffer ( )
inline

References dmdyn::ReadOnly.

◆ AllocateBuffer() [2/2]

template<typename T >
void dmdyn::SmartPList< T >::AllocateBuffer ( const int  lens0)
inline

References dmdyn::ReadOnly.

◆ begin()

template<typename T >
Iterator dmdyn::SmartPList< T >::begin ( )
inline

◆ BufferLength()

template<typename T >
const int dmdyn::SmartPList< T >::BufferLength ( )
inline

length of the buffer

Returns
const int

◆ ChangeStatus()

template<typename T >
void dmdyn::SmartPList< T >::ChangeStatus ( const SPLTag status)
inline

◆ Clear()

template<typename T >
void dmdyn::SmartPList< T >::Clear ( )
inline

◆ Compact()

template<typename T >
void dmdyn::SmartPList< T >::Compact ( )
inline

remove all empty cavity, will be called after particle send and recieve

References dmdyn::CavityQueue< T >::IsEmpty(), and dmdyn::CavityQueue< T >::Pop().

Here is the call graph for this function:

◆ end()

template<typename T >
Iterator dmdyn::SmartPList< T >::end ( )
inline

◆ GetAndRemove()

template<typename T >
const T& dmdyn::SmartPList< T >::GetAndRemove ( const int &  ind)
inline

Get element and Remove it.

Parameters
ind
Returns
const T&

References dmdyn::GetAndRemoveOnly, dmdyn::CavityQueue< T >::Inqueue(), and dmdyn::CavityQueue< T >::IsInqueuing().

Here is the call graph for this function:

◆ Init()

template<typename T >
void dmdyn::SmartPList< T >::Init ( const int &  num,
const int  vnum = 0 
)
inline

References dmdyn::CavityQueue< T >::Init().

Here is the call graph for this function:

◆ InitCavityIndex()

template<typename T >
void dmdyn::SmartPList< T >::InitCavityIndex ( )
inline

References dmdyn::CavityQueue< T >::InitQueue().

Here is the call graph for this function:

◆ InitPresreveBuffer()

template<typename T >
void dmdyn::SmartPList< T >::InitPresreveBuffer ( )
inline

References dmdyn::CavityQueue< T >::InitQueue().

Here is the call graph for this function:

◆ InitVirtualRegion()

template<typename T >
void dmdyn::SmartPList< T >::InitVirtualRegion ( )
inline

set the virtual particle length to zero

References dmdyn::AddVirtualListOnly.

◆ InitVirtualWaitingList()

template<typename T >
void dmdyn::SmartPList< T >::InitVirtualWaitingList ( )
inline

References dmdyn::CavityQueue< T >::CleanBuffer(), and dmdyn::CavityQueue< T >::InitQueue().

Here is the call graph for this function:

◆ Length()

template<typename T >
const int dmdyn::SmartPList< T >::Length ( )
inline

length of valid field list

Returns
const int

References dmdyn::CavityQueue< T >::Length().

Here is the call graph for this function:

◆ MaxLength()

template<typename T >
const int dmdyn::SmartPList< T >::MaxLength ( )
inline

length of field list including removed position, not including the virtual particle part

Returns
const T

◆ MaxLengthIncludeVirtual()

template<typename T >
const int dmdyn::SmartPList< T >::MaxLengthIncludeVirtual ( )
inline
Here is the caller graph for this function:

◆ MaxVirtualRegionLength()

template<typename T >
const int dmdyn::SmartPList< T >::MaxVirtualRegionLength ( )
inline

◆ operator()()

template<typename T >
T& dmdyn::SmartPList< T >::operator() ( const int &  i)
inline

◆ PrintRemovedInd()

template<typename T >
std::string dmdyn::SmartPList< T >::PrintRemovedInd ( )
inline

References dmdyn::CavityQueue< T >::MaxLength().

Here is the call graph for this function:

◆ RemovedList()

template<typename T >
T& dmdyn::SmartPList< T >::RemovedList ( const int &  i)
inline

◆ RemovedMaxSize()

template<typename T >
int dmdyn::SmartPList< T >::RemovedMaxSize ( )
inline

References dmdyn::CavityQueue< T >::MaxLength().

Here is the call graph for this function:

◆ SetAuxstep()

template<typename T >
void dmdyn::SmartPList< T >::SetAuxstep ( const int &  aup,
const int &  auf 
)
inline

◆ vbegin()

template<typename T >
Iterator dmdyn::SmartPList< T >::vbegin ( )
inline

◆ vend()

template<typename T >
Iterator dmdyn::SmartPList< T >::vend ( )
inline

◆ VirtualRegion()

template<typename T >
T& dmdyn::SmartPList< T >::VirtualRegion ( const int  i)
inline

◆ VirtualWaitingList()

template<typename T >
T& dmdyn::SmartPList< T >::VirtualWaitingList ( const int  i)
inline

◆ VirtualWaitingListMaxSize()

template<typename T >
int dmdyn::SmartPList< T >::VirtualWaitingListMaxSize ( )
inline

References dmdyn::CavityQueue< T >::MaxLength().

Here is the call graph for this function:

Member Data Documentation

◆ _buffer

template<typename T >
Array1<T> dmdyn::SmartPList< T >::_buffer
private

◆ _cind

template<typename T >
CavityIndex dmdyn::SmartPList< T >::_cind
private

◆ _len

template<typename T >
int dmdyn::SmartPList< T >::_len = 0
private

◆ _status

template<typename T >
SPLTag dmdyn::SmartPList< T >::_status = SPLTag::Free
private

◆ _vindtemp

template<typename T >
CavityIndex dmdyn::SmartPList< T >::_vindtemp
private

◆ _vlen

template<typename T >
int dmdyn::SmartPList< T >::_vlen = 0
private

◆ auxstep_fdata

template<typename T >
int dmdyn::SmartPList< T >::auxstep_fdata = 0

◆ auxstep_pdata

template<typename T >
int dmdyn::SmartPList< T >::auxstep_pdata = 0

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