[petsc-users] DMDA questions

Xiangdong epscodes at gmail.com
Tue Feb 25 15:22:20 CST 2014


On Tue, Feb 25, 2014 at 4:12 PM, Jed Brown <jed at jedbrown.org> wrote:

> Xiangdong <epscodes at gmail.com> writes:
>
> > For the MatSetValuesStencil, should it always work in pair with
> > DMCreateMatrix?
>
> Yes, or MatSetStencil.
>
> > However, in some example, e.g., src/ksp/ksp/examples/tutorials/ex25.c,
> the
> > DMCreateMatrix is never called. Is it because KspSetComputeOperators is
> > used and DMCreateMatrix is called implicitly somewhere?
>
> No, it is just testing that certain functionality works even if the DM
> is not set.  If you have a DM, we recommend setting it.
>

I am not clear about this. In this example, where is the format declaration
(e.g.,mpiaij) of Mat jac? Why is this mat jac always distributed in
a compatible way as the DM vectors?

Thanks.

Xiangdong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140225/40115218/attachment.html>


More information about the petsc-users mailing list