ESyS-Particle
4.0.1
|
Public Types | |
typedef NTable::ParticleVector | ParticleVector |
typedef NTable::ParticleIterator | ParticleIterator |
typedef set< int > | IdSet |
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 () |
esys::lsm::SphereBlockGenerator::SphereBlockGenerator | ( | NTable & | ntable, |
ParticlePool & | pool, | ||
double | tol, | ||
const Vec3 & | pos, | ||
double | rad, | ||
double | rmin, | ||
double | rmax, | ||
int | ntries, | ||
int | tag | ||
) |
constructor
ntable | the neigbour table to be used |
pool | the particle pool |
tol | the fitting tolerance |
pos | center position |
rad | radius |
rmin | minimum particle radius |
rmax | maximum particle radius |
ntries | max. nr. of tries |
esys::lsm::SphereBlockGenerator::~SphereBlockGenerator | ( | ) | [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 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().
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().
Referenced by generateFillParticles().
void esys::lsm::SphereBlockGenerator::generate | ( | ) | [virtual] |
generate particles
Implements esys::lsm::ParticleGenerator.
References generateFillParticles(), and generateSeedParticles().
void esys::lsm::SphereBlockGenerator::generateFillParticles | ( | ) | [virtual] |
fill in
References checkAFit(), findAFit(), findAFitWithSphere(), generateParticle(), getAPoint(), getClosestNeighbors(), and insertParticle().
Referenced by generate().
SimpleParticle esys::lsm::SphereBlockGenerator::generateParticle | ( | const Vec3 & | point | ) | [virtual] |
generate a particle at a given position
point |
References getNextId(), and getRadius().
Referenced by generateFillParticles(), and generateSeedParticles().
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().
get a random point inside the sphere
Referenced by generateFillParticles().
const BoundingBox esys::lsm::SphereBlockGenerator::getBBox | ( | ) | const |
calculate & return bounding box for bounding sphere
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 |
Referenced by generateFillParticles().
double esys::lsm::SphereBlockGenerator::getGridRadius | ( | ) | const [virtual] |
return max. radius to be used as spacing for grid iterator
Referenced by generateSeedParticles().
get next available particle ID
Referenced by generateParticle().
double esys::lsm::SphereBlockGenerator::getRadius | ( | ) | const [virtual] |
void esys::lsm::SphereBlockGenerator::insertParticle | ( | const SimpleParticle & | particle | ) | [virtual] |
insert particle
particle |
Referenced by generateFillParticles(), and generateSeedParticles().
bool esys::lsm::SphereBlockGenerator::particleFits | ( | const SimpleParticle & | particle | ) | const [virtual] |
check particle fit
Referenced by checkAFit(), and generateSeedParticles().