In development version of FFC vertex
scheme is now available in addition to Gauss rules. Docstring in ffc/ffc/quadrature_scheme.py
says
# The vertex scheme, i.e., averaging the function value in the vertices
# and multiplying with the simplex volume, is only of order 1 and
# inferior to other generic schemes in terms of error reduction.
# Equation systems generated with the vertex scheme have some
# properties that other schemes lack, e.g., the mass matrix is
# a simple diagonal matrix. This may be prescribed in certain cases.
This command
parameters['form_compiler']['quadrature_scheme'] = 'vertex'
should utilize vertex
scheme globally in your script. Alternatively you apply vertex scheme on single form like this
m = u*v*dx(None, form_compiler_parameters={'quadrature_degree': 1,
'quadrature_scheme': 'vertex'}))
or pass it to assembler
M = assemble(u*v*dx,
form_compiler_parameters={'quadrature_degree': 1,
'quadrature_scheme': 'vertex'})
or to whatever accepts form_compiler_parameters
dictionary.
You can also consider implementing new rule you need into ffc/ffc/quadrature_scheme.py
. Probably it is only file that needs a change to implement a new rule now.