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 "CircMNTable3DPy.h"
21
using namespace boost::python;
23
using boost::python::arg;
24
void exportCircMNTable3D()
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_<CircMNTable3D, bases<MNTable3D> >(
37
"A multi-group neighbours table for constructing 3D particle setups with circular boundary conditions in the X-direction.",
40
.def(init<const CircMNTable3D &>())
42
init<Vector3&,Vector3&,double, unsigned int>(
43
( boost::python::arg("minPoint"), boost::python::arg("maxPoint"), boost::python::arg("gridSize"), boost::python::arg("numGroups") ),
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\n"
56
"tagParticlesAlongPlane",
57
&CircMNTable3D::tagParticlesAlongPlane,
58
( boost::python::arg("plane"), boost::python::arg("distance"), boost::python::arg("tag"), boost::python::arg("groupID")=0 ),
59
"Assigns the specified tag to all particles from group C{groupID}\n"
60
"that lie within the specified distance of the given plane.\n"
61
"@type plane: L{Plane}\n"
62
"@kwarg plane: the plane along which to tag particles\n"
63
"@type distance: double\n"
64
"@kwarg distance: the maximum distance between tagged particles and the plane\n"
66
"@kwarg tag: the tag to assign particles\n"
67
"@type groupID: unsigned int\n"
68
"@kwarg groupID: the group ID of particles to tag (default: 0)\n"
73
&CircMNTable3D::generateBonds,
74
(boost::python::arg("groupID")=0, boost::python::arg("tolerance"), boost::python::arg("bondID") ),
75
"Generates bonds between particle pairs separated by less than the specified tolerance\n"
76
"@type groupID: int\n"
77
"@kwarg groupID: the group ID of particles to bond together (default: 0)\n"
78
"@type tolerance: double\n"
79
"@kwarg tolerance: maximum distance separating bonded particles\n"
81
"@kwarg bondID: the bond ID to assign generated bonds\n"
86
&CircMNTable3D::getSumVolume,
87
( boost::python::arg("groupID")=0 ),
88
"Returns the sum of the particle volumes in the specified group.\n"
89
"@type groupID: int\n"
90
"@kwarg groupID: the group ID of particles whose volume is summed (default: 0).\n"
95
&CircMNTable3D::write,
96
( boost::python::arg("fileName"), boost::python::arg("outputStyle") ),
97
"Writes the particle assembly and bonding information to the specified\n"
98
"file using the specified output style (0: debug; 1: geo; 2: vtk)\n"
99
"@type fileName: string\n"
100
"@kwarg fileName: the name of the file to write\n"
101
"@type outputStyle: int\n"
102
"@kwarg outputStyle: output style (0: debug; 1: geo; 2: vtk)\n"
106
"generateClusterBonds",
107
&CircMNTable3D::generateClusterBonds,
108
(boost::python::arg("groupID")=0, boost::python::arg("tolerance"), boost::python::arg("bondTag1"), boost::python::arg("bondTag2")),
109
"Generates bonds with tag C{Tag1} within clusters and C{Tag2} between clusters\n"
111
.def(self_ns::str(self))