ESyS-Particle
2.2
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
CircularNeighbourTable.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_LSMCIRCULARNEIGHBOURTABLE_H
15
#define ESYS_LSMCIRCULARNEIGHBOURTABLE_H
16
17
#include "
Geometry/NeighbourTable.h
"
18
#include <boost/pool/object_pool.hpp>
19
#include <boost/shared_ptr.hpp>
20
21
#include <sstream>
22
#include <stdexcept>
23
#include <set>
24
25
namespace
esys
26
{
27
namespace
lsm
28
{
32
template
<
class
TmplParticle>
33
class
CircularNeighbourTable
:
public
NeighbourTable
<TmplParticle>
34
{
35
public
:
36
typedef
NeighbourTable<TmplParticle>
Inherited
;
37
typedef
typename
Inherited::Particle
Particle
;
38
typedef
typename
Inherited::ParticleVector
ParticleVector
;
39
typedef
std::set<typename ParticleVector::value_type>
ParticleSet
;
40
typedef
boost::object_pool<Particle>
ParticlePool
;
41
typedef
boost::shared_ptr<ParticlePool>
ParticlePoolPtr
;
42
typedef
std::vector<bool>
BoolVector
;
43
44
public
:
45
CircularNeighbourTable
(
46
const
BoundingBox
&bBox,
47
double
gridSpacing,
48
const
BoolVector
&periodicDimensions =
BoolVector
(3,
false
),
49
double
circBorderWidth = 0.0
50
);
51
52
CircularNeighbourTable
(
53
const
BoundingBox
&bBox,
54
double
gridSpacing,
55
ParticlePoolPtr
particlePoolPtr,
56
const
BoolVector
&periodicDimensions =
BoolVector
(3,
false
),
57
double
circBorderWidth = 0.0
58
);
59
60
public
:
61
void
checkPeriodicDimensions
();
62
63
virtual
~CircularNeighbourTable
();
64
65
void
setCircularBorderWidth
(
66
double
circBorderWidth,
67
double
gridSpacing
68
);
69
70
void
setCircularBorderWidth
(
double
circBorderWidth);
71
72
void
resize
(
73
const
BoundingBox
&bBox,
74
double
gridSpacing,
75
double
circBorderWidth
76
);
77
78
void
resize
(
79
const
BoundingBox
&bBox,
80
double
gridSpacing
81
);
82
83
void
insertClone
(
Particle
*pParticle,
const
Vec3
&newPosition);
84
85
bool
havePeriodicDimensions
()
const
;
86
87
Vec3
getModdedPosn
(
const
Vec3
&posn)
const
;
88
89
void
insert
(
Particle
*pParticle);
90
91
void
insert
(
Particle
&particle);
92
93
size_t
getNumClonedParticles
()
const
;
94
95
size_t
getNumParticles
()
const
;
96
97
const
BoolVector
&
getPeriodicDimensions
()
const
;
98
99
protected
:
100
bool
isClone
(
Particle
*p)
const
;
101
102
ParticleVector
getNonClonedParticles
();
103
104
void
clearClonedParticles
();
105
106
private
:
107
BoolVector
m_periodicDimensions
;
108
ParticlePoolPtr
m_particlePoolPtr
;
109
ParticleSet
m_clonedParticleSet
;
110
int
m_circGridWidth
;
111
int
m_periodicDimIndex
;
112
};
113
}
114
}
115
116
#include "
Geometry/CircularNeighbourTable.hpp
"
117
118
#endif
Geometry
CircularNeighbourTable.h
Generated on Mon May 6 2013 23:26:29 for ESyS-Particle by
1.8.3.1