mesh-adaptation / animate

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

Allow mass lumping in projection #95

Closed jwallwork23 closed 2 months ago

jwallwork23 commented 1 year ago

Mass lumping the mesh-to-mesh projection operator will allow us to bound the interpolator for P1 fields.

jwallwork23 commented 4 months ago

Blocked by #94.

ddundo commented 2 months ago

Thanks again for doing this @jwallwork23! Could you or @stephankramer please help me get some intuition for this? (We can also discuss it on the meeting, I just wanted to write it out)

I mentioned on the meeting today that I tried projecting from a 0.25km uniform mesh to itself, and computing the relative L2 error. I did that with and without lumping, with a scalar ($h$) and a vector ($u$) field - please see the figures below and their y-labels. I did the same with coarser resolution meshes, where I projected from them onto the 0.25km mesh.

Without lumping the error for the 0.25km mesh is flat at approx 1e-8 throughout the time interval, and a flat 1e-15 when I tried interpolating. But with lumping it's significantly larger. Is this purely due to the added numerical diffusion from lumping the mass matrix? It seems quite significant. Since it also varies in time (unlike interpolating and projection without lumping, where the error is flat), could you please help me understand when we'd expect this to be higher/lower?

Also, I guess that the error for the coarser resolution meshes is the same on the two figures because the 0.25km mesh is embedded? Could you please also help me understand again when I'd expect the projection to be more/less successful in the case of adapted meshes in the two cases (with and without lumping)?

uniform_proj uniform_projLump

jwallwork23 commented 2 months ago

Pushed some work in progress to the PR. I've got as far as applying the lumping, the next step is to make the projection minimally diffusive. See (Farrell et al. 2009, eq. 35):

To note the diffusive nature of this interpolant, consider interpolating from a mesh to itself. It is clear from Lemma 5 that the maximum is attained only if

$$ \int_\Omega\phi^kB\mathrm{d}V = \int\Omega \mathrm{max}q_A\phi^k_B\;\mathrm{d}V...$$