Commit 7344d70e authored by Kilian Lackhove's avatar Kilian Lackhove
Browse files

PETSc: print error if diverged

parent bac2bd57
......@@ -170,6 +170,13 @@ namespace Nektar
// Do system solve
KSPSolve(m_ksp, m_b, m_x);
KSPConvergedReason reason;
KSPGetConvergedReason(m_ksp, &reason);
ASSERTL0(reason > 0,
"PETSc solver diverged, reason is: " +
// Scatter results to local vector
VecScatterBegin(m_ctx, m_x, m_locVec,
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