# Rule of thumb for quadrature degree

**URL:** <https://fenicsproject.discourse.group/t/rule-of-thumb-for-quadrature-degree/11346>\
**Category:** variational formulation\
**Created:** [May 30, 2023, 5:59pm UTC](https://fenicsproject.discourse.group/t/rule-of-thumb-for-quadrature-degree/11346 "2023-05-30T17:59:48Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![dokken](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/dokken/32/1560_2.png) [@dokken](https://fenicsproject.discourse.group/u/dokken)\
**Post date:** [May 30, 2023, 6:07pm UTC](https://fenicsproject.discourse.group/t/rule-of-thumb-for-quadrature-degree/11346/2 "2023-05-30T18:07:31Z")

</div>

There are a few things to consider here:

1. is your element type triangle/tetrahedra or quadrilateral/hexahedral  
1b) are the mesh cells affine?

If no on 1b the degree is usually alot higher than in the affine case.

Consider a general affine simplex with a test/trial function of order Q. Then a mass matrix has order 2Q, while a stiffness matrix has order 2\*(Q+1).

1. How does the PML functions look like? In general you can use  
[How to obtain the Gauss quadrature degree estimated by the form compiler - #2 by dokken](https://fenicsproject.discourse.group/t/how-to-obtain-the-gauss-quadrature-degree-estimated-by-the-form-compiler/4099/2)  
to check what the estimated degree of various forms are.

Without an example on a square or cube with the forms (ignoring the subdomains of pml, just using regular dx), it is hard to give further pointers.

---

_[View the full topic](https://fenicsproject.discourse.group/t/rule-of-thumb-for-quadrature-degree/11346)._
