1
/////////////////////////////////////////////////////////////
3
// Copyright (c) 2007-2011 by The University of Queensland //
4
// Earth Systems Science Computational Centre (ESSCC) //
5
// http://www.uq.edu.au/esscc //
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 //
11
/////////////////////////////////////////////////////////////
13
#include <boost/version.hpp>
16
#include "HexAggregateInsertGenerator3DPy.h"
18
using namespace boost::python;
20
using boost::python::arg;
21
void exportHexAggregateInsertGenerator3D()
23
// Check that Boost 1.34.0 or higher is being used.
24
// If so, disable auto-generation of C++ signatures for Epydoc
25
// (which stumbles over indentation in the auto-generated strings).
26
#if ((BOOST_VERSION / 100000 >= 1) \
27
&& (BOOST_VERSION / 100 % 1000 >= 34)) \
28
|| (BOOST_VERSION / 100000 >= 2)
29
boost::python::docstring_options no_autogen(true,false);
32
class_<HexAggregateInsertGenerator3D, bases<InsertGenerator3D> >(
33
"HexAggregateInsertGenerator3D",
34
"A particle packing algorithm for filling L{AVolume3D} spaces with hexahedral aggregates of particles",
37
.def(init<const HexAggregateInsertGenerator3D &>())
39
init<double,double,int,int,double,bool>(
40
( arg("minRadius"), arg("maxRadius"), arg("insertFails"), arg("maxIterations"), arg("tolerance"),arg("seed") ),
41
"Initialises a particle packer in preparation for filling a\n"
42
"L{AVolume3D} with hexahedral aggregates whose bounding sphere radii are in the specified range.\n"
43
"The algorithm consists of two stages: \n"
44
"1) the L{AVolume3D} is packed with particles of a specified radius range,\n"
45
"2) each particle is replaced with a hexahedral grain of particles of equal size\n"
46
"@type minRadius: double\n"
47
"@kwarg minRadius: the minimum radius of particles to pack\n"
48
"@type maxRadius: double\n"
49
"@kwarg maxRadius: the maximum radius of particles to pack\n"
50
"@type insertFails: int\n"
51
"@kwarg insertFails: the number of particle insertion failures before the packer terminates\n"
52
"@type maxIterations: int\n"
53
"@kwarg maxIterations: the maximum number of iterations of the solver\n"
54
"@type tolerance: double\n"
55
"@kwarg tolerance: the overlap tolerance permitted\n"
57
"@kwarg seed: randomize the random number generator if True\n"
63
&HexAggregateInsertGenerator3D::generatePacking3,
64
( arg("volume"), arg("ntable"), arg("groupID")=0 ),
65
"Generates a particle assembly to fill the specified volume with\n"
66
"hexahedral aggregrates whose constituent particles have the specified particle tag\n"
67
"@type volume: L{AVolume3D}\n"
68
"@kwarg volume: the 3D volume to fill with particles\n"
69
"@type ntable: L{MNTable3D}\n"
70
"@kwarg ntable: the neighbours table particles are inserted into\n"
71
"@type groupID: int\n"
72
"@kwarg groupID: the group ID assigned to particles (default: 0)\n"
77
&HexAggregateInsertGenerator3D::generatePacking4,
78
( arg("volume"), arg("ntable"), arg("groupID")=0, arg("tag") ),
80
"@kwarg tag: the tag assigned to the generated particles\n"
81
" (optional if not followed by C{list})\n"
84
"generatePackingMaxVolume",
85
&HexAggregateInsertGenerator3D::generatePackingMaxVolume,
86
( arg("volume"), arg("ntable"), arg("groupID")=0, arg("tag"), arg("maxVolume") ),
87
"Fill the specified L{AVolume3D} with particles until the accumulated particle volume exceeds the specified C{maxVolume}.\n"
88
"@type maxVolume: float\n"
89
"@kwarg maxVolume: the maximum cumulative volume of the inserted particles\n"
91
.def(self_ns::str(self))