Handling this at the KSP level (I actually think the Mat level is more
appropriate, since the operator, not the solver, knows its domain), we have
to fix MatMFFD, I would think. Yes, that thing has the concept of a
nonlinear function, but it doesn't have any clue about or access to a SNES.
I did, however, like the earlier idea of having the Vec itself carry a
"valid" flag. That's generic and useful enough, I think.

Dmitry.
On Aug 31, 2014 10:57 PM, "Jed Brown" <[email protected]> wrote:

> Derek Gaston <[email protected]> writes:
> > As a workaround I have tried returning various "diverged" statuses in my
> > linear and nonlinear convergence checks... but it still has a pesky
> problem
> > where there are a couple more residual evaluations at the "end" of the
> > nonlinear solve.
>
> I think this is something that we should fix.
>
> The SNESMF evaluator has access to the SNES and we could have the SNES
> refuse to re-evaluate if the diverged reason has already been set.
>
> Perhaps we can also mark the matrix as being invalid so that KSP_MatMult
> and friends could decide that KSP has failed.  Semantically, we are
> discovering that the Mat does not actually act in the full linear space,
> but in some subspace with inequalities.  Semantically, I would rather
> the KSP decide whether it makes sense to do further evaluations because
> in some cases, the domain violations could be handled gracefully.
>

Reply via email to