Adrian Croucher <[email protected]> writes:

> The reason I'm using NaNs is that John O'Sullivan asked on here some
> time ago about how to make a SNES abort when something goes wrong in
> the function evaluation (in our case, probably the solution going out
> of range of thermodynamic functions). The answer he got was you could
> put a NaN or Inf anywhere in the function vector to make the SNES return
> SNES_DIVERGED_FNORM_NAN.

SNESSetFunctionDomainError is the supported API for this purpose.

Attachment: signature.asc
Description: PGP signature

Reply via email to