[petsc-users] SNESSetFunctionDomainError
Derek Gaston
friedmud at gmail.com
Sun Aug 24 21:06:05 CDT 2014
There must be something I'm missing about SNESSetFunctionDomainError().
I'm using a matrix free newton solve and I was hoping that calling
SNESSetFunctionDomainError() would completely stop the nonlinear solver...
but that doesn't appear to be the case.
Now - if I call that function during the initial residual computation it
appears to work (the solve never starts). However, if I call it during the
_middle_ of a matrix free nonlinear solve during a residual calculation -
it appears to do absolutely nothing.
Here's my stupid debugging code that's at the top of my residual callback
method:
static int count = 0;
count++;
if (count == 5)
{
std::cout<<"stopping solve!"<<std::endl;
SNESSetFunctionDomainError(snes);
}
During the solve "stopping solve!" gets printed out after computing the 3rd
linear iteration of the first newton step... but the solve just continues
without stopping...
Is there something more I need to do here?
Thanks!
Derek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140824/eab10a38/attachment.html>
More information about the petsc-users
mailing list