### How to find quadrature used

188

views

0

Fenics chooses quadrature rule automatically. Is there a way print the name of the quadrature rule used and find more information about it ?

Community: FEniCS Project

### 2 Answers

6

You can learn a lot about this from the source code in FIAT/quadrature_schemes.py . In my distribution it is in /usr/lib/python3/dist-packages. Or you can find it at github . As explained in the comments, for triangles and tetrahedra and degree <= 6 a hard-coded rule is used, and you can find the exact rules later in the file. For tensor-product cells (intervals, quads, hexes), a tensor-product Gaussian quadrature rule is used, and for triangles and tets, a collapsed tensor-product Gaussian quadrature rule is used.
Thank you. This was useful. In actual practice we define a form and the quadrature rule is automatically chosen to integrate that form. Is there a way to find out which rule is used to integrate a particular form in my code ?

written
5 months ago by
Praveen C

0

FYI, using Ubuntu 17.10 with the FEniCS PPA, FIAT/quadrature_schemes.py is found in /usr/lib/python2.7/dist-packages.

Please login to add an answer/comment or follow this question.