-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Fix facet and cell averages #501
Conversation
Substitution |
Im then not sure what a cell_avg should be. As far as I can tell this is what they do in tsfc (firedrakeproject/tsfc#158) I see that this is wrong for DG 0. I guess what we actually want is @michalhabera do we support such operations in ffcx? |
Yes, the correct implementation of entity averages requires an integral within integral. Unfortunately, FFCx is not flexible enough for this at the moment.
This should become easier once we have separate codepaths for handling of expressions (integrands) and their evaluation at quadrature points to represent integrals. This is a longer standing refactoring issue.
… On 25. Jun 2022, at 09:47, Jørgen Schartum Dokken ***@***.***> wrote:
Substitution CellAvg(u) --> u / CellVolume does not look correct to me, these things have also different units (u-units vs. u-units/volume). And it is also wrong for constant functions, since CellAvg(u) = u for u in DG0.
Im then not sure what a cell_avg should be. As far as I can tell this is what they do in tsfc (firedrakeproject/tsfc#158)
I see that this is wrong for DG 0. I guess what we actually want is cell_avg(var)*dx->(var/CellVolume*dx)*dx
@michalhabera do we support such operations in ffcx?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.
|
TSFC implements |
Currently we do not support
FacetAvg
orCellAvg
in ufl forms, as the following mwe illustrates:This is due to: https://bitbucket.org/fenics-project/ufl/pull-requests/89
which never got fixed in old DOLFIN.