allow for custom quadrature rules
Right now, when assembling a system, Dolfin offers a number of quadrature rules to select from by degree through FFC, https://bitbucket.org/fenics-project/ffc/src/3403ddd0cabdf8cdebcca2fb17595f10c6cd1369/ffc/quadrature_schemes.py?at=master.
In some cases, though, it is required to use certain specific quadrature rules to retain certain properties in the resulting matrix. One example is the M-matrix property for reaction-diffusion systems (which is not present in the discretized system when using the regular quadrature).
A future-proof workaround would be to allow for custom quadrature rules to be specified by the user. Another option would be to extend quadrature_schemes.py
with named schemes that can specifically be selected (disregarding the degree
argument, then).
Comments (3)
-
-
reporter I just created
https://bitbucket.org/fenics-project/ffc/pull-request/1/add-vertex-rule-for-quadrature/diff
for adding the vertex quadrature rule.
-
reporter - changed status to resolved
Moved to FFC as of the above comment.
- Log in to comment
Interface for
QuadratureRule
class could be specified. It would take degree as an constructor argument and have methods returning weights and quadrature points (these are expressed in barycentric coordinates inquadrature_schemes.py
, are they?). User could subclass it and pass it to form compiler.Actual subclassing and passing to form compiler would be done in UFL (to be feasible with C++ DOLFIN) so this may require changes in UFL apart from changes in FFC.