ESyS-Particle  2.3.2
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
< Particle
ParticlePool
typedef boost::shared_ptr
< ParticlePool
ParticlePoolPtr

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
< ParticleVector
VectorIterator
typedef ForwardConstIterator
< ParticleVector
VectorConstIterator

Private Attributes

ParticlePoolPtr m_particlePoolPtr
ParticleVector m_particleVector

Member Typedef Documentation

template<typename TmplParticle>
typedef TmplParticle esys::lsm::ParticleCollection< TmplParticle >::Particle
template<typename TmplParticle>
typedef boost::object_pool<Particle> esys::lsm::ParticleCollection< TmplParticle >::ParticlePool
template<typename TmplParticle>
typedef boost::shared_ptr<ParticlePool> esys::lsm::ParticleCollection< TmplParticle >::ParticlePoolPtr
template<typename TmplParticle>
typedef std::vector<Particle *> esys::lsm::ParticleCollection< TmplParticle >::ParticleVector
private
template<typename TmplParticle>
typedef ForwardConstIterator<ParticleVector> esys::lsm::ParticleCollection< TmplParticle >::VectorConstIterator
private
template<typename TmplParticle>
typedef ForwardIterator<ParticleVector> esys::lsm::ParticleCollection< TmplParticle >::VectorIterator
private

Constructor & Destructor Documentation

template<typename TmplParticle >
esys::lsm::ParticleCollection< TmplParticle >::ParticleCollection ( ParticlePoolPtr  particlePoolPtr)
template<typename TmplParticle >
esys::lsm::ParticleCollection< TmplParticle >::ParticleCollection ( const ParticleCollection< TmplParticle > &  p)
template<typename TmplParticle >
esys::lsm::ParticleCollection< TmplParticle >::~ParticleCollection ( )
virtual

Member Function Documentation

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::SimpleSphereCollectionPyPickleSuite::setstate(), and esys::lsm::ParticleCollectionPyPickleSuite::setstate().

Here is the caller graph for this function:

template<typename TmplParticle >
int esys::lsm::ParticleCollection< TmplParticle >::getNumParticles ( ) const
template<typename TmplParticle >
BoundingBox esys::lsm::ParticleCollection< TmplParticle >::getParticleBBox ( ) const
template<typename TmplParticle>
ParticleIterator esys::lsm::ParticleCollection< TmplParticle >::getParticleIterator ( )
inline
template<typename TmplParticle>
ParticleConstIterator esys::lsm::ParticleCollection< TmplParticle >::getParticleIterator ( ) const
inline
template<typename TmplParticle >
void esys::lsm::ParticleCollection< TmplParticle >::incrementIdBy ( typename Particle::Id  idIncr)

Increments all particle Id's by the specifed amount.

Parameters
idIncrIncrement.

References esys::lsm::ForwardIterator< TmplIteratable >::hasNext(), and esys::lsm::ParticleCollection< TmplParticle >::ParticleIterator::next().

Here is the call graph for this function:

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.
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.
template<typename TmplParticle >
ParticleCollection< TmplParticle > & esys::lsm::ParticleCollection< TmplParticle >::operator= ( const ParticleCollection< TmplParticle > &  p)
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(), and esys::lsm::ParticleCollection< TmplParticle >::ParticleIterator::next().

Here is the call graph for this function:

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

Translates all particle positions by the specified mount.

Parameters
vecTranslation increment.

References esys::lsm::ForwardIterator< TmplIteratable >::hasNext(), and esys::lsm::ParticleCollection< TmplParticle >::ParticleIterator::next().

Here is the call graph for this function:

Member Data Documentation


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