Commit bbdf6c1b authored by incardon's avatar incardon

Fixing code for EIGEN not detected

parent 080e76bf
...@@ -44,7 +44,7 @@ struct lid_nn_3d_eigen ...@@ -44,7 +44,7 @@ struct lid_nn_3d_eigen
typedef grid_dist_id<3,float,aggregate<float[3],float>,CartDecomposition<3,float>> b_grid; typedef grid_dist_id<3,float,aggregate<float[3],float>,CartDecomposition<3,float>> b_grid;
//! type of SparseMatrix for the linear solver //! 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 //! type of Vector for the linear solver
typedef Vector<double> Vector_type; typedef Vector<double> Vector_type;
......
...@@ -141,7 +141,7 @@ class umfpack_solver ...@@ -141,7 +141,7 @@ class umfpack_solver
public: public:
//! stub solve //! 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"; std::cerr << __FILE__ << ":" << __LINE__ << " Error Umfpack only support double precision" << "/n";
} }
...@@ -153,7 +153,7 @@ public: ...@@ -153,7 +153,7 @@ public:
} }
//! stub solve //! 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"; std::cerr << __FILE__ << ":" << __LINE__ << " Error Umfpack only support double precision" << "/n";
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment