Skip to content

Commit

Permalink
Set operators also for unrestricted solve & without preconditioner.
Browse files Browse the repository at this point in the history
  • Loading branch information
BalticPinguin committed Jun 30, 2023
1 parent dc964ef commit f2ddeeb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/solvers/petsc_linear_solver.C
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,11 @@ PetscLinearSolver<T>::solve_base (SparseMatrix<T> * matrix,
ierr = KSPSetOperators(_ksp, mat, const_cast<PetscMatrix<T> *>(precond)->mat());
LIBMESH_CHKERR(ierr);
}
else
{
ierr = KSPSetOperators(_ksp, mat, mat);
LIBMESH_CHKERR(ierr);
}

if (this->_preconditioner)
{
Expand Down

0 comments on commit f2ddeeb

Please sign in to comment.