ESyS-Particle
2.2
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
CubicBoxPacker.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_LSMCUBICBOXPACKER_H
15
#define ESYS_LSMCUBICBOXPACKER_H
16
17
#include <
Geometry/BoxPacker.h
>
18
19
namespace
esys
20
{
21
namespace
lsm
22
{
23
typedef
std::vector<bool>
BoolVector
;
27
template
<
typename
TmplParticleGenerator,
typename
TmplBoxPackerBase>
28
class
CubicBoxPacker
:
public
TmplBoxPackerBase
29
{
30
public
:
31
typedef
TmplParticleGenerator
ParticleGenerator
;
32
typedef
boost::shared_ptr<ParticleGenerator>
ParticleGeneratorPtr
;
33
typedef
TmplBoxPackerBase
Inherited
;
34
typedef
Inherited
BoxPackerBase
;
35
typedef
typename
Inherited::Particle
Particle
;
36
typedef
typename
Inherited::NTable
NTable
;
37
typedef
typename
Inherited::NTablePtr
NTablePtr
;
38
typedef
typename
Inherited::ParticlePool
ParticlePool
;
39
typedef
typename
Inherited::ParticlePoolPtr
ParticlePoolPtr
;
40
41
CubicBoxPacker
(
42
ParticleGeneratorPtr
particleGeneratorPtr,
43
ParticlePoolPtr
particlePoolPtr,
44
NTablePtr
nTablePtr,
45
const
BoundingBox
&bBox,
46
const
BoolVector
&periodicDimensions,
47
double
tolerance,
48
double
cubicPackRadius
49
);
50
51
virtual
~CubicBoxPacker
();
52
53
Particle
getCandidateParticle
(
const
Vec3
&point);
54
55
Particle
getCandidateParticle
(
const
Vec3
&point,
double
radius);
56
57
double
getCubicPackingRadius
()
const
;
58
59
const
ParticleGenerator
&
getParticleGenerator
()
const
;
60
61
ParticleGenerator
&
getParticleGenerator
();
62
63
void
setParticleGenerator
(
ParticleGenerator
&particleGenerator);
64
65
void
setParticleGenerator
(
ParticleGeneratorPtr
particleGenerator);
66
67
void
generateCubicPacking
();
68
69
virtual
void
generate
();
70
71
private
:
72
double
m_cubicPackRadius
;
73
ParticleGeneratorPtr
m_particleGeneratorPtr
;
74
ParticleGenerator
*
m_pParticleGenerator
;
75
};
76
}
77
}
78
79
#include "
Geometry/CubicBoxPacker.hpp
"
80
81
#endif
Geometry
CubicBoxPacker.h
Generated on Mon May 6 2013 23:26:29 for ESyS-Particle by
1.8.3.1