- changed status to resolved
cell_avg/facet_avg on general expressions
The cell_avg
and facet_avg
operators are currently defined as being terminal modifiers. But I think this is insufficient for many cases. Consider cell_avg(x*x)
, on the single cell [0, 1]
. Unless I'm being dense, this should evaluate to 1/3 (\int_0^1 x*x dx).
But we can't get there if we can only compute averages of terminal quantities: cell_avg(x)*cell_avg(x) == 1/4
.
If it turns out I'm being dense, there are still issues in the form processing pipeline: it's easy to end up in situations where after compute_form_data
, cell_avg
is not applied to terminals (or modified terminals).
So I would propose making CellAvg
and FacetAvg
general (rather than just terminal) operators.
I think I know how to implement this in at least tsfc. I don't know how it would work in the other form compilers.
Thoughts?
Comments (1)
-
- Log in to comment
Fixed by 085616b79ffb8fa0b9cf20b682e9f2928a8c7b44 (and 0aa0de9ce223569bb194745cdaca9f1a7ff42390 in FFC).