Adaptive solver is not working in dolfin

Dear groups,

Hi I’m working on applying the adaptive mesh generation to solve phasefield method. To handle this, what I need is the adaptive mesh generation.

To solve this problem, I have looked at several posts.

But this refine method only for dividing meshes not for coarsening and only with refining, the number of elements be calculated only increases in the case of transient state.
Thus I want to use the “AdaptiveLinearVariationalSolver” which is implemented in FEniCS to adjust the number of elements.

I just want to follow the following example and I got this error message. ( 1. Auto adaptive Poisson equation — FEniCS Project

*** -------------------------------------------------------------------------
*** DOLFIN encountered an error. If you are not able to resolve this issue
*** using the information listed below, you can ask for help at
***
***     fenics-support@googlegroups.com
***
*** Remember to include the error message listed below and, if possible,
*** include a *minimal* running example to reproduce the error.
***
*** -------------------------------------------------------------------------
*** Error:   Unable to perform operation in parallel.
*** Reason:  Extrapolation of functions is not yet working in parallel.
***          Consider filing a bug report at https://bitbucket.org/fenics-project/dolfin/issues.
*** Where:   This error was encountered inside log.cpp.
*** Process: 34
*** 
*** DOLFIN version: 2019.1.0
*** Git changeset:  74d7efe1e84d65e9433fd96c50f1d278fa3e3f3f
*** -------------------------------------------------------------------------

Can you give me a help? I also found that there was the same problem with me, but I have no idea what I have to do… (fenics.AdaptiveNonlinearVariationalSolver doesn't work in parallel · Issue #48 · geo-fluid-dynamics/phaseflow-fenics · GitHub)

Do I have to update my dolfin? It is 2019.1.0.

Thanks in advance.

The error message is quite clear. The auto-adaptive solver does not work in parallel.
As dolfin is no longer developed, it is not likely to be fixed there.
https://bitbucket.org/fenics-project/dolfin/src/1c52e837eb54cc34627f90bde254be4aa8a2ae17/dolfin/adaptivity/Extrapolation.cpp?at=master#lines-48

Please note The new DOLFINx solver is now recommended over DOLFIN

For adaptive mesh refinement in DOLFINx, see for instance: https://www.sciencedirect.com/science/article/abs/pii/S0898122122004722

Dear dokken,

Is there any way that I could implement the extrapolation method while using the AdaptiveLinearVariationalSolver using the “PETScDMCollection.create_transfer_matrix” or “LagrangeInterpolator.interpolate” functions?

I will move on to the dolfinx later, but right now, I want to use dolfin if it is possible.

Thanks for your reply!

I have never used the AdaptiveLinearSolver, so I cannot give a precise answer on this. You might be able to modify the code (in C++) to make this work.

Dear dokken,

Okay, then I might need to have a look at this.

Thanks for your help sir! Have a nice day!