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>
17
#include "CircMNTable2DPy.h"
21
using namespace boost::python;
23
using boost::python::arg;
24
void exportCircMNTable2D()
26
// Check that Boost 1.34.0 or higher is being used.
27
// If so, disable auto-generation of C++ signatures for Epydoc
28
// (which stumbles over indentation in the auto-generated strings).
29
#if ((BOOST_VERSION / 100000 >= 1) \
30
&& (BOOST_VERSION / 100 % 1000 >= 34)) \
31
|| (BOOST_VERSION / 100000 >= 2)
32
boost::python::docstring_options no_autogen(true,false);
35
class_<CircMNTable2D, bases<MNTable2D> >(
37
"A multi-group neighbours table for constructing 2D particle setups with circular boundary conditions in the X-direction.",
40
.def(init<const CircMNTable2D &>())
42
init<Vector3&,Vector3&,double, unsigned int>(
43
( boost::python::arg("minPoint"), boost::python::arg("maxPoint"), boost::python::arg("gridSize"), boost::python::arg("numGroups")=1 ),
44
"Constructs a neighbours table with specified bounds, cell size and initial number of particle groups.\n"
45
"@type minPoint: L{Vector3}\n"
46
"@kwarg minPoint: lower-left point of the particle region\n"
47
"@type maxPoint: L{Vector3}\n"
48
"@kwarg maxPoint: upper-right point of the particle region\n"
49
"@type gridSize: double\n"
50
"@kwarg gridSize: the cell size for neighbour searches\n"
51
"@type numGroups: unsigned int\n"
52
"@kwarg numGroups: the initial number of groups (default: 1)\n"
57
&CircMNTable2D::generateBonds,
58
(boost::python::arg("groupID")=0, boost::python::arg("tolerance"), boost::python::arg("bondID") ),
59
"Generates bonds between particle pairs separated by less than the specified tolerance\n"
60
"@type groupID: int\n"
61
"@kwarg groupID: the group ID of particles to bond together (default: 0)\n"
62
"@type tolerance: double\n"
63
"@kwarg tolerance: maximum distance separating bonded particles\n"
65
"@kwarg bondID: the bond ID to assign generated bonds\n"
68
.def(self_ns::str(self))