fixed: gmres reset iterations is not the same as solver restarts

issue was inherited from old petsc code
This commit is contained in:
Arne Morten Kvarving 2017-01-06 13:14:49 +01:00
parent 9f37960e86
commit d380c1d36c

View File

@ -500,8 +500,8 @@ bool PETScMatrix::solve (const SystemVector& b, SystemVector& x, bool newLHS)
bool PETScMatrix::solve (const Vec& b, Vec& x, bool newLHS, bool knoll) bool PETScMatrix::solve (const Vec& b, Vec& x, bool newLHS, bool knoll)
{ {
// Reset linear solver // Reset linear solver
if (nLinSolves && solParams.getIntValue("gmres_restart_iterations")) if (nLinSolves && solParams.getIntValue("reset_solves"))
if (nLinSolves%solParams.getIntValue("gmres_restart_iterations") == 0) { if (nLinSolves%solParams.getIntValue("reset_solves") == 0) {
KSPDestroy(&ksp); KSPDestroy(&ksp);
KSPCreate(*adm.getCommunicator(),&ksp); KSPCreate(*adm.getCommunicator(),&ksp);
setParams = true; setParams = true;