Move quadrature rules from FFC to FIAT

Issue #15 resolved
Miklós Homolya created an issue

Currently, FIAT has Gauss-Jacobi quadrature rules for intervals (and being extended with Gauss-Lobatto and Gauss-Lobatto-Legendre by @David_Ham), collapsed quadrature rules for triangles and tetrahedra, and tensor product rules for tensor product cells. Since the collapsed quadrature rules are not the optimal choice, FFC contains hand-coded, optimal quadrature rules for triangles and tetrahedra up to degree 6. This is a proposal to move these rules to FIAT.

Effects:

  • For FEniCS: No practical change, but all quadrature rules will be in a single component.
  • For the FEniCS / Firedrake cooperation: TSFC "inherited" the quadrature rules from FFC. By moving these from FFC and TSFC to FIAT, we put more of our shared code under shared maintenance.
  • For Firedrake: Having the quadrature rules scattered between components leads to poor composability. The tensor product rule is in FIAT, but the good triangle rules are in TSFC. Consequently, on prism cells (triangle x interval) we end up using the poor triangle rules.
  • For FInAT: FInAT needs to have quadrature classes which express structure in quadrature rules, such as tensor product and collapsed quadrature. Having the quadrature rules scattered among TSFC, FIAT and FInAT is a nightmare for composability.

If you agree, I'm willing to do the surgery in both FFC and FIAT, so the code won't be duplicated in FEniCS.

Comments (2)

  1. Prof Garth Wells

    Sounds good. I think I added the quadrature schemes for low-order simplices to FFC a long time ago. Be aware that the schemes are for the FFC references cells - I think FIAT uses different size reference cells.

    I also remember that I didn't add any tests since we didn't have a simple unit testing framework at the time.

  2. Log in to comment