[petsc-dev] Matrix Manipulation Question

Matthew Knepley knepley at gmail.com
Tue Apr 11 12:34:02 CDT 2023


I want to modify the Jacobian inside an IJacobian call. Right now I just
have

  TSComputeIJacobian(ts, ..., A, B, ...)

but I want to do

  TSComputeIJacobian(ts, ..., A0, B, ...)
  MatCreateLRC(A0, U, NULL, V, &A)

However, the MatCreateLRC() needs a Mat *, so what I really want is to do
something like

  TSComputeIJacobian(ts, ..., A, B, ...)
  MatCreateLRC(A, U, NULL, V, &Anew)
  <copy implementation of Anew into A>

Isn't there a function for this?

  Thanks,

     Matt

-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20230411/afc96932/attachment.html>


More information about the petsc-dev mailing list