mesh-adaptation / animate

Anisotropic mesh adaptation toolkit for Firedrake
MIT License
5 stars 0 forks source link

Time-dependent adaptation demo #55

Open jwallwork23 opened 7 months ago

jwallwork23 commented 7 months ago

Demonstrate metric-based mesh adaptation for a time-dependent PDE using an 'on-the-fly' approach.

ddundo commented 4 months ago

@jwallwork23, would this be equivalent to calling fixed_point_iteration with max_iter=1 and constructing the subinterval metric using only the first solution on that subinterval? And normalising the metric only in space, and not in space and time?

Edit: sorry, I realised that it's not... An 'on-the-fly' approach would require calling the adaptor function after solving each subinterval. So I think it's equivalent if we use mesh_seq.solve_forward() where the adaptor function is called within the solver at the beginning of the interval?

jwallwork23 commented 4 months ago

@jwallwork23, would this be equivalent to calling fixed_point_iteration with max_iter=1 and constructing the subinterval metric using only the first solution on that subinterval? And normalising the metric only in space, and not in space and time?

Note that this demo will not use Goalie at all. But if you think of it in terms of the Goalie approach then yes there is only one iteration. However, that is where the similarity to the current setup ends.

The metric (and hence the adapted mesh) for the first subinterval can only use data from the initial condition. For later subintervals, the metric (and hence adapted mesh) can use any data from previous timesteps and/or the current state. If anything, it would be the last solution on the previous subinterval rather than the first on the current subinterval, because we need the adapted mesh for the subinterval before we can do any solves.

Edit: sorry, I realised that it's not... An 'on-the-fly' approach would require calling the adaptor function after solving each subinterval. So I think it's equivalent if we use mesh_seq.solve_forward() where the adaptor function is called within the solver at the beginning of the interval?

That's right. An on-the-fly approach is quite different from a fixed-point iteration one. Note https://github.com/pyroteus/goalie/issues/88.

ddundo commented 4 months ago

Ah thanks, I missed that issue! This makes sense