[petsc-users] Allocating memory for off-diagonal matrix blocks when using DMComposite

Jed Brown jed at jedbrown.org
Tue Sep 30 17:48:19 CDT 2014


Gautam Bisht <gbisht at lbl.gov> writes:

> Hi,
>
> The comment on line 419 of SNES ex 28.c
> <http://www.mcs.anl.gov/petsc/petsc-current/src/snes/examples/tutorials/ex28.c.html>
> says
> that the approach used in this example is not the best way to allocate
> off-diagonal blocks. Is there an example that shows a better way off
> allocating memory for off-diagonal matrix blocks when using DMComposite?

The problem is that the allocation interfaces specialize on the matrix
type.  Barry wrote a DMCompositeSetCoupling(), but there are no
examples.  This is something that PETSc needs to improve.  I have been
unsuccessful at conceiving a _simple_ yet flexible/extensible solution.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140930/258c3d6c/attachment.pgp>


More information about the petsc-users mailing list