[petsc-users] ts behavior question

Gideon Simpson gideon.simpson at gmail.com
Mon Nov 11 19:00:32 CST 2019


I noticed that when I am solving a problem with the ts and I am *not* using
a da, if I want to use an implicit time stepping routine:
1. I have to explicitly provide the Jacobian
2. When I do provide the Jacobian, if I want to access the elements of x(t)
to construct f(t,x), I need to use a const PetscScalar and a
VecGetArrayRead to get it to work.
3.  My code works without declaring const when I'm using an explicit scheme.

In contrast, if I solve a problem using a da, my code works, I can use
implicit schemes without having to provide the Jacobian, and I don't have
to use const anywhere.

Can someone clarify what is expected/preferred?

-- 
gideon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20191111/034ef4d1/attachment.html>


More information about the petsc-users mailing list