Form Compiler: uflacs

4 months ago by
Hey, I specify 'uflacs' as the form_compiler as follows:
parameters['form_compiler']['representation'] = 'uflacs'

Then I try to run:

V = FunctionSpace(mesh)
f = Function(V)
norm(f,  'L2')

This gives the following WARNING;

FFC: quadrature representation is deprecated! It will ***
*** likely be removed in 2018.1.0 release. Use uflacs ***
*** representation instead.

Could somebody explain how I can enforce form compiler parameters? I have looked up other posts, but could not understand it clearly.
Community: FEniCS Project

1 Answer

4 months ago by
Representation is overloaded just in norm(). Other user calls to assemble(), etc. will use the right representation.

Thanks for reporting the issue, it is now tracked at and will be solved before the release.
Is there an alternative way to compute norm of an error in two functions:

f = function(V)
f_ref = function(V_ref)

H1_norm(f - f_ref)

using uflacs form?
written 4 months ago by Pratyuksh Bansal  
Yes, the workaround is assemble((grad(f-f_ref)**2+(f-f_ref)**2)*dx).

But note that this is not very accurate if f_ref is not a polynomial and can't be integrated exactly be a quadrature formula. There is a degree rise trick which errornorm() uses.
written 4 months ago by Jan Blechta  
Please login to add an answer/comment or follow this question.

Similar posts:
Search »