mesh-adaptation / goalie

Goal-oriented error estimation and mesh adaptation for finite element problems solved using Firedrake
Other
2 stars 0 forks source link

Run solve_forward after fixed_point_iteration? #138

Closed ddundo closed 6 months ago

ddundo commented 6 months ago

When we do solutions = mesh_seq.fixed_point_iteration(adaptor), the solutions data are those computed on meshes from second-to-last iteration. I suppose when the meshes have converged that it's not so important, but in general we would want to have the solutions on final meshes (presumably final mesh = best mesh).

Doing another forward solve would require updating the solutions FunctionSpaces via a private method, i.e.

mesh_seq.fixed_point_iteration(adaptor)
mesh_seq._create_solutions()
mesh_seq.solve_forward()

Easy solution is to put _create_solutions inside solve_forward rather than calling it within fixed_point_iteration.