← Back to team overview

ffc team mailing list archive

Re: Choice of quadrature points in ffc

 

On Mon, Oct 22, 2007 at 12:58:17PM +0200, Martin Sandve Alnæs wrote:
> Hi again,
> how is the quadrature order chosen in ffc? What kind of quadrature
> rule du you use? For a stiffness matrix with 2D cubic elements the
> generated code uses 9 points, but a 4th order Gauss rule on a triangle
> is only 6 points and a 6th order rule is 12 points.

We don't use Gauss points, we use the same quadrature as in FIAT,
which is based on 1-D Jacobi quadrature extended to the d-dimensional
cube, then "collapsing" the cube into a simplex. It's not optimal but
it's simple.

FFC chooses the lowest order such rule that integrates the polynomial
exactly.

> I just need to be sure my benchmarks compare the same thing, so I need
> the correct number of quadrature points.
> 
> (So far the benchmarks have alternated between ffc and sfc being
> faster for non-quadrature code).

Interesting. Can you post the code (tabulate_tensor) for the simplest
possible case where SFC is faster?

/Anders


References