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

Christophe Ortiz christophe.ortiz at ciemat.es
Tue Oct 22 04:16:39 CDT 2013


Hi Jed,

I added a third specie to my problem (step by step :-)).

Now my system is the following:

u_t - alpha u_xx +(k.u.v - q.w) = 0
v_t - beta v_xx +(k.u.v - q.w) = 0
w_t -(k.u.v - q.w) = 0


So I have 2 PDEs and 1 ODE. I put everything under IFunction and IJacobian.
For the PDEs I defined Dirichlet boundary conditions.

For this simple system, I have lot of problems, it does not converge.

I followed your suggestions and I removed any options from the code, and
put TSSetFromOptions(); at the end.
The default options are thus SNESNEWTONLS, KSPGMRES, LineSearch bt, ARKIMEX
3.

I obtain the following output:

      TSAdapt 'basic': step 101 accepted t=1.07438    + 3.223e-01 wlte=
 0 family='arkimex' scheme=0:'3' dt=4.190e-01
      TSAdapt 'basic': step 102 accepted t=1.39669    + 4.190e-01
wlte=5.21e-13 family='arkimex' scheme=0:'3' dt=5.447e-01
      TSAdapt 'basic': step 103 accepted t=1.8157     + 5.447e-01
wlte=1.64e-13 family='arkimex' scheme=0:'3' dt=7.081e-01
      TSAdapt 'basic': step 104 accepted t=2.36041    + 7.081e-01
wlte=5.62e-14 family='arkimex' scheme=0:'3' dt=9.206e-01
      TSAdapt 'basic': step 105 stage rejected t=3.06853    + 9.206e-01, 1
failures exceeds current TS allowed
[0]PETSC ERROR: --------------------- Error Message
------------------------------------
[0]PETSC ERROR:   !
[0]PETSC ERROR: TSStep has failed due to DIVERGED_NONLINEAR_SOLVE, increase
-ts_max_snes_failures or make negative to attempt recovery!



ThenI increase the max number of failures. When I do so, I get the
following error message:

      TSAdapt 'basic': step 101 accepted t=1.07438    + 3.223e-01 wlte=
 0 family='arkimex' scheme=0:'3' dt=4.190e-01
      TSAdapt 'basic': step 102 accepted t=1.39669    + 4.190e-01
wlte=5.21e-13 family='arkimex' scheme=0:'3' dt=5.447e-01
      TSAdapt 'basic': step 103 accepted t=1.8157     + 5.447e-01
wlte=1.64e-13 family='arkimex' scheme=0:'3' dt=7.081e-01
      TSAdapt 'basic': step 104 accepted t=2.36041    + 7.081e-01
wlte=5.62e-14 family='arkimex' scheme=0:'3' dt=9.206e-01
      TSAdapt 'basic': step 105 stage rejected t=3.06853    + 9.206e-01
retrying with dt=2.301e-01
      TSAdapt 'basic': step 105 stage rejected t=3.06853    + 2.301e-01
retrying with dt=5.753e-02
      TSAdapt 'basic': step 105 stage rejected t=3.06853    + 5.753e-02
retrying with dt=1.438e-02
      TSAdapt 'basic': step 105 stage rejected t=3.06853    + 1.438e-02
retrying with dt=3.596e-03
      TSAdapt 'basic': step 105 stage rejected t=3.06853    + 3.596e-03
retrying with dt=8.990e-04
      TSAdapt 'basic': step 105 stage rejected t=3.06853    + 8.990e-04
retrying with dt=2.247e-04
      TSAdapt 'basic': step 105 stage rejected t=3.06853    + 2.247e-04
retrying with dt=5.619e-05
      TSAdapt 'basic': step 105 stage rejected t=3.06853    + 5.619e-05
retrying with dt=1.405e-05

...
...
      TSAdapt 'basic': step 105 stage rejected t=3.06853    +5.679e-179
retrying with dt=1.420e-179
      TSAdapt 'basic': step 105 stage rejected t=3.06853    +1.420e-179
retrying with dt=3.550e-180
      TSAdapt 'basic': step 105 stage rejected t=3.06853    +3.550e-180
retrying with dt=8.874e-181
[0]PETSC ERROR: --------------------- Error Message
------------------------------------
[0]PETSC ERROR: Floating point exception!
[0]PETSC ERROR: Vec entry at local location 15 is not-a-number or infinite
at end of function: Parameter number 3!

It seems it is not able to recover, it decreases the timestep so much that
at the end you are left with something that it not a number, or 0.

Any idea how to solve that ?
Some time ago you told me it could be due to a problem associated with DAE
formulation for boundary conditions and methods with explicit stages:

*Is your problem similar to ex25?  (If I remember
correctly, that example uses a DAE formulation for boundary conditions
and thus has trouble with some methods with explicit stages.  There may
be more going on.)*
*
*
How can I reformulate my problem so I do not use DAE formulation for
boundary conditions ? For instance, if I want u=u* at i=0, or Neumann (or
Robin) boundary conditions ?
If due to method with explicit stages, which method do you recommend ? I
tried the FullyImplicit option for ARKIMEX, and it's even worse, it gets
slower.

Thanks a lot in advance for your help.
Christophe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20131022/617177c6/attachment.html>


More information about the petsc-users mailing list