← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2516: 1. Disable debug messages from ScGeom in both debug and non-debug (!!) builds

 

------------------------------------------------------------
revno: 2516
committer: Václav Šmilauer <eudoxos@xxxxxxxx>
branch nick: trunk
timestamp: Tue 2010-10-26 18:31:33 +0200
message:
  1. Disable debug messages from ScGeom in both debug and non-debug (!!) builds
modified:
  pkg/dem/ScGeom.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/ScGeom.cpp'
--- pkg/dem/ScGeom.cpp	2010-10-26 14:59:45 +0000
+++ pkg/dem/ScGeom.cpp	2010-10-26 16:31:33 +0000
@@ -94,8 +94,9 @@
 		if (creep) delta = delta * twistCreep;
 		AngleAxisr aa(delta); // axis of rotation - this is the Moment direction UNIT vector; // angle represents the power of resistant ELASTIC moment
 		//Eigen::AngleAxisr(q) returns nan's when q close to identity, next tline fixes the pb.
-#define Q_DEBUG
-#ifdef Q_DEBUG
+// add -DYADE_SCGEOM_DEBUG to CXXFLAGS to enable this piece or just do
+//   #define YADE_SCGEOM_DEBUG (but do not commit with that enabled in the code)
+#ifdef YADE_SCGEOM_DEBUG
 		if (isnan(aa.angle())) {
 			cerr<<"NaN angle found in angleAxisr(q), for quaternion "<<delta<<", after quaternion product"<<endl;
 			cerr<<"rbp1.ori * (initialOrientation1.conjugate())) * (initialOrientation2 * (rbp2.ori.conjugate()) is:"<<endl;


Follow ups