Skip to content

Commit 4004a24

Browse files
fdkongjwpeterson
authored andcommitted
Fixed petsc_linear_solver for PETSc-master
Refs #2029.
1 parent 4b10e9f commit 4004a24

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/solvers/petsc_linear_solver.C

+6
Original file line numberDiff line numberDiff line change
@@ -1714,7 +1714,13 @@ LinearConvergenceReason PetscLinearSolver<T>::get_converged_reason() const
17141714
case KSP_DIVERGED_INDEFINITE_MAT : return DIVERGED_INDEFINITE_MAT;
17151715
case KSP_CONVERGED_ITERATING : return CONVERGED_ITERATING;
17161716
#if !PETSC_VERSION_LESS_THAN(3,7,0)
1717+
// PETSc-3.7.0 to 3.10.x
1718+
#if PETSC_VERSION_LESS_THAN(3,11,0) && PETSC_VERSION_RELEASE
17171719
case KSP_DIVERGED_PCSETUP_FAILED : return DIVERGED_PCSETUP_FAILED;
1720+
// PETSc master and future PETSc
1721+
#else
1722+
case KSP_DIVERGED_PC_FAILED : return DIVERGED_PCSETUP_FAILED;
1723+
#endif
17181724
#endif
17191725
default :
17201726
libMesh::err << "Unknown convergence flag!" << std::endl;

0 commit comments

Comments
 (0)