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.

Reply via email to