[petsc-users] Matrix-free use of TS

Matthew Knepley knepley at gmail.com
Tue Jun 20 12:30:37 CDT 2017


On Tue, Jun 20, 2017 at 12:17 PM, Praveen C <cpraveen at gmail.com> wrote:

> Dear all
>
> I am using TS in my code to solve 3-d compressible navier-stokes [1]. To
> use an implicit scheme, I will use matrix free approach. I want to
> implement my own preconditioner which is also matrix-free. Can you point
> out some existing examples that can help me in this ?
>

I do not think we have any. You should just need to create a MATSHELL for
the Jacobian, and then stick the input vector in a context
inside the FormIJacobian routine. Note also you will need to handle the
scaling for the derivative with respect to \dot u. You can do the PC
with PCSHELL. You can show us your code if it does not work.

  Thanks,

    Matt


> Thanks
> praveen
>
> [1] https://bitbucket.org/cpraveen/ug3
>



-- 
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

http://www.caam.rice.edu/~mk51/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170620/f3bf08c4/attachment.html>


More information about the petsc-users mailing list