ESyS-Particle  2.3.2
esys::lsm::SphereBlockGenerator Class Reference

#include <SphereBlockGenerator.h>

Inheritance diagram for esys::lsm::SphereBlockGenerator:
Collaboration diagram for esys::lsm::SphereBlockGenerator:

Public Types

typedef NTable::ParticleVector ParticleVector
typedef NTable::ParticleIterator ParticleIterator
typedef set< int > IdSet
- Public Types inherited from esys::lsm::ParticleGenerator
typedef CircularNeighbourTable
< SimpleParticle
NTable
typedef boost::object_pool
< SimpleParticle
ParticlePool

Public Member Functions

 SphereBlockGenerator (NTable &, ParticlePool &, double, const Vec3 &, double, double, double, int, int)
virtual ~SphereBlockGenerator ()
virtual void generate ()
virtual void generateSeedParticles ()
virtual void generateFillParticles ()
virtual SimpleParticle generateParticle (const Vec3 &point)
virtual void insertParticle (const SimpleParticle &)
virtual double getRadius () const
int getNextId ()
size_t getNumParticles () const
const BoundingBox getBBox () const
virtual double getGridRadius () const
virtual bool particleFits (const SimpleParticle &particle) const
ParticleIterator getParticleIterator ()
vector< SimpleParticle * > getClosestNeighbors (const SimpleParticle &, int)
bool findAFitWithSphere (SimpleParticle &, const vector< SimpleParticle * > &)
bool findAFit (SimpleParticle &, const vector< SimpleParticle * > &)
bool checkAFit (const SimpleParticle &)
Vec3 getAPoint ()
- Public Member Functions inherited from esys::lsm::ParticleGenerator
 ParticleGenerator (NTable &nTable, ParticlePool &particlePool)
virtual ~ParticleGenerator ()

Private Attributes

ParticleVector m_particleVector
double m_tol
IdSet m_idSet
Vec3 m_center
double m_radius
double m_min_rad
double m_max_rad
int m_max_tries
int m_tag

Additional Inherited Members

- Protected Member Functions inherited from esys::lsm::ParticleGenerator
 ParticleGenerator ()
NTablegetNTable ()
const NTablegetNTable () const
ParticlePoolgetParticlePool ()
const ParticlePoolgetParticlePool () const

Member Typedef Documentation

Constructor & Destructor Documentation

esys::lsm::SphereBlockGenerator::SphereBlockGenerator ( NTable ntable,
ParticlePool pool,
double  tol,
const Vec3 pos,
double  rad,
double  rmin,
double  rmax,
int  ntries,
int  tag 
)

constructor

Parameters
ntablethe neigbour table to be used
poolthe particle pool
tolthe fitting tolerance
poscenter position
radradius
rminminimum particle radius
rmaxmaximum particle radius
ntriesmax. nr. of tries

References m_center, m_max_rad, m_max_tries, m_min_rad, m_radius, m_tag, and m_tol.

esys::lsm::SphereBlockGenerator::~SphereBlockGenerator ( )
virtual

destructor

Member Function Documentation

bool esys::lsm::SphereBlockGenerator::checkAFit ( const SimpleParticle Po)

check if Po is within the Space and is not crossing any boundary or overlapping with other particles.

Parameters
Pothe particle

References esys::lsm::ParticleGenerator::getNTable(), SimpleParticle::getPos(), SimpleParticle::getRad(), esys::lsm::NeighbourTable< TmplParticle >::getUniqueNeighbourVector(), esys::lsm::bpu::iter(), m_max_rad, m_tol, and particleFits().

Referenced by generateFillParticles().

Here is the call graph for this function:

Here is the caller graph for this function:

bool esys::lsm::SphereBlockGenerator::findAFit ( SimpleParticle Po,
const vector< SimpleParticle * > &  NL 
)

Find a fit for a sphere using the list of neigbors

Parameters
Pothe particle to fit
NLthe list of neighbors

References Sphere3D::FillIn(), esys::lsm::SimpleParticleData::getID(), and m_tag.

Referenced by generateFillParticles().

Here is the call graph for this function:

Here is the caller graph for this function:

bool esys::lsm::SphereBlockGenerator::findAFitWithSphere ( SimpleParticle Po,
const vector< SimpleParticle * > &  NL 
)

Find a fit for a sphere using the list of neigbors and the outer sphere

Parameters
Pothe particle to fit
NLthe list of neighbors

References Sphere3D::FillIn(), esys::lsm::SimpleParticleData::getID(), m_center, m_radius, and m_tag.

Referenced by generateFillParticles().

Here is the call graph for this function:

Here is the caller graph for this function:

void esys::lsm::SphereBlockGenerator::generate ( )
virtual

generate particles

Implements esys::lsm::ParticleGenerator.

References generateFillParticles(), and generateSeedParticles().

Here is the call graph for this function:

void esys::lsm::SphereBlockGenerator::generateFillParticles ( )
virtual
SimpleParticle esys::lsm::SphereBlockGenerator::generateParticle ( const Vec3 point)
virtual

generate a particle at a given position

Parameters
point

References getNextId(), getRadius(), and m_tag.

Referenced by generateFillParticles(), and generateSeedParticles().

Here is the call graph for this function:

Here is the caller graph for this function:

void esys::lsm::SphereBlockGenerator::generateSeedParticles ( )
virtual

generate seed particles

References generateParticle(), getBBox(), getGridRadius(), esys::lsm::GridIterator::hasNext(), insertParticle(), esys::lsm::GridIterator::next(), and particleFits().

Referenced by generate().

Here is the call graph for this function:

Here is the caller graph for this function:

Vec3 esys::lsm::SphereBlockGenerator::getAPoint ( )

get a random point inside the sphere

References m_center, m_radius, and Vec3::norm().

Referenced by generateFillParticles().

Here is the call graph for this function:

Here is the caller graph for this function:

const BoundingBox esys::lsm::SphereBlockGenerator::getBBox ( ) const

calculate & return bounding box for bounding sphere

References m_center, and m_radius.

Referenced by generateSeedParticles().

Here is the caller graph for this function:

vector< SimpleParticle * > esys::lsm::SphereBlockGenerator::getClosestNeighbors ( const SimpleParticle P,
int  np 
)

get closes Neigbours

Parameters
Pthe particle
npthe number of neighbours

References esys::lsm::ParticleGenerator::getNTable(), SimpleParticle::getPos(), esys::lsm::NeighbourTable< TmplParticle >::getUniqueNeighbourVector(), m_max_rad, and m_tol.

Referenced by generateFillParticles().

Here is the call graph for this function:

Here is the caller graph for this function:

double esys::lsm::SphereBlockGenerator::getGridRadius ( ) const
virtual

return max. radius to be used as spacing for grid iterator

References m_max_rad.

Referenced by generateSeedParticles().

Here is the caller graph for this function:

int esys::lsm::SphereBlockGenerator::getNextId ( )

get next available particle ID

References esys::lsm::ParticleGenerator::getNTable(), and esys::lsm::CircularNeighbourTable< TmplParticle >::getNumParticles().

Referenced by generateParticle().

Here is the call graph for this function:

Here is the caller graph for this function:

size_t esys::lsm::SphereBlockGenerator::getNumParticles ( ) const
inline

References m_idSet.

ParticleIterator esys::lsm::SphereBlockGenerator::getParticleIterator ( )
inline

References m_particleVector.

double esys::lsm::SphereBlockGenerator::getRadius ( ) const
virtual

??

References m_max_rad, and m_min_rad.

Referenced by generateParticle().

Here is the caller graph for this function:

void esys::lsm::SphereBlockGenerator::insertParticle ( const SimpleParticle particle)
virtual
bool esys::lsm::SphereBlockGenerator::particleFits ( const SimpleParticle particle) const
virtual

check particle fit

References SimpleParticle::getPos(), SimpleParticle::getRad(), m_center, m_max_rad, m_min_rad, and m_radius.

Referenced by checkAFit(), and generateSeedParticles().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

Vec3 esys::lsm::SphereBlockGenerator::m_center
private
IdSet esys::lsm::SphereBlockGenerator::m_idSet
private

Referenced by getNumParticles(), and insertParticle().

double esys::lsm::SphereBlockGenerator::m_max_rad
private
int esys::lsm::SphereBlockGenerator::m_max_tries
private
double esys::lsm::SphereBlockGenerator::m_min_rad
private
ParticleVector esys::lsm::SphereBlockGenerator::m_particleVector
private
double esys::lsm::SphereBlockGenerator::m_radius
private
int esys::lsm::SphereBlockGenerator::m_tag
private
double esys::lsm::SphereBlockGenerator::m_tol
private

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