Skip to content
Snippets Groups Projects
Commit 344bda84 authored by joergbuchwald's avatar joergbuchwald
Browse files

add preprocessor directives for Eigen version

parent b7df40a9
No related branches found
No related tags found
No related merge requests found
...@@ -386,7 +386,13 @@ std::unique_ptr<EigenLinearSolverBase> createIterativeSolver( ...@@ -386,7 +386,13 @@ std::unique_ptr<EigenLinearSolverBase> createIterativeSolver(
case EigenOption::SolverType::BiCGSTABL: case EigenOption::SolverType::BiCGSTABL:
{ {
#ifdef USE_EIGEN_UNSUPPORTED #ifdef USE_EIGEN_UNSUPPORTED
#if EIGEN_VERSION_AT_LEAST(3, 4, 90)
return createIterativeSolver<Eigen::BiCGSTABL>(precon_type); return createIterativeSolver<Eigen::BiCGSTABL>(precon_type);
#else
OGS_FATAL(
"BiCGSTABL requires at least Eigen version 3.4.90"
);
#endif
#else #else
OGS_FATAL( OGS_FATAL(
"The code is not compiled with the Eigen unsupported modules. " "The code is not compiled with the Eigen unsupported modules. "
...@@ -410,7 +416,13 @@ std::unique_ptr<EigenLinearSolverBase> createIterativeSolver( ...@@ -410,7 +416,13 @@ std::unique_ptr<EigenLinearSolverBase> createIterativeSolver(
case EigenOption::SolverType::IDRS: case EigenOption::SolverType::IDRS:
{ {
#ifdef USE_EIGEN_UNSUPPORTED #ifdef USE_EIGEN_UNSUPPORTED
#if EIGEN_VERSION_AT_LEAST(3, 4, 90)
return createIterativeSolver<Eigen::IDRS>(precon_type); return createIterativeSolver<Eigen::IDRS>(precon_type);
#else
OGS_FATAL(
"IDRS requires at least Eigen version 3.4.90"
);
#endif
#else #else
OGS_FATAL( OGS_FATAL(
"The code is not compiled with the Eigen unsupported modules. " "The code is not compiled with the Eigen unsupported modules. "
...@@ -420,7 +432,13 @@ std::unique_ptr<EigenLinearSolverBase> createIterativeSolver( ...@@ -420,7 +432,13 @@ std::unique_ptr<EigenLinearSolverBase> createIterativeSolver(
case EigenOption::SolverType::IDRSTABL: case EigenOption::SolverType::IDRSTABL:
{ {
#ifdef USE_EIGEN_UNSUPPORTED #ifdef USE_EIGEN_UNSUPPORTED
#if EIGEN_VERSION_AT_LEAST(3, 4, 90)
return createIterativeSolver<Eigen::IDRSTABL>(precon_type); return createIterativeSolver<Eigen::IDRSTABL>(precon_type);
#else
OGS_FATAL(
"IDRSTABL requires at least Eigen version 3.4.90"
);
#endif
#else #else
OGS_FATAL( OGS_FATAL(
"The code is not compiled with the Eigen unsupported modules. " "The code is not compiled with the Eigen unsupported modules. "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment