geodynamics / aspect

A parallel, extensible finite element code to simulate convection in both 2D and 3D models.
https://aspect.geodynamics.org/
Other
217 stars 232 forks source link

broken cookbooks/mantle_convection_with_continents_in_annulus/ #5882

Open tjhei opened 3 weeks ago

tjhei commented 3 weeks ago
  1. It creates 100,000 particles with uniform radial, which takes a very long time to initialize.
  2. It crashes after some time with
    
    Number of active cells: 14,778 (on 8 levels)
    Number of degrees of freedom: 334,801 (127,458+16,156+63,729+63,729+63,729)

*** Timestep 0: t=0 years, dt=0 years Solving temperature system... 0 iterations. Advecting particles... SIGFPE received SIGFPE received

tjhei commented 3 weeks ago

floating point exception also happens if I limit to 1000 particles.

jdannberg commented 3 weeks ago

I looked at the cookbook and made a few suggestions for how to improve it here: #5888. This still does not fix the SIGFPE that @tjhei reported.

There were a few things I was still confused about and that it would be great to fix:

jdannberg commented 3 weeks ago

With the following changes, I can reproduce the SIGFPE, but in a shorter time

-set Max nonlinear iterations               = 10
+set Max nonlinear iterations               = 1

   subsection Stokes solver parameters
     set Stokes solver type = block GMG
     set Number of cheap Stokes solver steps = 5000
-    set Linear solver tolerance = 1e-6
+    set Linear solver tolerance = 1
   end
 end

 subsection Mesh refinement
-  set Initial global refinement       = 3
-  set Initial adaptive refinement     = 4
+  set Initial global refinement       = 3
+  set Initial adaptive refinement     = 2
 end

Some additional information from the debugger: deal.II 9.5.2

particle location that triggers FPE: {-5792672.7454236215, 2180207.6403524871} and the particle is exactly on the vertex of a cell

This means for just this cookbook, we could probably avoid the FPE by either using 4 instead of 3 particles in the reference cell, or by using a different generator.

jdannberg commented 3 weeks ago

Can confirm it works with

set Number of particles per cell per direction = 4