ESyS-Particle
2.2
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
SimpleBlock.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_LSMSIMPLEBLOCK_H
15
#define ESYS_LSMSIMPLEBLOCK_H
16
17
#include "
Foundation/BoundingBox.h
"
18
#include "
Geometry/ParticleCollection.h
"
19
#include "
Geometry/SimpleParticle.h
"
20
#include "
Geometry/NeighbourTable.h
"
21
#include "
Geometry/BasicInteraction.h
"
22
#include "
Geometry/Vec3L.h
"
23
24
#include <boost/shared_ptr.hpp>
25
#include <boost/pool/object_pool.hpp>
26
27
#include <vector>
28
#include <float.h>
29
30
namespace
esys
31
{
32
namespace
lsm
33
{
37
template
<
typename
TmplParticle = SimpleParticle>
38
class
SimpleBlockGenerator
39
{
40
public
:
41
SimpleBlockGenerator
(
42
unsigned
int
numX,
43
unsigned
int
numY,
44
unsigned
int
numZ,
45
double
radius = 0.5
46
);
47
48
virtual
~SimpleBlockGenerator
();
49
50
double
getRadius
()
const
;
51
52
template
<
typename
TmplParticleCollection>
53
void
createParticles
(TmplParticleCollection &particleCollection);
54
55
protected
:
56
Vec3
getPos
(
const
Vec3L
&idx);
57
58
int
getId
(
const
Vec3L
&idx);
59
60
private
:
61
double
m_radius
;
62
Vec3L
m_dimCounts
;
63
};
64
68
template
<
typename
TmplParticle = SimpleParticle>
69
class
SimpleBlock
:
public
ParticleCollection
<TmplParticle>
70
{
71
public
:
72
typedef
typename
ParticleCollection<TmplParticle>::Particle
Particle
;
73
SimpleBlock
(
74
unsigned
int
numX,
75
unsigned
int
numY,
76
unsigned
int
numZ,
77
double
radius = 0.5
78
);
79
80
virtual
~SimpleBlock
();
81
82
double
getRadius
()
const
;
83
84
protected
:
85
void
createParticles
();
86
87
private
:
88
SimpleBlockGenerator<Particle>
m_generator
;
89
};
90
}
91
}
92
93
#include "
Geometry/SimpleBlock.hpp
"
94
95
#endif
Geometry
SimpleBlock.h
Generated on Mon May 6 2013 23:26:29 for ESyS-Particle by
1.8.3.1