ESyS-Particle  2.3.4
TriMesh_PIS_EB< ParticleType, IType > Class Template Reference

Class for parallel storage of interactions between a triangle mesh and particles which does require exchange of interactions across process boundaries but where interactions are not dynamically formed. More...

#include <trimesh_pis_eb.h>

Inheritance diagram for TriMesh_PIS_EB< ParticleType, IType >:
Collaboration diagram for TriMesh_PIS_EB< ParticleType, IType >:

Public Member Functions

 TriMesh_PIS_EB (TriMesh *, ParallelParticleArray< ParticleType > *, typename IType::ParameterType)
 
virtual bool isIn (const vector< int > &)
 
virtual void setTimeStepSize (double dt)
 
virtual void calcForces ()
 
virtual bool update ()
 
virtual void exchange ()
 
virtual void rebuild ()
 
virtual void tryInsert (const typename IType::TriIntType &)
 
virtual void tryInsert (const vector< int > &)
 
virtual void saveSnapShotData (std::ostream &)
 
void buildFromPPATagged (int, int)
 
void buildFromPPAByGap (double)
 
- Public Member Functions inherited from TriMesh_PIS< ParticleType >
 TriMesh_PIS (TriMesh *, ParallelParticleArray< ParticleType > *)
 
virtual ~TriMesh_PIS ()
 
virtual void addExIG (AParallelInteractionStorage *)
 
virtual AFieldSlavegenerateNewScalarFieldSlave (TML_Comm *, const string &, int, int, int, int)
 
virtual AFieldSlavegenerateNewVectorFieldSlave (TML_Comm *, const string &, int, int, int, int)
 
- Public Member Functions inherited from AParallelInteractionStorage
 AParallelInteractionStorage (AParallelParticleArray *ppa)
 
virtual ~AParallelInteractionStorage ()
 
virtual void calcHeatFrict ()
 
virtual void calcHeatTrans ()
 
virtual AFieldSlavegenerateNewScalarHistoryFieldSlave (TML_Comm *, const string &, int, int, int)
 
virtual void saveCheckPointData (std::ostream &)
 
virtual void loadCheckPointData (std::istream &)
 
virtual bool willSave ()
 
- Public Member Functions inherited from esys::lsm::CheckPointable
 CheckPointable ()
 
virtual ~CheckPointable ()
 

Protected Attributes

IType::ParameterType m_param
 
TML_CartComm m_comm
 
set< pair< int, int > > m_tri_int_set
 
list< typename IType::TriIntType > m_triangle_interactions
 
- Protected Attributes inherited from TriMesh_PIS< ParticleType >
int m_update_timestamp
 
TriMeshm_mesh
 
- Protected Attributes inherited from AParallelInteractionStorage
AParallelParticleArraym_ppa
 

Private Member Functions

void exchange_boundary (int, int)
 

Static Private Attributes

static const int m_exchg_tag =44
 

Detailed Description

template<class ParticleType, class IType>
class TriMesh_PIS_EB< ParticleType, IType >

Class for parallel storage of interactions between a triangle mesh and particles which does require exchange of interactions across process boundaries but where interactions are not dynamically formed.

Constructor & Destructor Documentation

◆ TriMesh_PIS_EB()

template<class ParticleType , class IType >
TriMesh_PIS_EB< ParticleType, IType >::TriMesh_PIS_EB ( TriMesh mesh_p,
ParallelParticleArray< ParticleType > *  ppa_p,
typename IType::ParameterType  param 
)

constructor

Parameters
mesh_pa pointer to the triangle mesh
ppa_pa pointer to the particle array
paramthe interaction parameters

References console, TriMesh_PIS_EB< ParticleType, IType >::m_param, TriMesh_PIS< ParticleType >::m_update_timestamp, and Console::XDebug().

Here is the call graph for this function:

Member Function Documentation

◆ buildFromPPAByGap()

template<class ParticleType , class IType >
void TriMesh_PIS_EB< ParticleType, IType >::buildFromPPAByGap ( double  gmax)

References console, and Console::XDebug().

Referenced by TSubLattice< T >::addBondedTriMeshIG().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ buildFromPPATagged()

template<class ParticleType , class IType >
void TriMesh_PIS_EB< ParticleType, IType >::buildFromPPATagged ( int  tag,
int  mask 
)

References console, and Console::XDebug().

Referenced by TSubLattice< T >::addBondedTriMeshIG().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calcForces()

template<class ParticleType , class IType >
void TriMesh_PIS_EB< ParticleType, IType >::calcForces
virtual

calculate all the forces

Implements AParallelInteractionStorage.

References console, and Console::XDebug().

Here is the call graph for this function:

◆ exchange()

template<class ParticleType , class IType >
void TriMesh_PIS_EB< ParticleType, IType >::exchange
virtual

Implements AParallelInteractionStorage.

References console, and Console::XDebug().

Here is the call graph for this function:

◆ exchange_boundary()

template<class ParticleType , class IType >
void TriMesh_PIS_EB< ParticleType, IType >::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<class ParticleType , class IType >
bool TriMesh_PIS_EB< ParticleType, IType >::isIn ( const vector< int > &  v)
virtual

Check if an interaction is in this PIS. The first 2 values in the vector are expected to be the tri/edge/corner (v[0]) and particle (v[1]) ids, the 3rd an indicator if tri (v[2]==0),edge (v[2]==1)or corner (v[2]==2) interaction. If there is no 3rd value or it is not 0 (tri), "false" is returned.

Parameters
vvector of particle ids
Warning
log(N)

Implements AParallelInteractionStorage.

References console, and Console::Error().

Here is the call graph for this function:

◆ rebuild()

template<class ParticleType , class IType >
void TriMesh_PIS_EB< ParticleType, IType >::rebuild
virtual

Rebuild interactions after moving particles or interactions between processes. Set particle pointers accordig to particle IDs and remove interactionw which include unavailable particles.

Implements AParallelInteractionStorage.

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

Here is the call graph for this function:

◆ saveSnapShotData()

template<class ParticleType , class IType >
void TriMesh_PIS_EB< ParticleType, IType >::saveSnapShotData ( std::ostream &  oStream)
virtual

save snapshot (i.e. viz/postprocess) data

Parameters
oStreama reference to the stream where the data is written

Reimplemented from AParallelInteractionStorage.

◆ setTimeStepSize()

template<class ParticleType , class IType >
void TriMesh_PIS_EB< ParticleType, IType >::setTimeStepSize ( double  dt)
virtual

◆ tryInsert() [1/2]

template<class ParticleType , class IType >
void TriMesh_PIS_EB< ParticleType, IType >::tryInsert ( const typename IType::TriIntType &  In)
virtual

References ParallelParticleArray< T >::getParticlePtrByIndex(), and NULL.

Here is the call graph for this function:

◆ tryInsert() [2/2]

template<class ParticleType , class IType >
void TriMesh_PIS_EB< ParticleType, IType >::tryInsert ( const vector< int > &  pids)
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. Check if an interaction is in this PIS. The first 2 values in the vector are expected to be the tri/edge/corner (pids[0]) and particle (pids[1]) ids, the 3rd an indicator if tri (pids[2]==0),edge (pids[2]==1)or corner (pids[2]==2) interaction. If there is no 3rd value or it is not in [0,1,2], nothing happens.

Parameters
pidsthe particle Ids

References console, Console::Error(), ParallelParticleArray< T >::getParticlePtrByIndex(), and NULL.

Here is the call graph for this function:

◆ update()

template<class ParticleType , class IType >
bool TriMesh_PIS_EB< ParticleType, IType >::update
virtual

Implements AParallelInteractionStorage.

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

Here is the call graph for this function:

Member Data Documentation

◆ m_comm

template<class ParticleType , class IType >
TML_CartComm TriMesh_PIS_EB< ParticleType, IType >::m_comm
protected

◆ m_exchg_tag

template<class ParticleType , class IType >
const int TriMesh_PIS_EB< ParticleType, IType >::m_exchg_tag =44
staticprivate

◆ m_param

template<class ParticleType , class IType >
IType::ParameterType TriMesh_PIS_EB< ParticleType, IType >::m_param
protected

◆ m_tri_int_set

template<class ParticleType , class IType >
set<pair<int,int> > TriMesh_PIS_EB< ParticleType, IType >::m_tri_int_set
protected

◆ m_triangle_interactions

template<class ParticleType , class IType >
list<typename IType::TriIntType> TriMesh_PIS_EB< ParticleType, IType >::m_triangle_interactions
protected

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