ESyS-Particle  2.2
PackerPy.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 #ifndef ESYS_LSMPACKERPY_H
14 #define ESYS_LSMPACKERPY_H
15 
16 #include "Geometry/Packer.h"
17 #include "Geometry/BoxPacker.h"
30 
31 namespace boost
32 {
33  namespace python
34  {
35  class list;
36  class tuple;
37  }
38 }
39 
40 namespace esys
41 {
42  namespace lsm
43  {
44  class PackerPy
45  : public Packer<SimpleSphereCollectionPy>,
46  public boost::python::wrapper<Packer<SimpleSphereCollectionPy> >
47  {
48  public:
50  typedef
53 
54  PackerPy(NTablePtr nTablePtr);
55 
56  PackerPy(ParticlePoolPtr particlePoolPtr, NTablePtr nTablePtr);
57 
59 
61 
62  virtual void generate();
63  };
64 
66 
68  {
69  public:
71 
73  ParticlePoolPtr particlePoolPtr,
74  NTablePtr nTablePtr,
75  const BoundingBox &bBox,
76  const BoolVector &periodicDimensions,
77  double tolerance
78  );
79  };
80 
84  {
85  public:
88  double radius,
89  const BoundingBoxPy &bBox,
90  const boost::python::list &periodicDimensions,
91  double tolerance
92  );
93  };
94 
96  template <typename TPartGen>
97  class PackerWrap
98  {
99  public:
102  };
103 
107  {
108  public:
110 
112  double minRadius,
113  double maxRadius,
114  double cubicPackRadius,
115  int maxInsertionFailures,
116  const BoundingBoxPy &bBox,
117  const boost::python::list &periodicDimensions,
118  double tolerance
119  );
120 
122  ParticleGeneratorPtr particleGeneratorPtr,
123  ParticlePoolPtr particlePoolPtr,
124  NTablePtr nTablePtr,
125  const BoundingBox &bBox,
126  const BoolVector &periodicDimensions,
127  double tolerance,
128  double cubicPackRadius,
129  int maxInsertionFailures,
130  const PlaneVector &fitPlaneVector
131  );
132  };
133 
136  {
137  public:
139 
141  double minRadius,
142  double maxRadius,
143  double cubicPackRadius,
144  int maxInsertionFailures,
145  const BoundingSpherePy &bSphere,
146  double tolerance,
147  bool do2d
148  );
149  };
150 
153  public RndGrainGenBasePy,
154  public boost::python::wrapper<RndGrainGenBasePy>
155  {
156  public:
158 
160  double minGrainRadius,
161  double maxGrainRadius,
162  double minParticleRadius,
163  double maxParticleRadius
164  );
165 
166  const double &getMinParticleRadius() const;
167 
168  const double &getMaxParticleRadius() const;
169 
170  virtual Grain getGrain(const Particle &p);
171 
172  private:
175  };
176 
179  typedef
183  {
184  public:
187  typedef
188  Inherited::GrainCollection::GrainIteratorPy
190 
192  ParticleGrainGen &particleGrainGen,
193  double cubicPackRadius,
194  int maxInsertionFailures,
195  const BoundingBox &bBox,
196  const boost::python::list &circDimList,
197  double tolerance
198  );
199 
201  ParticleGrainGenPtr particleGrainGenPtr,
202  ParticlePoolPtr particlePoolPtr,
203  NTablePtr nTablePtr,
204  const BoundingBox &bBox,
205  const BoolVector &periodicDimensions,
206  double tolerance,
207  double cubicPackRadius,
208  int maxInsertionFailures,
209  const PlaneVector &fitPlaneVector,
210  GrainPoolPtr grainPoolPtr
211  );
212 
213 
215 
216  const GrainCollection &getGrainCollectionPy() const;
217  };
218 
219  void exportPacker();
220  }
221 }
222 
223 #endif