While playing around with step-17 using PETSc solvers, I found that
via command line I could only control the preconditioners and not the
solvers. This seems like a major bug and is not in the philosophy of
what the PETSc solvers provide. Adding the KSPSetOptions remedies this
but I just wanted to know if there was a reason to ever not include
this or perhaps remove the call that existed previously.

If it was neither, please do add the patch below.

Thanks,
Vijay


Index: source/lac/petsc_solver.cc
===================================================================
--- source/lac/petsc_solver.cc  (revision 24823)
+++ source/lac/petsc_solver.cc  (working copy)
@@ -115,6 +115,11 @@

       }

+                                     // set the command line options provided
+                                     // by the user to override the defaults
+    ierr = KSPSetFromOptions (solver_data->ksp);
+    AssertThrow (ierr == 0, ExcPETScError(ierr));
+
                                      // then do the real work: set up solver
                                      // internal data and solve the
                                      // system.
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to