Hi all

I need some suggestions to design a code with PETSc.

I want to solve a 1D problem composed of several diffusion equations and a
lot of ODEs (thousands).

- After discretization, the diffusion equations have terms in i-1, i and
i+1.

- The diffusion equations have additional terms due to couping with all the
ODEs. These terms are non-linear.

- The terms of the ODEs are local (only depend on node i) but are
non-linear.

Any advice to design the code ?

How should I distribute the terms between IFunction and RHSFunction ?

Any special attention to DMDA ? Should I declare just one DMDA with dof >>1
?

Many thanks in advance !
Christophe

Reply via email to