[petsc-dev] PetscOptionsGetViewer() problems with multiple usage on the same object but different options databases
Barry Smith
bsmith at petsc.dev
Sat Jan 21 15:34:15 CST 2023
If I run KSPSetFromOptions() on an options database that contains -ksp_view and then push another options database that does not contain -ksp_view and call KSPSetFromOptions() again it undoes the previous setting of that viewer. So -ksp_view is not used.
I think this is the wrong model, it should not turn off the previously set view just because it is not being set in the new call, since it was previously set in the KSP. I fear some PETSc function will need another argument to properly handle this; like another flag to PetscOptionsGetViewer().
Note this is for much more than KSP.
Thoughts?
More information about the petsc-dev
mailing list