Project functional to boundary of mesh

Hi, I am solving a PDE in Fenics with Dirichlet boundary conditions, and I would like to get the exact Neumann derivative.

What I want to do:

  • solve the same PDE, but with Neumann BCs instead
  • on a finer mesh, where the boundary need not to conform to the original mesh (say, a circle is being refined)
  • where the interior of the mesh has been deformed
  • and using solve(a==L, ...)

Assuming e.g. the equation inner(grad(u),grad(v))*dx + u*v*dx== f*v*dx , the way to go is I guess to handle dnuu = inner(grad(u),grad(v))*dx +u*v*dx- f*v*dx, where u is the original solution computed by Fenics. I can’t e.g. use this expression, as it won’t make sense after using ALE.move. A way is to assemble dnuu on the original mesh, and then retrieve a linear form on the boundary of the deformed mesh (since I need to use solve(a==L, ...), so that I can’t work with assembled matrices), but this seems complicated, especially when matching the non-conforming boundaries.

Do you see a better way? For instance, can one:

  • transfer the (apparently volumetric) form dnuu to the boundary mesh
  • and project this boundary functional to the non-conforming, refined, boundary mesh?