Guarantee that SNES function is called before SNES jacobian in multilevel solvers
The assumption everywhere in PETSc is that SNESComputeFunction
is always called
before SNESComputeJacobian
at a given linearization point.
This is particularly important for TS
(first class SNES
user) and all its subtypes that have special treatment
for method specific quantities that need to be sampled at coarser levels of a multilevel solver.
Note that this adds extra coarse function evaluations only during linear solves, since nonlinear solvers (like SNESFAS
)
call SNESSolve
directly at each level.
Edited by Stefano Zampini