Skip to content

Commit b0b1ed8

Browse files
authored
Merge pull request #3602 from BalticPinguin/master
Set operators also for unrestricted solve & without preconditioner.
2 parents b06cac1 + f2ddeeb commit b0b1ed8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/solvers/petsc_linear_solver.C

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,11 @@ PetscLinearSolver<T>::solve_base (SparseMatrix<T> * matrix,
632632
ierr = KSPSetOperators(_ksp, mat, const_cast<PetscMatrix<T> *>(precond)->mat());
633633
LIBMESH_CHKERR(ierr);
634634
}
635+
else
636+
{
637+
ierr = KSPSetOperators(_ksp, mat, mat);
638+
LIBMESH_CHKERR(ierr);
639+
}
635640

636641
if (this->_preconditioner)
637642
{

0 commit comments

Comments
 (0)