mesh-adaptation / goalie

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

Add private methods to extract solutions from tape #177

Open ddundo opened 2 months ago

ddundo commented 2 months ago

Currently solutions are extracted from tape within MeshSeq.solve_forward and AdjointMeshSeq.solve_adjoint. There is already an overlap between these two for extracting the forward solutions. With the addition of #153 (work in progress), these get more complex. Adding #88 (also WIP) would also further increase complexity.

I think we should tidy this up by extracting solutions within a private method. @jwallwork23 if you agree I'd be happy to take this on it's a short PR so I just went ahead with it before you replied :)

ddundo commented 2 weeks ago

Since MeshSeq.solve_forward no longer relies on taping, all relevant code is now only in goalie.adjoint and there are no duplicates. That being said, AdjointMeshSeq.solve_adjoint is still very long and complicated so we still might want to do this just to tidy up.