mesh-adaptation / goalie

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

Always export final solution #118

Closed ddundo closed 4 months ago

ddundo commented 4 months ago

Closes #106

With this PR the final solution of each subinterval always gets exported, instead of the first one.

Also tagging @stephankramer and @acse-ej321 for awareness :)

ddundo commented 4 months ago

Ah sorry @jwallwork23, tunnel vision here! I was looking into adjoint.py now and I'm not sure I understand Line 369...

Shouldn't it be project(sols.adjoint[i + 1][0], sols.adjoint_next[i][j]) instead of project(sols.adjoint_next[i + 1][0], sols.adjoint_next[i][j])? That is, the adjoint_next on the final subinterval timestep is the adjoint on the first timestep in the next subinterval?

ddundo commented 4 months ago

This should be ready for a re-review now @jwallwork23 :)

I also made the change I mention in the above comment. It looked like a bug to me

ddundo commented 4 months ago

Thanks Joe! I did as you suggested and will merge :)