From bf651b92d3d9917d8ded515d2d97fba1ba63513a Mon Sep 17 00:00:00 2001
From: Norihiro Watanabe <norihiro.watanabe@ufz.de>
Date: Tue, 14 Jun 2016 14:42:55 +0200
Subject: [PATCH] delete OGS_USE_EIGENLIS. OGS_USE_LIS always uses Eigen
 objects internally

---
 CMakeLists.txt                           | 13 -------------
 MathLib/CMakeLists.txt                   |  3 ---
 MathLib/LinAlg/GlobalMatrixVectorTypes.h |  2 +-
 MathLib/LinAlg/LinearSolver.cpp          |  2 +-
 4 files changed, 2 insertions(+), 18 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f74323313f8..a5d94fc6c9c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -64,8 +64,6 @@ option(OGS_NO_EXTERNAL_LIBS "Builds OGS without any external dependencies." OFF)
 # Linear solvers
 option(OGS_USE_LIS "Use Lis" OFF)
 
-option(OGS_USE_EIGENLIS "Use Lis solver together with Eigen sparse matrices" OFF)
-
 # Parallel computing: vector and matrix algebraic caculation, solvers
 option(OGS_USE_PETSC "Use PETSc routines" OFF)
 
@@ -146,17 +144,6 @@ if(OGS_USE_EIGEN)
     add_definitions(-DOGS_USE_EIGEN)
 endif()
 
-if (OGS_USE_EIGENLIS)
-    if (NOT OGS_USE_EIGEN)
-        message(FATAL_ERROR "OGS_USE_EIGENLIS needs OGS_USE_EIGEN to be set!")
-    endif()
-    if (NOT OGS_USE_LIS)
-        message(FATAL_ERROR "OGS_USE_EIGENLIS needs OGS_USE_LIS to be set!")
-    endif()
-
-    add_definitions(-DOGS_USE_EIGENLIS)
-endif()
-
 if(OGS_BUILD_TESTS)
     set(Data_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Tests/Data CACHE INTERNAL "")
     set(Data_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/Tests/Data CACHE INTERNAL "")
diff --git a/MathLib/CMakeLists.txt b/MathLib/CMakeLists.txt
index af30101b392..3d77de3e611 100644
--- a/MathLib/CMakeLists.txt
+++ b/MathLib/CMakeLists.txt
@@ -28,9 +28,6 @@ endif()
 if(OGS_USE_LIS)
     GET_SOURCE_FILES(SOURCES_LINALG_LIS LinAlg/Lis)
     set(SOURCES ${SOURCES} ${SOURCES_LINALG_LIS})
-endif()
-
-if(OGS_USE_EIGEN AND OGS_USE_LIS)
     GET_SOURCE_FILES(SOURCES_LINALG_EIGENLIS LinAlg/EigenLis)
     set(SOURCES ${SOURCES} ${SOURCES_LINALG_EIGENLIS})
 endif()
diff --git a/MathLib/LinAlg/GlobalMatrixVectorTypes.h b/MathLib/LinAlg/GlobalMatrixVectorTypes.h
index 7f0751d6c35..4dafd718ddf 100644
--- a/MathLib/LinAlg/GlobalMatrixVectorTypes.h
+++ b/MathLib/LinAlg/GlobalMatrixVectorTypes.h
@@ -15,7 +15,7 @@
 //
 // Global vector/matrix types and linear solver.
 //
-#if defined(OGS_USE_EIGENLIS)
+#if defined(OGS_USE_LIS)
 
     #include "MathLib/LinAlg/Eigen/EigenMatrix.h"
     #include "MathLib/LinAlg/Eigen/EigenVector.h"
diff --git a/MathLib/LinAlg/LinearSolver.cpp b/MathLib/LinAlg/LinearSolver.cpp
index 3aa587c1d0a..f656ae46e46 100644
--- a/MathLib/LinAlg/LinearSolver.cpp
+++ b/MathLib/LinAlg/LinearSolver.cpp
@@ -93,7 +93,7 @@ SPECIALIZE_CREATE_LINEAR_SOLVER(Eigen::MatrixXd, Eigen::VectorXd,
 #endif
 
 
-#ifdef OGS_USE_EIGENLIS
+#ifdef OGS_USE_LIS
 
 #include "MathLib/LinAlg/EigenLis/EigenLisLinearSolver.h"
 
-- 
GitLab