ESyS-Particle
2.2
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
PackerGenerators.h
Go to the documentation of this file.
1
2
// //
3
// Copyright (c) 2003-2013 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
14
#ifndef ESYS_LSMPACKERGENERATORS_H
15
#define ESYS_LSMPACKERGENERATORS_H
16
17
#include "
Foundation/vec3.h
"
18
19
namespace
esys
20
{
21
namespace
lsm
22
{
26
template
<
typename
TmplParticle>
27
class
ConstRadiusGen
28
{
29
public
:
30
typedef
TmplParticle
Particle
;
31
32
ConstRadiusGen
(
double
radius);
33
38
const
double
&
getParticleRadius
()
const
;
39
44
const
double
&
getMinFitRadius
()
const
;
45
50
const
double
&
getMaxFitRadius
()
const
;
51
57
Particle
getParticle
(
const
Vec3
&posn)
const
;
58
65
Particle
getParticle
(
const
Vec3
&posn,
const
double
&maxRadius)
const
;
66
70
bool
isValidFitRadius
(
const
double
&fitRadius)
const
;
71
72
private
:
73
double
m_radius
;
74
};
75
80
template
<
typename
TmplParticle>
81
class
RangeRadiusGen
82
{
83
public
:
84
typedef
TmplParticle
Particle
;
85
86
RangeRadiusGen
(
double
minFitRadius,
double
maxFitRadius);
87
88
virtual
~RangeRadiusGen
();
89
94
const
double
&
getMinFitRadius
()
const
;
95
100
const
double
&
getMaxFitRadius
()
const
;
101
105
bool
isValidFitRadius
(
const
double
&fitRadius)
const
;
106
107
private
:
108
double
m_minFitRadius
;
109
double
m_maxFitRadius
;
110
};
111
116
template
<
typename
TmplParticle>
117
class
RndRadiusGen
:
public
RangeRadiusGen
<TmplParticle>
118
{
119
public
:
120
typedef
RangeRadiusGen<TmplParticle>
Inherited
;
121
typedef
typename
Inherited::Particle
Particle
;
122
123
RndRadiusGen
(
124
double
minFitRadius,
125
double
maxFitRadius
126
);
127
131
double
getRandomRadius
()
const
;
132
133
Particle
getParticle
(
const
Vec3
&posn)
const
;
134
135
Particle
getParticle
(
const
Vec3
&posn,
double
suggestedRadius)
const
;
136
137
private
:
138
};
139
140
template
<
typename
TmplGrain>
141
class
GrainRndRadiusGen
:
public
RndRadiusGen
<typename TmplGrain::Particle>
142
{
143
public
:
144
typedef
RndRadiusGen<typename TmplGrain::Particle>
Inherited
;
145
typedef
TmplGrain
Grain
;
146
typedef
typename
Grain::Particle
Particle
;
147
148
GrainRndRadiusGen
(
double
minGrainRadius,
double
maxGrainRadius);
149
150
virtual
~GrainRndRadiusGen
();
151
152
const
double
&
getMinGrainRadius
()
const
;
153
154
const
double
&
getMaxGrainRadius
()
const
;
155
156
virtual
Grain
getGrain
(
const
Particle
&p) = 0;
157
};
158
159
template
<
typename
TmplGrain>
160
class
SingleParticleGrainGen
:
public
GrainRndRadiusGen
<TmplGrain>
161
{
162
public
:
163
typedef
GrainRndRadiusGen<TmplGrain>
Inherited
;
164
typedef
typename
Inherited::Grain
Grain
;
165
typedef
typename
Grain::Particle
Particle
;
166
167
SingleParticleGrainGen
(
double
minGrainRadius,
double
maxGrainRadius);
168
169
const
double
&
getMinParticleRadius
()
const
;
170
171
const
double
&
getMaxParticleRadius
()
const
;
172
173
virtual
Grain
getGrain
(
const
Particle
&p);
174
};
175
}
176
}
177
178
#include "
Geometry/PackerGenerators.hpp
"
179
180
#endif
Geometry
PackerGenerators.h
Generated on Mon May 6 2013 23:26:29 for ESyS-Particle by
1.8.3.1