← Back to team overview

ufl team mailing list archive

Re: [FFC-dev] Quadrature order

 

Quoting "Garth N. Wells" <gnw20@xxxxxxxxx>:

>
>
> Kristian Oelgaard wrote:
> > Quoting "Garth N. Wells" <gnw20@xxxxxxxxx>:
> >
> >> I just tested the new FFC generated code (with quadrature) from the UFL
> >> input for Poisson. From the input code
> >>
> >>      element = FiniteElement("Lagrange", "triangle", 1)
> >>      v = TestFunction(element)
> >>      u = TrialFunction(element)
> >>      f = Function(element)
> >>
> >>      a = dot(grad(v), grad(u))*dx(0, {"quadrature_order":1})
> >>      L = v*f*dx(0, {"quadrature_order":2})
> >>
> >> I computed exactly the same solution as with the FFC .form code, but with
> >>
> >>      element = FiniteElement("Lagrange", "triangle", 1)
> >>      v = TestFunction(element)
> >>      u = TrialFunction(element)
> >>      f = Function(element)
> >>
> >>      a = dot(grad(v), grad(u))*dx
> >>      L = v*f*dx
> >>
> >> I see differences. How is the order of integration being selected?
> >
> > As far as I remember the UFL algorithm currently just looks at order of the
> > basis functions:
> >
>
> So it only looks at the test and trial functions, and not the other
> functions? And it doesn't take into account derivatives?

Yes.

> What, if anything, specific will UFL provide to the compiler to help
> decide on the integration order?

The algorithm to compute this is present in UFL now it *just* needs to be
finished, but I don't know the priority of this.

Kristian

> Garth
>
>
> > a: 1*1 = 2
> > L: 1   = 1
> >
> > So the difference is expected.
> >
> > Kristian
> >
> >
> >> Garth
> >> _______________________________________________
> >> FFC-dev mailing list
> >> FFC-dev@xxxxxxxxxx
> >> http://www.fenics.org/mailman/listinfo/ffc-dev
> >>
> >
> >
>
>




Follow ups

References