ESyS-Particle  2.3.4
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< GrainPoolGrainPoolPtr
 
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< GrainVectorVectorIterator
 
typedef ForwardConstIterator< GrainVectorVectorConstIterator
 

Protected Member Functions

ParticlePoolPtr getParticlePoolPtr ()
 
GrainPoolPtr getGrainPoolPtr ()
 

Private Attributes

ParticlePoolPtr m_particlePoolPtr
 
GrainPoolPtr m_grainPoolPtr
 
GrainVector m_grainVector
 

Member Typedef Documentation

◆ Grain

template<typename TmplGrain >
typedef TmplGrain esys::lsm::GrainCollection< TmplGrain >::Grain

◆ GrainPool

template<typename TmplGrain >
typedef boost::object_pool<Grain> esys::lsm::GrainCollection< TmplGrain >::GrainPool

◆ GrainPoolPtr

template<typename TmplGrain >
typedef boost::shared_ptr<GrainPool> esys::lsm::GrainCollection< TmplGrain >::GrainPoolPtr

◆ GrainVector

template<typename TmplGrain >
typedef std::vector<Grain *> esys::lsm::GrainCollection< TmplGrain >::GrainVector

◆ Particle

template<typename TmplGrain >
typedef Grain::Particle esys::lsm::GrainCollection< TmplGrain >::Particle

◆ ParticleCollection

template<typename TmplGrain >
typedef Grain::ParticleCollection esys::lsm::GrainCollection< TmplGrain >::ParticleCollection

◆ ParticleConstIterator

◆ ParticleIterator

template<typename TmplGrain >
typedef ParticleCollection::ParticleIterator esys::lsm::GrainCollection< TmplGrain >::ParticleIterator

◆ ParticlePool

template<typename TmplGrain >
typedef ParticleCollection::ParticlePool esys::lsm::GrainCollection< TmplGrain >::ParticlePool

◆ ParticlePoolPtr

template<typename TmplGrain >
typedef ParticleCollection::ParticlePoolPtr esys::lsm::GrainCollection< TmplGrain >::ParticlePoolPtr

◆ VectorConstIterator

template<typename TmplGrain >
typedef ForwardConstIterator<GrainVector> esys::lsm::GrainCollection< TmplGrain >::VectorConstIterator
protected

◆ VectorIterator

template<typename TmplGrain >
typedef ForwardIterator<GrainVector> esys::lsm::GrainCollection< TmplGrain >::VectorIterator
protected

Constructor & Destructor Documentation

◆ GrainCollection() [1/3]

template<typename TmplGrain >
esys::lsm::GrainCollection< TmplGrain >::GrainCollection

◆ GrainCollection() [2/3]

template<typename TmplGrain >
esys::lsm::GrainCollection< TmplGrain >::GrainCollection ( ParticlePoolPtr  particlePoolPtr)

◆ GrainCollection() [3/3]

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

◆ ~GrainCollection()

template<typename TmplGrain >
esys::lsm::GrainCollection< TmplGrain >::~GrainCollection
virtual

Member Function Documentation

◆ createGrain() [1/3]

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

Creates an empty grain.

Returns
reference to new grain.

◆ createGrain() [2/3]

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.

◆ createGrain() [3/3]

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.

◆ getGrainIterator() [1/2]

template<typename TmplGrain >
GrainCollection< TmplGrain >::GrainIterator esys::lsm::GrainCollection< TmplGrain >::getGrainIterator

◆ getGrainIterator() [2/2]

template<typename TmplGrain >
GrainCollection< TmplGrain >::GrainConstIterator esys::lsm::GrainCollection< TmplGrain >::getGrainIterator

◆ getGrainPoolPtr()

template<typename TmplGrain >
GrainCollection< TmplGrain >::GrainPoolPtr esys::lsm::GrainCollection< TmplGrain >::getGrainPoolPtr
protected

◆ getNumGrains()

template<typename TmplGrain >
int esys::lsm::GrainCollection< TmplGrain >::getNumGrains

Returns the number of grains in this collection.

◆ getNumParticles()

template<typename TmplGrain >
int esys::lsm::GrainCollection< TmplGrain >::getNumParticles

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:

◆ getParticlePoolPtr()

template<typename TmplGrain >
GrainCollection< TmplGrain >::ParticlePoolPtr esys::lsm::GrainCollection< TmplGrain >::getParticlePoolPtr
protected

◆ insertRef()

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

◆ m_grainPoolPtr

template<typename TmplGrain >
GrainPoolPtr esys::lsm::GrainCollection< TmplGrain >::m_grainPoolPtr
private

◆ m_grainVector

template<typename TmplGrain >
GrainVector esys::lsm::GrainCollection< TmplGrain >::m_grainVector
private

◆ m_particlePoolPtr

template<typename TmplGrain >
ParticlePoolPtr esys::lsm::GrainCollection< TmplGrain >::m_particlePoolPtr
private

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