-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support averaging operators (fixes #107) #158
Conversation
This does the wrong thing for |
e743fe1
to
ba0c436
Compare
Compute the volume by summing the quadrature weights.
Done by just integrating the averaged expression over the relevant entity.
ba0c436
to
7ab8043
Compare
Think I fixed it, the XXX average is |
For affine-transformed cell, yes. For bendy cells each infinitesimal reference cell volume contributes differently to physical volume... Not sure which case is Q1 cell. |
I don't think so. Here's my reasoning. For a function Now consider integrating This is Now I pull back to reference space:
and I think the only thing I assumed here was that averaging commutes will pullback. Does this make sense? |
Also gets around a bug (?) in the optimisation step.
This is still totally borked. Promotes bugs in tsfc optimisation passes (possibly I'm doing something wrong). Or doesn't work at all. |
I don't think that the assumption is correct. We have
This is clearly not equal to
unless |
Thanks. I've come to that conclusion too. The latest commits do this "right", but still have issues elsewise. So I'm holding off any merging for now. |
I like that you could implement this in such a small diff. |
* avg-not-terminal: Pass correct argument multiindices Nearly done. WIP: and facet_avg in the same way WIP: do cell_avg properly Support averaging operators (fixes #107) Support ReferenceFacetVolume on non-simplex cells
Done by just integrating the averaged expression over the relevant
entity.
Needs a matching UFL merge.