[petsc-users] DMDA questions

Xiangdong epscodes at gmail.com
Fri Feb 28 15:16:20 CST 2014


If I assembly the matrix with MatSetValuesStencil and use KspSetOpreators
for Ksp, do I need to call KspSetDM first?

What is the key difference or advantage of using KspSetComputeOperators
against KspSetOperators?

Thanks you.

Xiangdong


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

> Xiangdong <epscodes at gmail.com> writes:
> > 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?
>
> src/ksp/ksp/examples/tutorials/ex25.c calls KSPSetDM and sets functions
> to assemble the matrices and right hand side.  Those objects are created
> internally (you can use -dm_mat_type sbaij if you like) and the user
> doesn't have to see them.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140228/a6fc2f85/attachment.html>


More information about the petsc-users mailing list