[petsc-dev] Separate operators for jacobian and preconditioner matrix on coarse MG levels
Lawrence Mitchell
lawrence.mitchell at imperial.ac.uk
Mon Mar 2 05:26:25 CST 2015
On 24 Feb 2015, at 19:27, Matthew Knepley <knepley at gmail.com> wrote:
> That is what happens. It does check for snes->jacobian, but that would not
> be
> set on coarse levels anyway. I think we should have an option that makes
> SNESSetUpMatrices() create two matrices.
In the general case, snes->jacobian and snes->jacobian_pre will have different sparsity, but if I just call back to DMCreateMatrix twice I won't know which one to make. One way to fix this would be for DMCreateMatrix to have the option of creating two matrices at once:
DMCreateMatrix(dm, Mat *mat, Mat *pmat)
One could then call
DMSetCreateMatricesSeparately(PETSC_TRUE)
(better names much appreciated).
to indicate that one wants separate matrices for the jacobian and its pmat.
Thoughts?
Lawrence
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20150302/86c2157c/attachment.sig>
More information about the petsc-dev
mailing list