[petsc-users] Some questions about TS/examples/tutorials/ex13

Sajid Ali sajidsyed2021 at u.northwestern.edu
Sat Dec 22 12:17:18 CST 2018


Hi,

I have a few questions about ex13 from TS explaining how to solve the
following PDE in 2D :

u_t = uxx + uyy

1) Can I get a reference/explanation for how the RHSJacobian function is
derived ?

2) If the problem is linear, why is TSSetProblemType never set to TS_LINEAR?

3) Since this is just a 2D version of ex3, can't this be set up by only
providing a function for the evaluation for TSSetRHSJacobian with the
TSSetRHSFunction set to TSComputeRHSFunctionLinear ?

If this is the case and a matrix could be written that equivalently states
the problem as u_t = A(t)*u, then how would one make such a matrix A(t) ?
(In essence, what I'm asking is how does petsc define 2D vectors. Would
A(t) be the familiar block tridiagonal matrix ?)

4) In lines 153/154, why does the outer loop iterate over columns and the
inner loop iterate over rows? Does this again have something to do with how
petsc stores 2d vectors?

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/20181222/79bb24f7/attachment.html>


More information about the petsc-users mailing list