ESyS-Particle
4.0.1
Main Page
Related Pages
Namespaces
Classes
Files
File List
Geometry
SphereBlockGenerator.h
1
2
// //
3
// Copyright (c) 2003-2011 by The University of Queensland //
4
// Earth Systems Science Computational Centre (ESSCC) //
5
// http://www.uq.edu.au/esscc //
6
// //
7
// Primary Business: Brisbane, Queensland, Australia //
8
// Licensed under the Open Software License version 3.0 //
9
// http://www.opensource.org/licenses/osl-3.0.php //
10
// //
12
13
#ifndef __ESYS_LSM_SPHEREBLOCKGENERATOR
14
#define __ESYS_LSM_SPHEREBLOCKGENERATOR
15
16
// --- project includes ---
17
#include <Geometry/ParticleGenerator.h>
18
#include <Geometry/SimpleParticle.h>
19
20
// --- STL includes ---
21
#include <set>
22
using
std::set;
23
24
namespace
esys
25
{
26
namespace
lsm
27
{
31
class
SphereBlockGenerator
:
public
ParticleGenerator
32
{
33
public
:
34
// types
35
typedef
NTable::ParticleVector ParticleVector;
36
typedef
NTable::ParticleIterator
ParticleIterator
;
37
typedef
set<int> IdSet;
38
39
// functions
40
SphereBlockGenerator
(
NTable
&,ParticlePool&,
double
,
const
Vec3
&,
double
,
double
,
double
,
int
,
int
);
41
virtual
~SphereBlockGenerator
();
42
43
virtual
void
generate
();
44
virtual
void
generateSeedParticles
();
45
virtual
void
generateFillParticles
();
46
virtual
SimpleParticle
generateParticle
(
const
Vec3
&point);
47
virtual
void
insertParticle
(
const
SimpleParticle
&);
48
virtual
double
getRadius
()
const
;
49
int
getNextId
();
50
size_t
getNumParticles()
const
{
return
m_idSet.size();};
51
const
BoundingBox
getBBox
()
const
;
52
virtual
double
getGridRadius
()
const
;
53
virtual
bool
particleFits
(
const
SimpleParticle
&particle)
const
;
54
ParticleIterator
getParticleIterator(){
return
ParticleIterator
(m_particleVector);}
55
vector<SimpleParticle*>
getClosestNeighbors
(
const
SimpleParticle
&,
int
);
56
bool
findAFitWithSphere
(
SimpleParticle
&,
const
vector<SimpleParticle*>&);
57
bool
findAFit
(
SimpleParticle
&,
const
vector<SimpleParticle*>&);
58
bool
checkAFit
(
const
SimpleParticle
&);
59
Vec3
getAPoint
();
60
61
private
:
62
ParticleVector m_particleVector;
63
double
m_tol;
64
IdSet m_idSet;
65
Vec3
m_center;
66
double
m_radius;
67
double
m_min_rad;
68
double
m_max_rad;
69
int
m_max_tries;
70
int
m_tag;
71
};
72
};
73
};
74
75
#endif // __ESYS_LSM_SPHEREBLOCKGENERATOR
Generated on Sat Mar 22 2014 08:30:43 for ESyS-Particle by
1.8.1.2