← Back to team overview

yade-dev team mailing list archive

bugs in wm3::Math (patch)

 

Please apply the patch attached (none has even bothered to run the code 
since it was written???). What is the wm3 version used in Yade? The one 
I downloaded from there website just before they released ver.4 had some 
methods named differently (IIRC they had Vector3r::X() instead of 
Vector3r::x() what we have now). We should use the most recent version, 
that's sure.

Vaclav


---


Index: yade-libs/yade-lib-wm3-math/src/yade-lib-wm3-math/Matrix3.ipp
===================================================================
--- yade-libs/yade-lib-wm3-math/src/yade-lib-wm3-math/Matrix3.ipp 
(revision 1014)
+++ yade-libs/yade-lib-wm3-math/src/yade-lib-wm3-math/Matrix3.ipp 
(working copy)
@@ -787,7 +787,7 @@
      // diagonal entries of D are the corresponding eigenvalues.
      RealType afDiag[3], afSubd[2];
      rkRot = *this;
-    bool bReflection = rkRot.Tridiagonalize(afDiag,afSubd);
+    bool bReflection = rkRot.tridiagonalize(afDiag,afSubd);
      bool bConverged = rkRot.QLAlgorithm(afDiag,afSubd);
      assert( bConverged );

@@ -1293,7 +1293,7 @@
      afDiag[0] = fM00;
      if ( Math<RealType>::fAbs(fM02) >= Math<RealType>::ZERO_TOLERANCE )
      {
-        afSubd[0] = Math<RealType>::Sqrt(fM01*fM01+fM02*fM02);
+        afSubd[0] = Math<RealType>::sqRoot(fM01*fM01+fM02*fM02);
          RealType fInvLength = ((RealType)1.0)/afSubd[0];
          fM01 *= fInvLength;
          fM02 *= fInvLength;
_______________________________________________
yade-dev mailing list
yade-dev@xxxxxxxxxxxxxxxx
https://lists.berlios.de/mailman/listinfo/yade-dev



Follow ups