[petsc-users] Question about TSComputeRHSJacobianConstant

Sajid Ali sajidsyed2021 at u.northwestern.edu
Thu May 16 15:06:09 CDT 2019


Hi PETSc developers,

I have a question about TSComputeRHSJacobianConstant. If I create a TS (of
type linear) for a problem where the jacobian does not change with time
(set with the aforementioned option) and run it for different number of
time steps, why does the time it takes to evaluate the jacobian change (as
indicated by TSJacobianEval) ?

To clarify, I run with the example with different TSSetTimeStep, but the
same jacobian matrix. I see that the time spent in KSPSolve increases with
increasing number of steps (which is as expected as this is a KSPOnly SNES
solver). But surprisingly, the time spent in TSJacobianEval also increases
with decreasing time-step (or increasing number of steps).

For reference, I attach the log files for two cases which were run with
different time steps and the source code.

Thank You,
Sajid Ali
Applied Physics
Northwestern University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190516/492b8ef9/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ex_dmda.c
Type: application/octet-stream
Size: 13848 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190516/492b8ef9/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: out_50
Type: application/octet-stream
Size: 31472 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190516/492b8ef9/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: out_100
Type: application/octet-stream
Size: 32865 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190516/492b8ef9/attachment-0005.obj>


More information about the petsc-users mailing list