[petsc-users] SNESSetConvergenceTest usage?

William Coirier William.Coirier at kratosdefense.com
Wed Oct 7 17:12:13 CDT 2015


Without going into too many details regarding the application, here is a problem I've encountered and wonder if anyone has any suggestions.

I have supplied a convergence test function for SNES using the SNESSetConvergenceTest API. My convergence test function sets the SNESConvergedReason variable referenced in the argument list to a handful of SNESConvergedReasons (and does other stuff, but that is not relevant...)

In my application code, after I call SNESSolve, I call SNESGetConvergedReason, and for some reason I will occasionally see SNESConvergedReasons that are NOT in the subset of those I supply with my convergence test function.

It's as if my test function setting of the converged reason is either being overwritten, or ignored.

As an example, I'm using the newtonls (default) scheme, and (an inexact, but workable) Jacobian. My test function only will set SNESConvergedReason to SNES_CONVERGED_ITERATING, SNES_CONVERGED_SNORM_RELATIVE or SNES_DIVERGED_MAX_IT. But, I see DIVERGED_LINE_SEARCH from the call to SNESGetConvergedReason.

Is the line search diverging (most likely?!) and blowing by my convergence test function?? Maybe (most likely?) I'm doing something stupid...

Otherwise things are working great. PETSc is awesome!

Any help/suggestions/input is appreciated.


-----------------------------------------------------------------------
William J. Coirier, Ph.D.
Director, Aerosciences and Engineering Analysis
Advanced Technology Division
Kratos/Digital Fusion, Inc.
4904 Research Drive
Huntsville, AL 35805
256-327-8170
256-327-8120 (fax)


 --------------------------------------------------------------------------------------------------------------------

***NOTICE*** This e-mail and/or the attached documents may contain technical data within the definition of the International Traffic in Arms Regulations and/or Export Administration Regulations, and are subject to the export control laws of the U.S. Government. Transfer of this data by any means to a foreign person, whether in the United States or abroad, without an export license or other approval from the U.S. Department of State or Commerce, as applicable, is prohibited. No portion of this e-mail or its attachment(s) may be reproduced without written consent of Kratos Defense & Security Solutions, Inc. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity. The information contained in this message and or attachments is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you are not the intended recipient or believe that you may have received this document in error, please notify the sender and delete this e-mail and any attachments immediately.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20151007/eba1a226/attachment.html>


More information about the petsc-users mailing list