← Back to team overview

ffc team mailing list archive

Re: Quadrature degree=None

 

Quoting Anders Logg <logg@xxxxxxxxx>:

> On Mon, Nov 23, 2009 at 07:39:24AM +0100, Kristian Oelgaard wrote:
> > Quoting Anders Logg <logg@xxxxxxxxx>:
> >
> > > On Tue, Nov 17, 2009 at 09:28:23PM +0000, Garth N. Wells wrote:
> > > >
> > > >
> > > > Anders Logg wrote:
> > > > >I've added support in UFL and FFC for letting quadrature degree be
> > > > >None for a quadrature element.
> > > > >
> > > > >This lets the form compiler choose the quadrature. What currently
> > > > >happens is that the degree is counted as 1
> > > >
> > > > Polynomial degree or 'quadrature degree' (whatever that is)?
> > > >
> > > > (default value controllable
> > > > >from the form compiler) and the summed with other functions
> > > > >multiplying the coefficient.
> > > > >
> > > > >  L = v*f*dx
> > > > >
> > > > >If v is P2, then the total degree will be 2 + 1 = 3, which means the
> > > > >quadrature degree chosen by FFC is 3 for that integral and so also
> > > > >for the element for f.
> >
> > Sounds reasonable.
> >
> > > > >Then there seems to be some confusion about the difference between
> > > > >quadrature order and degree. At least I'm confused.
> > > >
> > > > Me too.
> >
> > It should be the same thing, but we could sort out the naming to avoid
> > confusion. I think this originates from Martin using 'polynomial degree'
> and I
> > used 'polynomial order' when first implementing this.
>
> I think degree is better. Quadrature order q can mean either that the error
> converges as h^q and polynomials of degree q - 1 are integrated
> exactly, or it can (in the case of Gauss quadrature) that it
> integrates polynomials of degree 2q - 1 exactly.
>
> We can define degree of a quadrature rule to be the polynomial degree
> it integrates exactly. Then there's no confusion.

That's how I defined it, only I used 'order' instead of 'degree'.
But let's do a search and replace to change order to degree.

> The problem is the following though. Should the quadrature rule of an
> element be an appropriate rule for the entire integrand, or should it
> be the polynomial degree approximation of the coefficient?
>
> Currently, if one has w being defined on a quadrature element of
> degree q, then the form
>
>   w^n * dx
>
> gets a total degree of n * q and FFC adjusts the quadrature rule to
> that total degree.

If I compute some field e.g., the strain from the displacement field at
quadrature points and then pass it as a coefficient to some other form, then
the order has to stay the same otherwise this get screwed up.
So if the order is set by the user, it shouldn't change, but if it is set to
None FFC should set it equal to the order needed to evaluate the integrand
exactly.

Kristian

> --
> Anders
>




Follow ups

References