ESyS-Particle  2.3.4
ParallelInteractionStorage_E< P, I > Class Template Reference

parallel interaction storage array with exchange More...

#include <pi_storage_e.h>

Inheritance diagram for ParallelInteractionStorage_E< P, I >:
Collaboration diagram for ParallelInteractionStorage_E< P, I >:

Public Types

typedef TParallelInteractionStorage< I > Inherited
 
typedef Inherited::InteractionIterator InteractionIterator
 
- Public Types inherited from TParallelInteractionStorage< I >
typedef I interaction_type
 
typedef esys::lsm::quintuple< Vec3, double, Vec3, double, Vec3Raw2Data
 
typedef esys::lsm::triplet< int, int, Vec3DataWithID
 
typedef esys::lsm::quintuple< int, int, Vec3, Vec3, Vec3DataWithPosID
 access functions More...
 

Public Member Functions

 ParallelInteractionStorage_E (AParallelParticleArray *, const typename I::ParameterType &)
 
virtual void setUnbreakable (bool)
 
virtual void exchange ()
 
virtual void rebuild ()
 
virtual void tryInsert (const I &)
 
virtual void tryInsert (const std::vector< int > &)
 
virtual bool isIn (const std::vector< int > &)
 
virtual void setTimeStepSize (double)
 does nothing More...
 
virtual void calcForces ()
 
- Public Member Functions inherited from TParallelInteractionStorage< I >
 TParallelInteractionStorage (AParallelParticleArray *ppa)
 
virtual ~TParallelInteractionStorage ()
 
InteractionIterator getInnerInteractionIterator ()
 types More...
 
template<typename P >
vector< pair< Vec3, P > > forAllInnerInteractionsGetWithPos (P(I::*rdf)() const)
 
template<typename P >
vector< pair< Raw2Data, P > > forAllInnerInteractionsGetRaw2 (P(I::*rdf)() const)
 
template<typename P >
vector< pair< DataWithID, P > > forAllInnerInteractionsGetDataWithID (P(I::*rdf)() const)
 
template<typename P >
vector< pair< DataWithPosID, P > > forAllInnerInteractionsGetDataWithPosID (P(I::*rdf)() const)
 
template<typename P >
void forAllInnerInteractionsGet (P &, typename P::value_type(I::*rdf)() const)
 access functions with tags More...
 
template<typename P >
vector< pair< Vec3, P > > forAllTaggedInnerInteractionsGetWithPos (P(I::*rdf)() const, int, int)
 
template<typename P >
void forAllTaggedInnerInteractionsGet (P &, typename P::value_type(I::*rdf)() const, int, int)
 generate FieldSlave of correct type More...
 
virtual AFieldSlavegenerateNewScalarFieldSlave (TML_Comm *, const string &, int, int, int, int)
 
virtual AFieldSlavegenerateNewVectorFieldSlave (TML_Comm *, const string &, int, int, int, int)
 
template<typename P >
vector< pair< typename TParallelInteractionStorage< I >::Raw2Data, P > > forAllInnerInteractionsGetRaw2 (P(I::*rdf)() const)
 
template<typename P >
vector< pair< typename TParallelInteractionStorage< I >::DataWithPosID, P > > forAllInnerInteractionsGetDataWithPosID (P(I::*rdf)() const)
 
template<typename P >
vector< pair< typename TParallelInteractionStorage< I >::DataWithID, P > > forAllInnerInteractionsGetDataWithID (P(I::*rdf)() const)
 

Public Attributes

bool m_unbreakable
 

Protected Attributes

TML_CartComm m_comm
 
set< pair< int, int > > m_set
 
I::ParameterType m_param
 
- Protected Attributes inherited from TParallelInteractionStorage< I >
list< I > m_interactions
 

Private Member Functions

void exchange_boundary (int, int)
 

Static Private Attributes

static const int m_exchg_tag =43
 

Detailed Description

template<typename P, typename I>
class ParallelInteractionStorage_E< P, I >

parallel interaction storage array with exchange

Member Typedef Documentation

◆ Inherited

template<typename P , typename I >
typedef TParallelInteractionStorage<I> ParallelInteractionStorage_E< P, I >::Inherited

◆ InteractionIterator

template<typename P , typename I >
typedef Inherited::InteractionIterator ParallelInteractionStorage_E< P, I >::InteractionIterator

Constructor & Destructor Documentation

◆ ParallelInteractionStorage_E()

template<typename P , typename I >
ParallelInteractionStorage_E< P, I >::ParallelInteractionStorage_E ( AParallelParticleArray PPA,
const typename I::ParameterType &  param 
)

Construct parallel interaction storage

Parameters
PPAa pointer to the particle array
paramthe interaction parameters

References ParallelInteractionStorage_E< P, I >::m_unbreakable.

Member Function Documentation

◆ calcForces()

template<typename P , typename InteractionType >
void ParallelInteractionStorage_E< P, InteractionType >::calcForces
virtual

calculate all forces

References console, and Console::Debug().

Here is the call graph for this function:

◆ exchange()

template<typename P , typename InteractionType >
void ParallelInteractionStorage_E< P, InteractionType >::exchange
virtual

◆ exchange_boundary()

template<typename P , typename InteractionType >
void ParallelInteractionStorage_E< P, InteractionType >::exchange_boundary ( int  dim,
int  dir 
)
private

helper function to do the actual shifting of values in exchange()

Parameters
dimdimension, 0->x, 1->y, 2->z
dirdirection, 1->up, -1->down

References console, esys::lsm::bpu::iter(), and Console::XDebug().

Here is the call graph for this function:

◆ isIn()

template<typename P , typename InteractionType >
bool ParallelInteractionStorage_E< P, InteractionType >::isIn ( const std::vector< int > &  pids)
virtual
Warning
evil hack, only checks 1st & 2nd id -> change from pair<int,int> to vector<int>

References console, and Console::Debug().

Here is the call graph for this function:

◆ rebuild()

template<typename P , typename InteractionType >
void ParallelInteractionStorage_E< P, InteractionType >::rebuild
virtual

rebuild all interactions, i.e. set particle pointers according to particle indices

References console, ParallelParticleArray< T >::getParticlePtrByIndex(), esys::lsm::bpu::iter(), NULL, and Console::XDebug().

Here is the call graph for this function:

◆ setTimeStepSize()

template<typename P , typename I >
virtual void ParallelInteractionStorage_E< P, I >::setTimeStepSize ( double  )
inlinevirtual

does nothing

Reimplemented in ParallelInteractionStorage_ED< P, I >.

◆ setUnbreakable()

template<typename P , typename InteractionType >
void ParallelInteractionStorage_E< P, InteractionType >::setUnbreakable ( bool  b)
virtual

set the interactions "unbreakable" -> turns update into a NO-OP

Parameters
btrue -> unbreakable, false -> breakable

Reimplemented in ParallelInteractionStorage_EB< P, I >.

◆ tryInsert() [1/2]

template<typename P , typename I >
virtual void ParallelInteractionStorage_E< P, I >::tryInsert ( const I &  )
virtual

◆ tryInsert() [2/2]

template<typename P , typename InteractionType >
void ParallelInteractionStorage_E< P, InteractionType >::tryInsert ( const std::vector< int > &  cpids)
virtual

Insert interactions newly created from particle Ids and parameters. If insertion is impossible because the interaction is already in, or one of the particles is not in the associated PPA nothing happens.

Parameters
cpidsthe particle Ids

References console, ParallelParticleArray< T >::getParticlePtrByIndex(), esys::lsm::bpu::iter(), NULL, and Console::XDebug().

Here is the call graph for this function:

Member Data Documentation

◆ m_comm

template<typename P , typename I >
TML_CartComm ParallelInteractionStorage_E< P, I >::m_comm
protected

◆ m_exchg_tag

template<typename P , typename InteractionType >
const int ParallelInteractionStorage_E< P, InteractionType >::m_exchg_tag =43
staticprivate

◆ m_param

template<typename P , typename I >
I::ParameterType ParallelInteractionStorage_E< P, I >::m_param
protected

◆ m_set

template<typename P , typename I >
set<pair<int,int> > ParallelInteractionStorage_E< P, I >::m_set
protected

◆ m_unbreakable

template<typename P , typename I >
bool ParallelInteractionStorage_E< P, I >::m_unbreakable

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