Allow passing a maximum degree quadrature to a measure#4989
Allow passing a maximum degree quadrature to a measure#4989JHopeCollins wants to merge 1 commit intomainfrom
Conversation
pbrubeck
left a comment
There was a problem hiding this comment.
We should also explain this in the manual
|
Just to make sure I don't mislead anyone: If you passed |
I don't know. The easiest thing to do is try and see what happens. |
Are you asking about the design we want? Basically we want the analogues to |
No, I was checking what will actually happen so I make sure I don't write the wrong thing in the manual!
Ok great, this is the main thing I wanted to check (and actually use myself). |
If you have a complicated or non-polynomial expression in a form then UFL may (rightly or wrongly) estimate a very high quadrature degree, then TSFC spits out the dreaded message:
tsfc: WARNING Estimated quadrature degree more than tenfold greater than any argument/coefficientYou can avoid this by telling TSFC exactly what quadrature degree to use with:
inner(expr, v)*dx(degree=fixed_degree).However, this hardcodes the degree and if you change something in expr it will still use
fixed_degreeeven if now UFL may estimate something lower.This PR allows passing a maximum quadrature degree that will only be used if UFL estimates a higher degree. If UFL estimates a lower degree then that will be used. This max degree is passed via the measure
metadata:inner(expr, v)*dx(metadata={'max_quadrature_degree': max_degree})By default nothing will be printed to screen if the maximum degree is chosen, but if you change the logging level to
INFOthen you can see when it happens.