[petsc-users] Modifying Jacobian and Preconditioner in a Loop

Kevin Mattalo mattalo.k at gmail.com
Tue Jan 8 13:25:57 CST 2019


Hello,

I am currently solving a large linear system using a discontinuous Galerkin
approach with an inexact Newton method. I begin with a small time step and
then ramp up the time step every m outer iterations. I lag the update of
both by a certain integer multiple to improve efficiency. Because of this,
my Jacobian and therefore the preconditioner need to be modified,
reassembled, and updated in a loop. Right now, for each update I zero the
entries in my Jacobian, compute the entries, assemble the matrix, reset my
operators using KSPSetOperators() and then call KSPGetPC and KSPSetUp() to
get the new preconditioner.

Is there a more efficient way to continuously update the Jacobian?

Kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190108/d16b8ffb/attachment.html>


More information about the petsc-users mailing list