[petsc-users] standalone code
Jed Brown
jedbrown at mcs.anl.gov
Wed Jan 4 08:44:47 CST 2012
On Wed, Jan 4, 2012 at 08:35, Kharche, Sanjay <
Sanjay.Kharche at liverpool.ac.uk> wrote:
> After having worked through several examples, I am now looking for some
> example reaction-diffusion C code that uses PetSc and does an implicit
> solution for the PDE. Can you suggest something?
I take it you are interested in the time-dependent case. These two are good
places to start
src/ts/examples/tutorials/ex22.c - 1D advection-reaction
src/ts/examples/tutorials/ex25.c - 1D "Brusselator" reaction-diffusion
This example has more quirks, the physics is more complicated, and not all
the algorithmic combinations work.
src/ts/examples/tutorials/ex10.c - 1D non-equilibrium radiation-diffusion
with Saha ionization model
For 2D and 3D, there are other examples, either with different physics or
not time-dependent. But the code structure is the same regardless of the
dimension, so I recommend looking at the simple examples above (ex22 and
ex25).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120104/58cfb667/attachment-0001.htm>
More information about the petsc-users
mailing list