ESyS-Particle  4.0.1
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions
esys::lsm::GrainCollection< TmplGrain > Class Template Reference

List of all members.

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< Grain > GrainPool
typedef boost::shared_ptr
< GrainPool > 
GrainPoolPtr
typedef std::vector< Grain * > GrainVector

Public Member Functions

 GrainCollection (ParticlePoolPtr particlePoolPtr)
 GrainCollection (ParticlePoolPtr particlePoolPtr, GrainPoolPtr grainPoolPtr)
int getNumGrains () const
int getNumParticles () const
void insertRef (Grain &g)
Grain & createGrain ()
Grain & createGrain (typename Grain::Id id)
Grain & createGrain (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 ()

Member Function Documentation

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

Creates an empty grain.

Returns:
reference to new grain.

References esys::lsm::GrainCollection< TmplGrain >::insertRef().

Here is the call graph for this function:

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.

References esys::lsm::GrainCollection< TmplGrain >::insertRef().

Here is the call graph for this function:

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.

References esys::lsm::GrainCollection< TmplGrain >::insertRef().

Here is the call graph for this function:

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.

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.

Referenced by esys::lsm::GrainCollection< TmplGrain >::createGrain().

Here is the caller graph for this function:


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