From bbdf6c1b93d6f3bc1f675e2c84e3a06851565e6d Mon Sep 17 00:00:00 2001
From: Pietro Incardona <incardon@mpi-cbg.de>
Date: Fri, 30 Nov 2018 16:38:59 +0100
Subject: [PATCH] Fixing code for EIGEN not detected

---
 src/FiniteDifference/eq_unit_test_3d.cpp | 2 +-
 src/Solvers/umfpack_solver.hpp           | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/FiniteDifference/eq_unit_test_3d.cpp b/src/FiniteDifference/eq_unit_test_3d.cpp
index 9b969403..18665e6d 100644
--- a/src/FiniteDifference/eq_unit_test_3d.cpp
+++ b/src/FiniteDifference/eq_unit_test_3d.cpp
@@ -44,7 +44,7 @@ struct lid_nn_3d_eigen
 	typedef grid_dist_id<3,float,aggregate<float[3],float>,CartDecomposition<3,float>> b_grid;
 
 	//! type of SparseMatrix for the linear solver
-	typedef SparseMatrix<double,int> SparseMatrix_type;
+	typedef SparseMatrix<double,int,EIGEN_BASE> SparseMatrix_type;
 
 	//! type of Vector for the linear solver
 	typedef Vector<double> Vector_type;
diff --git a/src/Solvers/umfpack_solver.hpp b/src/Solvers/umfpack_solver.hpp
index 7eabf653..de7e4422 100644
--- a/src/Solvers/umfpack_solver.hpp
+++ b/src/Solvers/umfpack_solver.hpp
@@ -141,7 +141,7 @@ class umfpack_solver
 public:
 
 	//! stub solve
-	template<typename impl> static Vector<T> solve(const SparseMatrix<T,impl> & A, const Vector<T> & b)
+	template<typename impl, typename id_type> static Vector<T> solve(const SparseMatrix<T,id_type,impl> & A, const Vector<T,impl> & b)
 	{
 		std::cerr << __FILE__ << ":" << __LINE__ << " Error Umfpack only support double precision" << "/n";
 	}
@@ -153,7 +153,7 @@ public:
 	}
 
 	//! stub solve
-	static Vector<double,EIGEN_BASE> try_solve(SparseMatrix<double,int,EIGEN_BASE> & A, const Vector<double,EIGEN_BASE> & b, size_t opt = UMFPACK_NONE)
+	template<unsigned int impl, typename id_type> static Vector<T,impl> try_solve(SparseMatrix<T,id_type,impl> & A, const Vector<T,impl> & b, size_t opt = UMFPACK_NONE)
 	{
 		std::cerr << __FILE__ << ":" << __LINE__ << " Error Umfpack only support double precision" << "/n";
 	}
-- 
GitLab