yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #03611
[Branch ~yade-dev/yade/trunk] Rev 2088: - py wrapping for getSpheresVolume (usage : O.getSpheresVolume)
------------------------------------------------------------
revno: 2088
committer: Bruno Chareyre <bchareyre@r1arduina>
branch nick: trunk
timestamp: Thu 2010-03-18 17:07:12 +0100
message:
- py wrapping for getSpheresVolume (usage : O.getSpheresVolume)
modified:
py/yadeWrapper/yadeWrapper.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 'py/yadeWrapper/yadeWrapper.cpp'
--- py/yadeWrapper/yadeWrapper.cpp 2010-03-16 15:34:25 +0000
+++ py/yadeWrapper/yadeWrapper.cpp 2010-03-18 16:07:12 +0000
@@ -376,6 +376,8 @@
void saveSpheres(std::string fileName){ Shop::saveSpheresToFile(fileName); }
+ double getSpheresVolume(){ return Shop::getSpheresVolume(); }
+
python::list miscParams_get(){
python::list ret;
FOREACH(shared_ptr<Serializable>& s, OMEGA.getScene()->miscParams){
@@ -534,6 +536,7 @@
.def("tmpToFile",&pyOmega::tmpToFile,"Return XML of saveTmp'd simulation as string.")
.def("tmpToString",&pyOmega::tmpToString,"Save XML of saveTmp'd simulation in file.")
.def("saveSpheres",&pyOmega::saveSpheres,"Saves spherical bodies to external ASCII file, one sphere (x y z r) per line.")
+ .def("getSpheresVolume",&pyOmega::getSpheresVolume,"Compute the total volume of spheres in the simulation (might crash for now if dynamic bodies are not spheres)")
.def("run",&pyOmega::run,(python::arg("nSteps")=-1,python::arg("wait")=false),"Run the simulation.\n@param nSteps how many steps to run, then stop.\n@param wait if True, doesn't return until the simulation will have stopped.")
.def("pause",&pyOmega::pause,"Stop simulation execution.\n(may be called from within the loop, and it will stop after the current step).")
.def("step",&pyOmega::step,"Advance the simulation by one step. Returns after the step will have finished.")
Follow ups