Expert eyes on benchmark upload (PFHub)

Hi FEniCS users,

I’m very new to FEniCS/Dolfin, and would appreciate feedback on a project I’m using to get up to speed.

The PFHub suite of benchmarks includes a problem based on the Cahn-Hilliard equation, very similar to the FEniCS Cahn-Hilliard example. I’ve heavily modified that code and prepared an upload. The results “look right,” but the runtime is rather long (11 days on one node). I’m curious, in my naive port of a basic example code, which obvious opportunities for speedup/optimization I’ve missed out on. I did attempt to implement an adaptive time-stepper, increasing dt if fewer than 5 iterations were needed and decreasing otherwise, but got garbage results. I’m also not sure to what extent the polynomial degree should be increased from 1, and when it’s a good idea to leave it alone? Again, I’m very new to FEM.

Please take a look at the repository. Suggestions & critiques are welcome (to a point).

Thanks!

The adaptive time stepping methods I’ve seen for phase-field models in the literature are based on an accuracy criterion rather than ease of nonlinear convergence (although there may be some correlation). You might take a look at the scheme in Algorithm 1 of this paper, which refines/coarsens in time based on comparison of a second-order time integrator’s solution with the backward Euler solution. In the results from the linked paper, the time step ends up varying over several orders of magnitude, so the adaptive scheme is much faster than a uniform worst-case time step.

1 Like