<div class="gmail_quote">On Wed, Jan 4, 2012 at 08:35, Kharche, Sanjay <span dir="ltr"><<a href="mailto:Sanjay.Kharche@liverpool.ac.uk">Sanjay.Kharche@liverpool.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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?</blockquote></div><br><div>I take it you are interested in the time-dependent case. These two are good places to start</div>
<div><br></div><div>src/ts/examples/tutorials/ex22.c - 1D advection-reaction</div><div>src/ts/examples/tutorials/ex25.c - 1D "Brusselator" reaction-diffusion</div><div><br></div><div>This example has more quirks, the physics is more complicated, and not all the algorithmic combinations work.</div>
<div><br></div><div>src/ts/examples/tutorials/ex10.c - 1D non-equilibrium radiation-diffusion with Saha ionization model</div><div><br></div><div><br></div><div>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).</div>