On Wed, Jul 18, 2018 at 1:31 PM David Knezevic <[email protected]>
wrote:
> I'm using SNES for a finite element contact solve, in which the sparsity
> pattern of the jacobian can change from one Newton iteration to the next
> (since the nodes on the contact surface move).
>
> In order to handle this I figured the best way would be to destroy the
> jacobian matrix and re-allocate it with a new sparsity pattern inside each
> call to FormJacobian, does that seem like a reasonable approach in this
> context?
>
Yes.
> Also, I recall from an earlier discussion that this matrix re-allocation
> inside FormJacobian is supported by SNES, but I just wanted to confirm that?
>
Yes.
> Also, I was wondering if there is any example where the matrix is
> re-allocated inside SNES iterations so that I can make sure that I do it
> correctly?
>
No, unfortunately. Contributions always welcome :)
Thanks,
Matt
> Best regards,
> David
>
--
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.caam.rice.edu/~mk51/>