[petsc-dev] DMGetMatrix --> DMGetMatrices?

Dmitry Karpeev karpeev at mcs.anl.gov
Fri Feb 10 15:59:54 CST 2012


On Fri, Feb 10, 2012 at 3:58 PM, Dmitry Karpeev <karpeev at mcs.anl.gov> wrote:

>
>
> On Fri, Feb 10, 2012 at 3:53 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
>
>> On Fri, Feb 10, 2012 at 15:50, Dmitry Karpeev <karpeev at mcs.anl.gov>wrote:
>>
>>> Why not simply allow DM to return two matrices as SNES and KSP would
>>> want anyway?
>>
>>
>> How do you specify the reduced stencil to use for the preconditioning
>> matrix? Maybe it wouldn't add too many more if statements to the current
>> code which is already polluted with them.
>>
>
> It seems to me that the sparsity pattern (and even the type of the
> matrices) is up to the particular DM type,
> so it is, in principle, opaque.  DMDA can control it by manipulating
> stencil width or widths, while FEM-oriented DM
> types (e.g., libMesh) could control it via the element type, etc. The
> generic DM interface doesn't have a way to specify
> the sparsity pattern. As it should be, in my opinion.
>

As a separate matter, however, should preallocated, but not assembled
matrices be able to be duplicated or copied?
As currently implemented, MatDuplicate() and MatCopy() will refuse to
operate on a matrix that is !assembled.

Dmitry.

>
> Dmitry.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120210/8b54d621/attachment.html>


More information about the petsc-dev mailing list