mesh-adaptation / goalie

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

Introduce `SolutionData` and `IndicatorData` classes #114

Closed jwallwork23 closed 4 months ago

jwallwork23 commented 4 months ago

Partially addresses #26.

[Putting all of you as reviewers mainly to make you aware I finally got round to this.]

This PR introduces SolutionData and IndicatorData classes which should fit seamlessly with the current API. They have a common base class, so we avoid duplication in how the nested dictionaries and arrays are set up.

Once this is merged, I'll open two follow-up PRs:

ddundo commented 4 months ago

Thanks for this @jwallwork23! I took a quick look now and am thinking about two things:

  1. This doesn't seem to take into account whether the field is steady or unsteady (https://github.com/pyroteus/pyroteus/pull/160) - in particular, what if we have a combination of them
  2. Would be nice to think about this Stephan's comment in Issue #55

Have you considered these?

jwallwork23 commented 4 months ago

Excellent point @ddundo, thanks. I think commit https://github.com/pyroteus/goalie/pull/114/commits/24502e2610dee8d7a217aca86ac2573b2fbad398 should address this concern by considering the field type inside the FunctionData class rather than outside.

ddundo commented 4 months ago

Thanks @jwallwork23, looks great :)