[petsc-users] Suggestions for code with dof >> 1 ?

Jed Brown jedbrown at mcs.anl.gov
Wed Oct 23 09:52:58 CDT 2013


Christophe Ortiz <christophe.ortiz at ciemat.es> writes:
> I finally found what was wrong. I used -mat_view to check each element of
> the Jacobian. The structure was ok but there was some unexpected values.
> Then I checked my code and found a mistake while assigning values to some
> array (the diagonal block). It was cumulating values during the loop for
> (row i) {}. Now, at the beginning of the loop I use PetscMemzero(array) to
> reset the array.
>
> Now it works much better with 1bee and linesearch bt. It converges quickly
> to large times in few timesteps.

That's reassuring to hear, thanks.

> Nevertheless...I still observe some problem, some oscillations in the
> solution, but in some extreme cases. It occurs with the following system,
> when q is very large:
>
> u_t - alpha u_xx + (k.u.v - q.w) = 0
> v_t - alpha v_xx + (k.u.v - q.w) = 0
> w_t - (k.u.v - q.w) = 0
>
> I guess the problem becomes stiff.

Does a shorter time step fix the oscillations?  Is this with
-ts_arkimex_type 1bee or something else?

Can you try -ts_arkimex_fully_implicit and add -snes_mf_operator if
necessary to get SNES to converge?  (I'm assuming you have used an IMEX
formulation here, but perhaps you already use fully implicit?)

> I tried assuming that the reaction is in steady state (w_t=0) and modifying
> the IJacobian accordingly, but it did not work.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20131023/fea45aba/attachment.pgp>


More information about the petsc-users mailing list