ESyS-Particle
2.2
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
BoxPacker.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_LSMBOXPACKER_H
15
#define ESYS_LSMBOXPACKER_H
16
17
#include <
Geometry/Packer.h
>
18
#include <
Foundation/vec3.h
>
19
#include <
Foundation/BoundingBox.h
>
20
21
#include <vector>
22
23
namespace
esys
24
{
25
namespace
lsm
26
{
27
typedef
std::vector<bool>
BoolVector
;
31
template
<
typename
TmplPackerBase>
32
class
BoxPacker
:
public
TmplPackerBase
33
{
34
public
:
35
typedef
TmplPackerBase
Inherited
;
36
typedef
typename
Inherited::Particle
Particle
;
37
typedef
typename
Inherited::NTable
NTable
;
38
typedef
typename
Inherited::NTablePtr
NTablePtr
;
39
typedef
typename
Inherited::ParticlePool
ParticlePool
;
40
typedef
typename
Inherited::ParticlePoolPtr
ParticlePoolPtr
;
41
42
BoxPacker
(
43
ParticlePoolPtr
particlePoolPtr,
44
NTablePtr
nTablePtr,
45
const
BoundingBox
&bBox,
46
const
BoolVector
&periodicDimensions,
47
double
tolerance
48
);
49
50
virtual
~BoxPacker
();
51
52
virtual
void
generate
() = 0;
53
54
bool
particleFitsInBBox
(
const
Particle
&particle)
const
;
55
56
bool
is2d
()
const
;
57
58
bool
particleFitsInBBoxWithNeighbours
(
const
Particle
&particle)
const
;
59
60
bool
particleFitsWithNeighbours
(
const
Particle
&particle)
const
;
61
62
double
getTolerance
()
const
;
63
64
const
BoundingBox
&
getBBox
()
const
;
65
66
67
const
BoolVector
&
getPeriodicDimensions
()
const
;
68
69
private
:
70
BoundingBox
m_bBox
;
71
BoolVector
m_periodicDimensions
;
72
double
m_tolerance
;
73
};
74
}
75
}
76
77
#include "
Geometry/BoxPacker.hpp
"
78
79
#endif
Geometry
BoxPacker.h
Generated on Mon May 6 2013 23:26:29 for ESyS-Particle by
1.8.3.1