From e9af05f9119a0b83c6e353c102f25099f2248e85 Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Wed, 25 Nov 2015 16:56:27 +0100 Subject: [PATCH] Sketcher: Solver: FullPivLU::compute for Eigen-3.3 ================================================== This fix enables usage of the Eigen own compute function starting in Eigen-3.3, as now it is fixed in Eigen. [NOTE: This is only to be merged after Debian has updated the Eigen-3.3-alpha1 package] See: http://forum.freecadweb.org/viewtopic.php?f=3&t=4651&start=40 http://forum.freecadweb.org/viewtopic.php?f=10&t=12769&start=60#p106492 https://forum.kde.org/viewtopic.php?f=74&t=129439 --- src/Mod/Sketcher/App/planegcs/GCS.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Mod/Sketcher/App/planegcs/GCS.cpp b/src/Mod/Sketcher/App/planegcs/GCS.cpp index dd915c5c2..cf0fefc63 100644 --- a/src/Mod/Sketcher/App/planegcs/GCS.cpp +++ b/src/Mod/Sketcher/App/planegcs/GCS.cpp @@ -45,6 +45,13 @@ #if EIGEN_VERSION < 30290 // this is eigen3.3. Bad numbering? This should be safe anyway #define EIGEN_SPARSEQR_COMPATIBLE #endif +#if EIGEN_VERSION > 30290 // This regulates that only starting in Eigen 3.3, the problem with + // http://forum.freecadweb.org/viewtopic.php?f=3&t=4651&start=40 + // was solved in Eigen: + // http://forum.freecadweb.org/viewtopic.php?f=10&t=12769&start=60#p106492 + // https://forum.kde.org/viewtopic.php?f=74&t=129439 +#define EIGEN_STOCK_FULLPIVLU_COMPUTE +#endif #endif //#undef EIGEN_SPARSEQR_COMPATIBLE @@ -71,7 +78,7 @@ #include #include -// http://forum.freecadweb.org/viewtopic.php?f=3&t=4651&start=40 +#ifndef EIGEN_STOCK_FULLPIVLU_COMPUTE namespace Eigen { typedef Matrix MatrixdType; @@ -169,6 +176,7 @@ FullPivLU& FullPivLU::compute(const MatrixdType& matri } } // Eigen +#endif namespace GCS {