Dmitry Karpeyev <karpeev@mcs.anl.gov> writes:I would say that EW3 should call VecNorm() on the first iteration. Vecs
> Yes. How should EW version 3 be implemented then? Currently EW3
> piggybacks on snes->ttol to get a measure of the initial norm of the
> residual, and relies on it having been set elsewhere. If no
> references to snes->ttol in SNESKSPEW_PreSolve() are allowed, what
> should take its place?
cache their norms internally so this will only do one reduction, even if
the SNES convergence test calls VecNorm() itself.
Well, snes->norm_init is currently serving a different purpose, but it's
> I was just thinking of a single cache for the initial residual norm.
> Currently there are at least two, it seems to me.
not entirely clear that it needs to be set. In particular, do we ever
compute a norm using a side channel rather than by calling VecNorm,
possibly followed by VecCopy? If not, isn't calling
SNESSetInitialFunction enough? SNES can just call VecNorm on F and
it'll use the cached value if it was set.