Commit fa0ede98 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#1493 Handle a Petsc keyword that disappeared with v3.12.

parent 713acf1c
......@@ -58,12 +58,14 @@ namespace MoReFEM
return ret;
}
#if PETSC_VERSION_LT(3, 12, 0)
const std::string& SnesConvergenceReason<SNES_CONVERGED_TR_DELTA>::Explanation()
{
static std::string ret("SNES_CONVERGED_TR_DELTA in Petsc; no further documentation available.");
return ret;
}
#endif
const std::string& SnesConvergenceReason<SNES_DIVERGED_FUNCTION_DOMAIN>::Explanation()
......
......@@ -115,8 +115,8 @@ namespace MoReFEM
};
template<>
# if PETSC_VERSION_LT(3, 12, 0)
template<>
struct SnesConvergenceReason<SNES_CONVERGED_TR_DELTA>
{
......@@ -126,6 +126,7 @@ namespace MoReFEM
static const std::string& Explanation();
};
# endif
template<>
......
......@@ -60,11 +60,13 @@ namespace MoReFEM
}
# if PETSC_VERSION_LT(3, 12, 0)
inline constexpr convergence_status SnesConvergenceReason<SNES_CONVERGED_TR_DELTA>
::GetConvergenceStatus() noexcept
{
return convergence_status::yes;
}
# endif
inline constexpr convergence_status SnesConvergenceReason<SNES_DIVERGED_FUNCTION_DOMAIN>
......
......@@ -410,8 +410,10 @@ namespace MoReFEM
return GetNonLinearConvergenceReasonHelper<SNES_CONVERGED_SNORM_RELATIVE>();
case SNES_CONVERGED_ITS:
return GetNonLinearConvergenceReasonHelper<SNES_CONVERGED_ITS>();
#if PETSC_VERSION_LT(3, 12, 0)
case SNES_CONVERGED_TR_DELTA:
return GetNonLinearConvergenceReasonHelper<SNES_CONVERGED_TR_DELTA>();
#endif
case SNES_DIVERGED_FUNCTION_DOMAIN:
return GetNonLinearConvergenceReasonHelper<SNES_DIVERGED_FUNCTION_DOMAIN>();
case SNES_DIVERGED_FUNCTION_COUNT:
......
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