← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2779: 1. in utils.sumTorques and utils.sumForces py::tuple has been changed to py::list. I think it is ...

 

------------------------------------------------------------
revno: 2779
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
branch nick: yade
timestamp: Fri 2011-03-04 16:51:30 +0100
message:
  1. in utils.sumTorques and utils.sumForces py::tuple has been changed to py::list. I think it is more convinient.
  2. added RuntimeError() to checkTestTriax.py. Bruno, are you agree?
modified:
  py/_utils.cpp
  scripts/test/checks/checkTestTriax.py


--
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/_utils.cpp'
--- py/_utils.cpp	2011-03-02 11:52:02 +0000
+++ py/_utils.cpp	2011-03-04 15:51:30 +0000
@@ -202,7 +202,7 @@
  * is position relative to axisPt; moment from moment is m; such moment per body is
  * projected onto axis.
  */
-Real sumTorques(py::tuple ids, const Vector3r& axis, const Vector3r& axisPt){
+Real sumTorques(py::list ids, const Vector3r& axis, const Vector3r& axisPt){
 	shared_ptr<Scene> rb=Omega::instance().getScene();
 	rb->forces.sync();
 	Real ret=0;
@@ -222,7 +222,7 @@
  * @param direction direction in which forces are summed
  *
  */
-Real sumForces(py::tuple ids, const Vector3r& direction){
+Real sumForces(py::list ids, const Vector3r& direction){
 	shared_ptr<Scene> rb=Omega::instance().getScene();
 	rb->forces.sync();
 	Real ret=0;

=== modified file 'scripts/test/checks/checkTestTriax.py'
--- scripts/test/checks/checkTestTriax.py	2011-02-07 10:50:11 +0000
+++ scripts/test/checks/checkTestTriax.py	2011-03-04 15:51:30 +0000
@@ -25,6 +25,8 @@
 if abs((O.engines[4].stress(3)[0]-50058.7)/50058.7)>tolerance :
 	print "Triaxial checkTest: difference on peak stress"
 	errors+=1
+
 if errors==0:
 	print "checkTestTriax success"
-
+else:
+	RuntimeError("Some tests are failed!")