[petsc-users] Modifying an SNES/DM Jacobian
Richard Katz
richard.katz at earth.ox.ac.uk
Fri Jun 13 03:34:21 CDT 2025
Hi all,
I am solving PDEs on a 1-D domain with a physical length that varies with time as a part of the solution. By change of variables, the discretised space coordinate is in [0,1]. This introduces a coupling between the time-dependent physical domain size and the PDEs.
I would like to include the domain-size variable as a DOF in my SNES solve, and this can be accommodated as one of the DM-defined DOFs. However, doing so couples this particular DOF beyond the stencil, to DOFs throughout the domain. So I would like to modify the auto-generated Jacobian to include non-zeros that capture this coupling (via finite differences).
For the moment, I am not concerned about breaking the parallelism of the code.
Any advice on the approach and PETSc functions that would be best suited would be appreciated.
Thanks,
Richard
___________________________
Richard Foa Katz
Professor of Geodynamics
Dept Earth Sciences, Univ Oxford
https://urldefense.us/v3/__http://foalab.earth.ox.ac.uk__;!!G_uCfscf7eWS!b_oizbw-XnXax6rasRGtsC_i3pUtzbYYkWhRQifVKLUsOk-SsyuNX4kFQfNq7mrf4hiQxhTOt7sa1y3C7LIW-yAqSN0y-aIoV9k$
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20250613/a4b12860/attachment.html>
More information about the petsc-users
mailing list