[petsc-users] Example for solving system of pde with snes

Praveen C cpraveen at gmail.com
Sun Sep 10 07:29:26 CDT 2017


Hello Matt


> No. You want 2 DAs, 1 for evaluating residuals with s = 3, and one for
> making a Jacobian with s = 1. You give these
> two DAs to
>
> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/SNES/
> DMDASNESSetFunctionLocal.html
> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/SNES/
> DMDASNESSetJacobianLocal.html
>
> and I think it should work as you want. Its too bad we cannot handle this
> case with SNESSetDM() since it only takes
> a single DM and there is no way to specialize the Jacobian.
>
>
ok, I was on wrong track trying to use SNESSetFunction and SNESSetJacobian
which wouldnt have worked.

I still have some doubt. If

da0 --> for residual
da1 --> for jacobian

I still need to call SNESetDM. So here I pass da0 ? But then how will snes
know about da1 ?

Thanks
praveen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170910/4b81c285/attachment.html>


More information about the petsc-users mailing list