Commit 48ccf9c0 authored by GILLES Sebastien's avatar GILLES Sebastien

#1401 Update MoReFEM to the latest versions of third-party libraries.

parent 28057a71
......@@ -29,6 +29,7 @@ PRAGMA_DIAGNOSTIC(ignored "-Wconversion")
PRAGMA_DIAGNOSTIC(ignored "-Wreserved-id-macro")
PRAGMA_DIAGNOSTIC(ignored "-Wweak-vtables")
PRAGMA_DIAGNOSTIC(ignored "-Wundef")
PRAGMA_DIAGNOSTIC(ignored "-Wnon-virtual-dtor")
# if (not defined(__apple_build_version__) || __clang_major__ >= 10)
PRAGMA_DIAGNOSTIC(ignored "-Wzero-as-null-pointer-constant")
......
......@@ -31,6 +31,7 @@ PRAGMA_DIAGNOSTIC(ignored "-Wswitch-enum")
PRAGMA_DIAGNOSTIC(ignored "-Wdisabled-macro-expansion")
PRAGMA_DIAGNOSTIC(ignored "-Wcovered-switch-default")
PRAGMA_DIAGNOSTIC(ignored "-Wmissing-prototypes")
PRAGMA_DIAGNOSTIC(ignored "-Wundef")
# if (not defined(__apple_build_version__) || __clang_major__ >= 10)
PRAGMA_DIAGNOSTIC(ignored "-Wzero-as-null-pointer-constant")
......
......@@ -24,7 +24,7 @@ PRAGMA_DIAGNOSTIC(push)
PRAGMA_DIAGNOSTIC(ignored "-Wweak-vtables")
PRAGMA_DIAGNOSTIC(ignored "-Wdisabled-macro-expansion")
PRAGMA_DIAGNOSTIC(ignored "-Wreserved-id-macro")
PRAGMA_DIAGNOSTIC(ignored "-Wundef")
# if (not defined(__apple_build_version__) || __clang_major__ >= 10)
PRAGMA_DIAGNOSTIC(ignored "-Wzero-as-null-pointer-constant")
# endif
......
......@@ -26,6 +26,7 @@ PRAGMA_DIAGNOSTIC(ignored "-Wcast-align")
PRAGMA_DIAGNOSTIC(ignored "-Wweak-vtables")
PRAGMA_DIAGNOSTIC(ignored "-Wdeprecated")
PRAGMA_DIAGNOSTIC(ignored "-Wreserved-id-macro")
PRAGMA_DIAGNOSTIC(ignored "-Wundef")
# if (not defined(__apple_build_version__) || __clang_major__ >= 10)
PRAGMA_DIAGNOSTIC(ignored "-Wzero-as-null-pointer-constant")
......
......@@ -23,6 +23,7 @@ PRAGMA_DIAGNOSTIC(ignored "-Wredundant-decls")
# ifdef __clang__
PRAGMA_DIAGNOSTIC(ignored "-Wcomma")
PRAGMA_DIAGNOSTIC(ignored "-Wreserved-id-macro")
PRAGMA_DIAGNOSTIC(ignored "-Wundef")
# if (not defined(__apple_build_version__) || __clang_major__ >= 10)
PRAGMA_DIAGNOSTIC(ignored "-Wzero-as-null-pointer-constant")
# endif
......
......@@ -27,6 +27,7 @@ PRAGMA_DIAGNOSTIC(ignored "-Wredundant-decls")
# ifdef __clang__
PRAGMA_DIAGNOSTIC(ignored "-Wcomma")
PRAGMA_DIAGNOSTIC(ignored "-Wreserved-id-macro")
PRAGMA_DIAGNOSTIC(ignored "-Wundef")
# if (not defined(__apple_build_version__) || __clang_major__ >= 10)
PRAGMA_DIAGNOSTIC(ignored "-Wzero-as-null-pointer-constant")
# endif
......
......@@ -26,6 +26,7 @@ PRAGMA_DIAGNOSTIC(ignored "-Wcast-qual")
# ifdef __clang__
PRAGMA_DIAGNOSTIC(ignored "-Wreserved-id-macro")
PRAGMA_DIAGNOSTIC(ignored "-Wcomma")
PRAGMA_DIAGNOSTIC(ignored "-Wundef")
# if (not defined(__apple_build_version__) || __clang_major__ >= 10)
PRAGMA_DIAGNOSTIC(ignored "-Wzero-as-null-pointer-constant")
# endif
......
......@@ -26,6 +26,7 @@ PRAGMA_DIAGNOSTIC(ignored "-Wold-style-cast")
# ifdef __clang__
PRAGMA_DIAGNOSTIC(ignored "-Wcomma")
PRAGMA_DIAGNOSTIC(ignored "-Wreserved-id-macro")
PRAGMA_DIAGNOSTIC(ignored "-Wundef")
# if (not defined(__apple_build_version__) || __clang_major__ >= 10)
PRAGMA_DIAGNOSTIC(ignored "-Wzero-as-null-pointer-constant")
# endif
......
......@@ -156,13 +156,23 @@ namespace MoReFEM
return ret;
}
#if PETSC_VERSION_LT(3, 11, 0)
const std::string& KspConvergenceReason<KSP_DIVERGED_PCSETUP_FAILED>::Explanation()
{
static std::string ret("KSP_DIVERGED_PCSETUP_FAILED");
return ret;
}
#endif
#if PETSC_VERSION_GE(3, 11, 0)
const std::string& KspConvergenceReason<KSP_DIVERGED_PC_FAILED>::Explanation()
{
static std::string ret("KSP_DIVERGED_PC_FAILED");
return ret;
}
#endif
const std::string& KspConvergenceReason<KSP_CONVERGED_ITERATING>::Explanation()
......
......@@ -281,6 +281,7 @@ namespace MoReFEM
};
# if PETSC_VERSION_LT(3, 11, 0)
template<>
struct KspConvergenceReason<KSP_DIVERGED_PCSETUP_FAILED>
{
......@@ -291,8 +292,22 @@ namespace MoReFEM
static const std::string& Explanation();
};
# endif
# if PETSC_VERSION_GE(3, 11, 0)
template<>
struct KspConvergenceReason<KSP_DIVERGED_PC_FAILED>
{
static constexpr convergence_status GetConvergenceStatus() noexcept;
static const std::string& Explanation();
};
# endif // PETSC_VERSION_GE(3, 11, 0)
template<>
struct KspConvergenceReason<KSP_CONVERGED_ITERATING>
......
......@@ -159,11 +159,22 @@ namespace MoReFEM
}
# if PETSC_VERSION_LT(3, 11, 0)
inline constexpr convergence_status KspConvergenceReason<KSP_DIVERGED_PCSETUP_FAILED>
::GetConvergenceStatus() noexcept
{
return convergence_status::no;
}
# endif
# if PETSC_VERSION_GE(3, 11, 0)
inline constexpr convergence_status KspConvergenceReason<KSP_DIVERGED_PC_FAILED>
::GetConvergenceStatus() noexcept
{
return convergence_status::no;
}
# endif
inline constexpr convergence_status KspConvergenceReason<KSP_CONVERGED_ITERATING>
......
......@@ -137,6 +137,15 @@ namespace MoReFEM
static std::string ret("Newton still in progress.");
return ret;
}
#if PETSC_VERSION_GE(3, 11, 0)
const std::string& SnesConvergenceReason<SNES_DIVERGED_JACOBIAN_DOMAIN>::Explanation()
{
static std::string ret("SNES_DIVERGED_JACOBIAN_DOMAIN");
return ret;
}
#endif
} // namespace Petsc
......
......@@ -252,6 +252,20 @@ namespace MoReFEM
};
# if PETSC_VERSION_GE(3, 11, 0)
template<>
struct SnesConvergenceReason<SNES_DIVERGED_JACOBIAN_DOMAIN>
{
static constexpr convergence_status GetConvergenceStatus() noexcept;
static const std::string& Explanation();
};
# endif // PETSC_VERSION_GE(3, 11, 0)
// ============================
//! \endcond IGNORE_BLOCK_IN_DOXYGEN
// ============================
......
......@@ -139,6 +139,15 @@ namespace MoReFEM
}
# if PETSC_VERSION_GE(3, 11, 0)
inline constexpr convergence_status SnesConvergenceReason<SNES_DIVERGED_JACOBIAN_DOMAIN>
::GetConvergenceStatus() noexcept
{
return convergence_status::no;
}
# endif
} // namespace Petsc
......
......@@ -434,6 +434,11 @@ namespace MoReFEM
case SNES_DIVERGED_DTOL:
return GetNonLinearConvergenceReasonHelper<SNES_DIVERGED_DTOL>();
#endif // PETSC_VERSION_GE(3, 8, 0)
#if PETSC_VERSION_GE(3, 11, 0)
case SNES_DIVERGED_JACOBIAN_DOMAIN:
return GetNonLinearConvergenceReasonHelper<SNES_DIVERGED_JACOBIAN_DOMAIN>();
#endif // PETSC_VERSION_GE(3, 11, 0)
// You might have to add or remove an entry after updating Petsc version; look after the warnings
// about missing switch entry!
}
......@@ -500,8 +505,14 @@ namespace MoReFEM
return GetLinearConvergenceReasonHelper<KSP_DIVERGED_NANORINF>();
case KSP_DIVERGED_INDEFINITE_MAT:
return GetLinearConvergenceReasonHelper<KSP_DIVERGED_INDEFINITE_MAT>();
#if PETSC_VERSION_LT(3, 11, 0)
case KSP_DIVERGED_PCSETUP_FAILED:
return GetLinearConvergenceReasonHelper<KSP_DIVERGED_PCSETUP_FAILED>();
#endif
#if PETSC_VERSION_GE(3, 11, 0)
case KSP_DIVERGED_PC_FAILED:
return GetLinearConvergenceReasonHelper<KSP_DIVERGED_PC_FAILED>();
#endif // PETSC_VERSION_GE(3, 11, 0)
case KSP_CONVERGED_ITERATING:
return GetLinearConvergenceReasonHelper<KSP_CONVERGED_ITERATING>();
// You might have to add or remove an entry after updating Petsc version; look after the warnings
......
......@@ -39,6 +39,8 @@ endif()
add_definitions(-DSELDON_WITH_LAPACK -DSELDON_WITH_BLAS -DSELDON_WITH_COMPILED_LIBRARY)
#add_cxx_compiler_flag("-fvisibility-inlines-hidden")
#add_cxx_compiler_flag("-fvisibility=default")
if(${CMAKE_C_COMPILER_ID} STREQUAL "AppleClang" OR ${CMAKE_C_COMPILER_ID} STREQUAL "Clang")
......
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