<div dir="ltr">Hi all
<div><br></div><div>I need some suggestions to design a code with PETSc.</div><div><br></div><div>I want to solve a 1D problem composed of several diffusion equations and a lot of ODEs (thousands).</div><div><br></div><div>
- After discretization, the diffusion equations have terms in i-1, i and i+1.</div><div><br></div><div>- The diffusion equations have additional terms due to couping with all the ODEs. These terms are non-linear.</div><div>
<br></div><div>- The terms of the ODEs are local (only depend on node i) but are non-linear.</div><div><br></div><div>Any advice to design the code ?</div><div><br></div><div>How should I distribute the terms between IFunction and RHSFunction ?</div>
<div><br></div><div>Any special attention to DMDA ? Should I declare just one DMDA with dof >>1 ?</div><div><br></div><div>Many thanks in advance !</div><div>Christophe</div><div><br></div></div>