ESyS-Particle  2.3.4
esys::lsm::ParticleCollection< TmplParticle > Class Template Reference

#include <ParticleCollection.h>

Inheritance diagram for esys::lsm::ParticleCollection< TmplParticle >:

Classes

class  ParticleConstIterator
 
class  ParticleIterator
 

Public Types

typedef TmplParticle Particle
 
typedef boost::object_pool< ParticleParticlePool
 
typedef boost::shared_ptr< ParticlePoolParticlePoolPtr
 

Public Member Functions

 ParticleCollection ()
 
 ParticleCollection (ParticlePoolPtr particlePoolPtr)
 
 ParticleCollection (const ParticleCollection &p)
 
ParticleCollectionoperator= (const ParticleCollection &p)
 
virtual ~ParticleCollection ()
 
int getNumParticles () const
 
BoundingBox getParticleBBox () const
 
ParticleIterator getParticleIterator ()
 
ParticleConstIterator getParticleIterator () const
 
void translateBy (const Vec3 &vec)
 
void rotate (const Vec3 &rotation, const Vec3 &posn)
 
void incrementIdBy (typename Particle::Id idIncr)
 
void insertRef (Particle &p)
 
ParticlecreateParticle (const Particle &p)
 

Protected Member Functions

void noCheckInsertRef (Particle &p)
 

Private Types

typedef std::vector< Particle * > ParticleVector
 
typedef ForwardIterator< ParticleVectorVectorIterator
 
typedef ForwardConstIterator< ParticleVectorVectorConstIterator
 

Private Attributes

ParticlePoolPtr m_particlePoolPtr
 
ParticleVector m_particleVector
 

Member Typedef Documentation

◆ Particle

template<typename TmplParticle >
typedef TmplParticle esys::lsm::ParticleCollection< TmplParticle >::Particle

◆ ParticlePool

template<typename TmplParticle >
typedef boost::object_pool<Particle> esys::lsm::ParticleCollection< TmplParticle >::ParticlePool

◆ ParticlePoolPtr

template<typename TmplParticle >
typedef boost::shared_ptr<ParticlePool> esys::lsm::ParticleCollection< TmplParticle >::ParticlePoolPtr

◆ ParticleVector

template<typename TmplParticle >
typedef std::vector<Particle *> esys::lsm::ParticleCollection< TmplParticle >::ParticleVector
private

◆ VectorConstIterator

template<typename TmplParticle >
typedef ForwardConstIterator<ParticleVector> esys::lsm::ParticleCollection< TmplParticle >::VectorConstIterator
private

◆ VectorIterator

template<typename TmplParticle >
typedef ForwardIterator<ParticleVector> esys::lsm::ParticleCollection< TmplParticle >::VectorIterator
private

Constructor & Destructor Documentation

◆ ParticleCollection() [1/3]

◆ ParticleCollection() [2/3]

template<typename TmplParticle >
esys::lsm::ParticleCollection< TmplParticle >::ParticleCollection ( ParticlePoolPtr  particlePoolPtr)

◆ ParticleCollection() [3/3]

template<typename TmplParticle >
esys::lsm::ParticleCollection< TmplParticle >::ParticleCollection ( const ParticleCollection< TmplParticle > &  p)

◆ ~ParticleCollection()

template<typename TmplParticle >
esys::lsm::ParticleCollection< TmplParticle >::~ParticleCollection
virtual

Member Function Documentation

◆ createParticle()

template<typename TmplParticle >
ParticleCollection< TmplParticle >::Particle & esys::lsm::ParticleCollection< TmplParticle >::createParticle ( const Particle p)

Creates a new particle constructed particle from p.

Parameters
pCreate particle copy constructed from p.
Returns
returns reference to newly constructed particle.

Referenced by esys::lsm::ParticleCollectionPy::createParticlePy(), esys::lsm::SimpleSphereCollectionPy::createParticlePy(), esys::lsm::ParticleCollectionPyPickleSuite::setstate(), and esys::lsm::SimpleSphereCollectionPyPickleSuite::setstate().

Here is the caller graph for this function:

◆ getNumParticles()

template<typename TmplParticle >
int esys::lsm::ParticleCollection< TmplParticle >::getNumParticles

◆ getParticleBBox()

template<typename TmplParticle >
BoundingBox esys::lsm::ParticleCollection< TmplParticle >::getParticleBBox

◆ getParticleIterator() [1/2]

template<typename TmplParticle >
ParticleIterator esys::lsm::ParticleCollection< TmplParticle >::getParticleIterator ( )
inline

◆ getParticleIterator() [2/2]

template<typename TmplParticle >
ParticleConstIterator esys::lsm::ParticleCollection< TmplParticle >::getParticleIterator ( ) const
inline

◆ incrementIdBy()

template<typename TmplParticle >
void esys::lsm::ParticleCollection< TmplParticle >::incrementIdBy ( typename Particle::Id  idIncr)

Increments all particle Id's by the specifed amount.

Parameters
idIncrIncrement.

◆ insertRef()

template<typename TmplParticle >
void esys::lsm::ParticleCollection< TmplParticle >::insertRef ( Particle p)

Adds the specifed particle reference to this collection.

Parameters
pReference to p is inserted.

◆ noCheckInsertRef()

template<typename TmplParticle >
void esys::lsm::ParticleCollection< TmplParticle >::noCheckInsertRef ( Particle p)
protected

Adds the specifed particle reference to this collection.

Parameters
pReference to p is inserted.

◆ operator=()

template<typename TmplParticle >
ParticleCollection< TmplParticle > & esys::lsm::ParticleCollection< TmplParticle >::operator= ( const ParticleCollection< TmplParticle > &  p)

◆ rotate()

template<typename TmplParticle >
void esys::lsm::ParticleCollection< TmplParticle >::rotate ( const Vec3 rotation,
const Vec3 posn 
)

Rotates all particles according to the specified rotation.

Parameters
rotationSpecifies rotation-axis and magnitude, ie angle = rotation.norm() radians.
posnSpecifies position of the rotation vector.

References esys::lsm::ForwardIterator< TmplIteratable >::hasNext().

Here is the call graph for this function:

◆ translateBy()

template<typename TmplParticle >
void esys::lsm::ParticleCollection< TmplParticle >::translateBy ( const Vec3 vec)

Translates all particle positions by the specified mount.

Parameters
vecTranslation increment.

Member Data Documentation

◆ m_particlePoolPtr

◆ m_particleVector


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