Skip to content

Commit

Permalink
Sketcher: Solver: FullPivLU::compute for Eigen-3.3
Browse files Browse the repository at this point in the history
==================================================

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
  • Loading branch information
abdullahtahiriyo authored and yorikvanhavre committed Dec 28, 2015
1 parent e0683f4 commit e9af05f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Mod/Sketcher/App/planegcs/GCS.cpp
Expand Up @@ -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
Expand All @@ -71,7 +78,7 @@
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/connected_components.hpp>

// http://forum.freecadweb.org/viewtopic.php?f=3&t=4651&start=40
#ifndef EIGEN_STOCK_FULLPIVLU_COMPUTE
namespace Eigen {

typedef Matrix<double,-1,-1,0,-1,-1> MatrixdType;
Expand Down Expand Up @@ -169,6 +176,7 @@ FullPivLU<MatrixdType>& FullPivLU<MatrixdType>::compute(const MatrixdType& matri
}

} // Eigen
#endif

namespace GCS
{
Expand Down

0 comments on commit e9af05f

Please sign in to comment.