[petsc-dev] DMGetMatrix --> DMGetMatrices?

Dmitry Karpeev karpeev at mcs.anl.gov
Fri Feb 10 16:01:53 CST 2012


On Fri, Feb 10, 2012 at 3:59 PM, Matthew Knepley <knepley at gmail.com> wrote:

> 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.
>>
>
> This makes no sense to me unless the two matrices being returned have
> different sparsity patterns, and we have no
> good way for specifying that, or even a good rationale for doing it.
>

The rationale is that the preconditioning matrix can have a different
sparsity pattern.
L2 projection leads to a mass matrix, and the lumped mass matrix is a good
preconditioner.
It is not DM's job to specify the sparsity pattern -- it is up to a
particular implementation.

Dmitry.

>
>    Matt
>
>
>> Dmitry.
>>
>
>
>
> --
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120210/e1b52ffb/attachment.html>


More information about the petsc-dev mailing list