|
ESyS-Particle
2.3.4
|
#include <SphereBlockGenerator.h>


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 |
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 () | |
| NTable & | getNTable () |
| const NTable & | getNTable () const |
| ParticlePool & | getParticlePool () |
| const ParticlePool & | getParticlePool () const |
| typedef set<int> esys::lsm::SphereBlockGenerator::IdSet |
| esys::lsm::SphereBlockGenerator::SphereBlockGenerator | ( | NTable & | ntable, |
| ParticlePool & | pool, | ||
| double | tol, | ||
| const Vec3 & | pos, | ||
| double | rad, | ||
| double | rmin, | ||
| double | rmax, | ||
| int | ntries, | ||
| int | tag | ||
| ) |
|
virtual |
destructor
| 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.
| Po | the 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().


| bool esys::lsm::SphereBlockGenerator::findAFit | ( | SimpleParticle & | Po, |
| const vector< SimpleParticle * > & | NL | ||
| ) |
Find a fit for a sphere using the list of neigbors
| Po | the particle to fit |
| NL | the list of neighbors |
References Sphere3D::FillIn(), esys::lsm::SimpleParticleData::getID(), and m_tag.
Referenced by generateFillParticles().


| 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
| Po | the particle to fit |
| NL | the list of neighbors |
References Sphere3D::FillIn(), esys::lsm::SimpleParticleData::getID(), m_center, m_radius, and m_tag.
Referenced by generateFillParticles().


|
virtual |
generate particles
Implements esys::lsm::ParticleGenerator.
References generateFillParticles(), and generateSeedParticles().

|
virtual |
fill in
References checkAFit(), findAFit(), findAFitWithSphere(), generateParticle(), getAPoint(), getClosestNeighbors(), esys::lsm::SimpleParticleData::getID(), SimpleParticle::getPos(), SimpleParticle::getRad(), insertParticle(), m_center, m_max_tries, m_radius, and SimpleParticle::moveTo().
Referenced by generate().


|
virtual |
generate a particle at a given position
| point |
References getNextId(), getRadius(), and m_tag.
Referenced by generateFillParticles(), and generateSeedParticles().


|
virtual |
generate seed particles
References generateParticle(), getBBox(), getGridRadius(), esys::lsm::GridIterator::hasNext(), insertParticle(), esys::lsm::GridIterator::next(), and particleFits().
Referenced by generate().


| Vec3 esys::lsm::SphereBlockGenerator::getAPoint | ( | ) |
get a random point inside the sphere
References m_center, m_radius, and Vec3::norm().
Referenced by generateFillParticles().


| const BoundingBox esys::lsm::SphereBlockGenerator::getBBox | ( | ) | const |
calculate & return bounding box for bounding sphere
References m_center, and m_radius.
Referenced by generateSeedParticles().

| vector< SimpleParticle * > esys::lsm::SphereBlockGenerator::getClosestNeighbors | ( | const SimpleParticle & | P, |
| int | np | ||
| ) |
get closes Neigbours
| P | the particle |
| np | the number of neighbours |
References esys::lsm::ParticleGenerator::getNTable(), SimpleParticle::getPos(), esys::lsm::NeighbourTable< TmplParticle >::getUniqueNeighbourVector(), m_max_rad, and m_tol.
Referenced by generateFillParticles().


|
virtual |
return max. radius to be used as spacing for grid iterator
References m_max_rad.
Referenced by generateSeedParticles().

| int esys::lsm::SphereBlockGenerator::getNextId | ( | ) |
get next available particle ID
References esys::lsm::ParticleGenerator::getNTable(), and esys::lsm::CircularNeighbourTable< TmplParticle >::getNumParticles().
Referenced by generateParticle().


|
inline |
References m_idSet.
|
inline |
References m_particleVector.
|
virtual |
??
References m_max_rad, and m_min_rad.
Referenced by generateParticle().

|
virtual |
insert particle
| particle |
References esys::lsm::SimpleParticleData::getID(), esys::lsm::ParticleGenerator::getNTable(), esys::lsm::ParticleGenerator::getParticlePool(), esys::lsm::CircularNeighbourTable< TmplParticle >::insert(), m_idSet, m_particleVector, m_tag, and esys::lsm::SimpleParticleData::setTag().
Referenced by generateFillParticles(), and generateSeedParticles().


|
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().


|
private |
Referenced by findAFitWithSphere(), generateFillParticles(), getAPoint(), getBBox(), particleFits(), and SphereBlockGenerator().
|
private |
Referenced by getNumParticles(), and insertParticle().
|
private |
Referenced by checkAFit(), getClosestNeighbors(), getGridRadius(), getRadius(), particleFits(), and SphereBlockGenerator().
|
private |
Referenced by generateFillParticles(), and SphereBlockGenerator().
|
private |
Referenced by getRadius(), particleFits(), and SphereBlockGenerator().
|
private |
Referenced by getParticleIterator(), and insertParticle().
|
private |
Referenced by findAFitWithSphere(), generateFillParticles(), getAPoint(), getBBox(), particleFits(), and SphereBlockGenerator().
|
private |
Referenced by findAFit(), findAFitWithSphere(), generateParticle(), insertParticle(), and SphereBlockGenerator().
|
private |
Referenced by checkAFit(), getClosestNeighbors(), and SphereBlockGenerator().