ESyS-Particle  2.3
esys::lsm::GrainCollection< TmplGrain > Class Template Reference

#include <GrainCollection.h>

Inheritance diagram for esys::lsm::GrainCollection< TmplGrain >:

Classes

class  GrainConstIterator
 
class  GrainIterator
 

Public Types

typedef TmplGrain Grain
 
typedef Grain::Particle Particle
 
typedef Grain::ParticleCollection ParticleCollection
 
typedef
ParticleCollection::ParticlePool 
ParticlePool
 
typedef
ParticleCollection::ParticlePoolPtr 
ParticlePoolPtr
 
typedef
ParticleCollection::ParticleIterator 
ParticleIterator
 
typedef
ParticleCollection::ParticleConstIterator 
ParticleConstIterator
 
typedef boost::object_pool< GrainGrainPool
 
typedef boost::shared_ptr
< GrainPool
GrainPoolPtr
 
typedef std::vector< Grain * > GrainVector
 

Public Member Functions

 GrainCollection ()
 
 GrainCollection (ParticlePoolPtr particlePoolPtr)
 
 GrainCollection (ParticlePoolPtr particlePoolPtr, GrainPoolPtr grainPoolPtr)
 
virtual ~GrainCollection ()
 
int getNumGrains () const
 
int getNumParticles () const
 
void insertRef (Grain &g)
 
GraincreateGrain ()
 
GraincreateGrain (typename Grain::Id id)
 
GraincreateGrain (const Grain &g)
 
GrainIterator getGrainIterator ()
 
GrainConstIterator getGrainIterator () const
 

Protected Types

typedef ForwardIterator
< GrainVector
VectorIterator
 
typedef ForwardConstIterator
< GrainVector
VectorConstIterator
 

Protected Member Functions

ParticlePoolPtr getParticlePoolPtr ()
 
GrainPoolPtr getGrainPoolPtr ()
 

Private Attributes

ParticlePoolPtr m_particlePoolPtr
 
GrainPoolPtr m_grainPoolPtr
 
GrainVector m_grainVector
 

Member Typedef Documentation

template<typename TmplGrain>
typedef TmplGrain esys::lsm::GrainCollection< TmplGrain >::Grain
template<typename TmplGrain>
typedef boost::object_pool<Grain> esys::lsm::GrainCollection< TmplGrain >::GrainPool
template<typename TmplGrain>
typedef boost::shared_ptr<GrainPool> esys::lsm::GrainCollection< TmplGrain >::GrainPoolPtr
template<typename TmplGrain>
typedef std::vector<Grain *> esys::lsm::GrainCollection< TmplGrain >::GrainVector
template<typename TmplGrain>
typedef Grain::Particle esys::lsm::GrainCollection< TmplGrain >::Particle
template<typename TmplGrain>
typedef Grain::ParticleCollection esys::lsm::GrainCollection< TmplGrain >::ParticleCollection
template<typename TmplGrain>
typedef ParticleCollection::ParticleIterator esys::lsm::GrainCollection< TmplGrain >::ParticleIterator
template<typename TmplGrain>
typedef ParticleCollection::ParticlePool esys::lsm::GrainCollection< TmplGrain >::ParticlePool
template<typename TmplGrain>
typedef ParticleCollection::ParticlePoolPtr esys::lsm::GrainCollection< TmplGrain >::ParticlePoolPtr
template<typename TmplGrain>
typedef ForwardConstIterator<GrainVector> esys::lsm::GrainCollection< TmplGrain >::VectorConstIterator
protected
template<typename TmplGrain>
typedef ForwardIterator<GrainVector> esys::lsm::GrainCollection< TmplGrain >::VectorIterator
protected

Constructor & Destructor Documentation

template<typename TmplGrain >
esys::lsm::GrainCollection< TmplGrain >::GrainCollection ( )
template<typename TmplGrain >
esys::lsm::GrainCollection< TmplGrain >::GrainCollection ( ParticlePoolPtr  particlePoolPtr)
template<typename TmplGrain >
esys::lsm::GrainCollection< TmplGrain >::GrainCollection ( ParticlePoolPtr  particlePoolPtr,
GrainPoolPtr  grainPoolPtr 
)
template<typename TmplGrain >
esys::lsm::GrainCollection< TmplGrain >::~GrainCollection ( )
virtual

Member Function Documentation

template<typename TmplGrain >
GrainCollection< TmplGrain >::Grain & esys::lsm::GrainCollection< TmplGrain >::createGrain ( )

Creates an empty grain.

Returns
reference to new grain.
template<typename TmplGrain >
GrainCollection< TmplGrain >::Grain & esys::lsm::GrainCollection< TmplGrain >::createGrain ( typename Grain::Id  id)

Creates an empty (no particles) grain.

Parameters
idCreate a grain with this id.
Returns
reference to new grain.
template<typename TmplGrain >
GrainCollection< TmplGrain >::Grain & esys::lsm::GrainCollection< TmplGrain >::createGrain ( const Grain g)

Returns a copy-constructed grain.

Parameters
gCopy created from this argument.
Returns
reference to new grain.
template<typename TmplGrain >
GrainCollection< TmplGrain >::GrainIterator esys::lsm::GrainCollection< TmplGrain >::getGrainIterator ( )
template<typename TmplGrain >
GrainCollection< TmplGrain >::GrainConstIterator esys::lsm::GrainCollection< TmplGrain >::getGrainIterator ( ) const
template<typename TmplGrain >
GrainCollection< TmplGrain >::GrainPoolPtr esys::lsm::GrainCollection< TmplGrain >::getGrainPoolPtr ( )
protected
template<typename TmplGrain >
int esys::lsm::GrainCollection< TmplGrain >::getNumGrains ( ) const

Returns the number of grains in this collection.

template<typename TmplGrain >
int esys::lsm::GrainCollection< TmplGrain >::getNumParticles ( ) const

Returns the number of particles contained in all grains of this collection.

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

Here is the call graph for this function:

template<typename TmplGrain >
GrainCollection< TmplGrain >::ParticlePoolPtr esys::lsm::GrainCollection< TmplGrain >::getParticlePoolPtr ( )
protected
template<typename TmplGrain >
void esys::lsm::GrainCollection< TmplGrain >::insertRef ( Grain g)

Stores reference to specified grain.

Parameters
gInserts reference to grain g in this collection.
Exceptions
std::runtime_errorif g was not created by this collection's GrainPool.

Member Data Documentation

template<typename TmplGrain>
GrainPoolPtr esys::lsm::GrainCollection< TmplGrain >::m_grainPoolPtr
private
template<typename TmplGrain>
GrainVector esys::lsm::GrainCollection< TmplGrain >::m_grainVector
private
template<typename TmplGrain>
ParticlePoolPtr esys::lsm::GrainCollection< TmplGrain >::m_particlePoolPtr
private

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