Open ddundo opened 2 weeks ago
Yeah I agree we can get rid of it.
@ddundo - if you yield {'<field>': F}
from the solver and pass it through the _solve_adjoint
function to indicate_errors
, you probably don't need a new method? - just catch and release of the yielded variable.
Thanks @acse-ej321! Yeah, in the above comment I suggested either yielding it or adding some method like MeshSeq.set_form()
. I think both are fine and it's just a matter of taste maybe. I think I'd prefer the method option because there's not really a reason to yield the form at every timestep, since
_solve_adjoint
code tidier (as it's already quite long)For the same reason I didn't do yield field
but rather read them from MeshSeq.fields
, where they're automatically updated.
But yeah, not sure what's best! I'll open a PR and then it will be easier to discuss :)
Originally posted by @ddundo in https://github.com/mesh-adaptation/goalie/issues/73#issuecomment-2416145455
This would also simplify user code. What do you think @jwallwork23?