<div dir="ltr">Hi Barry,<div><br></div><div>Thanks for the reply.</div><div><br></div><div>I had a look at the example ex10.c. But I see it does not fully corresponds to what one can see in the branch. For instance, in the example that is found in the tutorials, there is no RHS defined, no Jacobian, just the IFunction.</div>
<div><br></div><div>Could you please send me the latest version of ex10.c ? Many thanks in advance.</div><div><br></div><div>Christophe</div></div><div class="gmail_extra"><br clear="all"><div>CIEMAT<br>Laboratorio Nacional de Fusión por Confinamiento Magnético<br>
Unidad de Materiales<div>Edificio 2 - Planta 0 - Despacho 28m<br>Avenida Complutense 40,<br>28040 Madrid, Spain<br>Tel: +34 91496 2582<br>Fax: +34 91346 6442<br><br>--<br><span style="color:rgb(0,128,0);font-family:Webdings;font-size:x-large">Q</span> <div>
<span style="background-color:rgb(255,255,255);white-space:pre-wrap">Por favor, piense en el medio ambiente antes de imprimir este mensaje.</span><div><span style="white-space:pre-wrap">Please consider the environment before printing this email.</span></div>
</div></div></div>
<br><br><div class="gmail_quote">On Mon, Oct 7, 2013 at 2:00 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Chris,<br>
<br>
Take a look in the petsc branch barry/wirth-fusion-materials <a href="https://bitbucket.org/petsc/petsc/branch/barry%2Fwirth-fusion-materials" target="_blank">https://bitbucket.org/petsc/petsc/branch/barry%2Fwirth-fusion-materials</a><br>
in the file src/ts/examples/tutorials/advection-diffusion-reaction/ex10.c feel free to ask any questions.<br>
<span class="HOEnZb"><font color="#888888"><br>
Barry<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Oct 7, 2013, at 3:03 AM, Christophe Ortiz <<a href="mailto:christophe.ortiz@ciemat.es">christophe.ortiz@ciemat.es</a>> wrote:<br>
<br>
> Hi all<br>
><br>
> I need some suggestions to design a code with PETSc.<br>
><br>
> I want to solve a 1D problem composed of several diffusion equations and a lot of ODEs (thousands).<br>
><br>
> - After discretization, the diffusion equations have terms in i-1, i and i+1.<br>
><br>
> - The diffusion equations have additional terms due to couping with all the ODEs. These terms are non-linear.<br>
><br>
> - The terms of the ODEs are local (only depend on node i) but are non-linear.<br>
><br>
> Any advice to design the code ?<br>
><br>
> How should I distribute the terms between IFunction and RHSFunction ?<br>
><br>
> Any special attention to DMDA ? Should I declare just one DMDA with dof >>1 ?<br>
><br>
> Many thanks in advance !<br>
> Christophe<br>
><br>
<br>
</div></div></blockquote></div><br></div>