inducer / grudge

Grand Unified Discontinuous Galerkin Environment? A DG code in training.
12 stars 17 forks source link

Interface for LGL mass lumping? #348

Open inducer opened 3 months ago

inducer commented 3 months ago

See #344 for context. Diagonal mass matrices on LGL points are a common approximation. I'm thinking they should not be the default behavior, since they're not exact, and exact evaluation is totally doable (if more expensive). (Do we agree on that?) Hence we need permission from the user to use lumping. How should that permission be given?

cc @MTCam @a-alveyblanc @alexfikl @lukeolson @majosm @anderson2981

MTCam commented 3 months ago

I probably don't have a full appreciation of the nuance here. I think per volume per group might be the best option. This mapping from vol/group -> lumping would be set up at dcoll creation, right? Still fire-and-forget, but versatile enough to support varied options per vol and group.

alexfikl commented 3 months ago

Once for the whole DiscretizationCollection? (i.e. as a flag living on that) Once per (volume) element group? (and likely inherited by corresponding surface groups?)

I'm not quite sure how much flexibility is required here. Is using some groups with lumping and some without something that could be useful in practice? Maybe in some multi-volume case?

Shouldn't be too hard to teach tensor product element groups and factories about lumping though, so maybe that's a good place to put it.

Per-operation?

Generally not a big fan, since anything wrapping the operation will also need to pass the flag around.

a-alveyblanc commented 3 months ago

I'm thinking they should not be the default behavior, since they're not exact

100% agree here.

Once per (volume) element group? (and likely inherited by corresponding surface groups?)

I think this makes the most sense given the context.