yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #02963
[Branch ~yade-dev/yade/trunk] Rev 1943: 1. Fix SpherePack().makeCloud() in python
------------------------------------------------------------
revno: 1943
committer: Václav Šmilauer <eudoxos@xxxxxxxx>
branch nick: trunk
timestamp: Wed 2010-01-06 11:06:51 +0100
message:
1. Fix SpherePack().makeCloud() in python
modified:
pkg/dem/DataClass/SpherePack.hpp
py/_packSpheres.cpp
--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription.
=== modified file 'pkg/dem/DataClass/SpherePack.hpp'
--- pkg/dem/DataClass/SpherePack.hpp 2010-01-05 23:02:24 +0000
+++ pkg/dem/DataClass/SpherePack.hpp 2010-01-06 10:06:51 +0000
@@ -51,7 +51,7 @@
void fromSimulation();
// random generation; if num<0, insert as many spheres as possible; if porosity>0 recompute meanRadius (porosity<0.4 recommended) to try and generate "num" spheres in the box.
- long makeCloud(Vector3r min, Vector3r max, Real rMean, Real rFuzz, int num, bool periodic=false, Real porosity=-1);
+ long makeCloud(Vector3r min, Vector3r max, Real rMean, Real rFuzz, int num=-1, bool periodic=false, Real porosity=-1);
// periodic repetition
void cellRepeat(Vector3<int> count);
=== modified file 'py/_packSpheres.cpp'
--- py/_packSpheres.cpp 2009-11-13 11:27:22 +0000
+++ py/_packSpheres.cpp 2010-01-06 10:06:51 +0000
@@ -12,7 +12,7 @@
.def("load",&SpherePack::fromFile,"Load packing from external text file (current data will be discarded).")
.def("save",&SpherePack::toFile,"Save packing to external text file (will be overwritten).")
.def("fromSimulation",&SpherePack::fromSimulation,"Make packing corresponding to the current simulation. Discards current data.")
- .def("makeCloud",&SpherePack::makeCloud,python::args("minCorner","maxCorner","rMean","rRelFuzz","num","periodic"),"Create random packing encosed in box given by minCorner and maxCorner, containing num spheres. Returns number of created spheres, which can be < num if the packing is too tight.")
+ .def("makeCloud",&SpherePack::makeCloud,(python::arg("minCorner"),python::arg("maxCorner"),python::arg("rMean"),python::arg("rRelFuzz"),python::arg("num")=-1,python::arg("periodic")=false,python::arg("porosity")=-1),"Create random packing encosed in box given by minCorner and maxCorner, containing num spheres. Returns number of created spheres, which can be < num if the packing is too tight.")
.def("aabb",&SpherePack::aabb_py,"Get axis-aligned bounding box coordinates, as 2 3-tuples.")
.def("dim",&SpherePack::dim,"Return dimensions of the packing in terms of aabb(), as a 3-tuple.")
.def("center",&SpherePack::midPt,"Return coordinates of the bounding box center.")