[petsc-users] A number of questions about DMDA with SNES and Quasi-Newton methods

zakaryah . zakaryah at gmail.com
Fri Nov 3 10:59:41 CDT 2017


Hi - I think I managed to get this to work.  The second call to
FormCoupleLocations is actually pretty simple - it just has to set the
matrix values!  One thing that was hard to figure out was why line 168
calls  MatGetOwnershipRange
<http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatGetOwnershipRange.html#MatGetOwnershipRange>(*J,&__rstart,NULL)
instead of also getting the last row owned.  Anyway, I did that from within
FormCoupleLocations and it seems to work great!  I can try to clean things
up to contribute an example if it would be useful.  I'd probably either
replace the finite strain with infinitesimal, or go to 1D, because in my
code the Jacobian function is absurdly long and that could be distracting
from the main point to exemplify, which is setting up and preallocating the
fully coupled redundant field.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20171103/4fdbf279/attachment.html>


More information about the petsc-users mailing list