FFC

Compilation fails with quadrature element on boundary

Bug #488661 reported by Anders Logg on 2009-11-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
FFC
Low
Kristian B. Ølgaard

Bug Description

FFC fails to compile the following form:

P1 = FiniteElement("Lagrange", triangle, 1)
Q1 = FiniteElement("Quadrature", triangle, 2)

v = TestFunction(P1)
g = Function(Q1)

L = v*g*ds

The problem is that the constructor of QuadratureElement computes the number of quadrature points to be 4,
but later quadraturerepresentation.py computes new points for the facet integral and then there are only 2
points. As a result, the following test fails:

 if not len(points) == self.__num_quad_points:
            error("Points must be equal to coordinates of quadrature points")

Anders Logg (logg) on 2009-11-26
Changed in ffc:
importance: Undecided → High
assignee: nobody → Kristian B. Ølgaard (k.b.oelgaard)
milestone: none → 0.7.1
Anders Logg (logg) wrote :

This fail both with the development version and 0.7.0.

Changed in ffc:
status: New → Confirmed
Garth Wells (garth-wells) wrote :

Is this still an issue?

Marie Rognes (meg-simula) wrote :

Yes

If we return the identity matrix with size equal to the size of the incoming quadrature points, the generated code for tabulate_tensor() looks correct. Even if we add a cell integral such that:

L = v*g*dx + v*g*ds

it looks correct.

The problem with this approach is that since the dofs of a quadrature element is associated with the quadrature points it is problematic to define the element and dof_map information consistently.
What should for instance the output be of element.space_dimension(), element.evaluate_dof(),
dof_map.tabulate_coordinates(), dof_map.tabulate_dofs()?

Marie Rognes (meg-simula) wrote :

Since this has not been fixed in 2-3 years, I'm reducing the importance of this one.

Changed in ffc:
milestone: 0.7.1 → none
importance: High → Low

OK, notice that the fix is not straightforward and we need to agree on
certain things to move on.
But since the bug has been inactive for 2-3 years I guess no one needs the fix.

On 3 January 2013 14:21, Marie Rognes <email address hidden> wrote:
> Since this has not been fixed in 2-3 years, I'm reducing the importance
> of this one.
>
> ** Changed in: ffc
> Milestone: 0.7.1 => None
>
> ** Changed in: ffc
> Importance: High => Low
>
> --
> You received this bug notification because you are a member of FFC Core
> Team, which is subscribed to FFC.
> https://bugs.launchpad.net/bugs/488661
>
> Title:
> Compilation fails with quadrature element on boundary
>
> Status in FEniCS Form Compiler:
> Confirmed
>
> Bug description:
> FFC fails to compile the following form:
>
> P1 = FiniteElement("Lagrange", triangle, 1)
> Q1 = FiniteElement("Quadrature", triangle, 2)
>
> v = TestFunction(P1)
> g = Function(Q1)
>
> L = v*g*ds
>
> The problem is that the constructor of QuadratureElement computes the number of quadrature points to be 4,
> but later quadraturerepresentation.py computes new points for the facet integral and then there are only 2
> points. As a result, the following test fails:
>
> if not len(points) == self.__num_quad_points:
> error("Points must be equal to coordinates of quadrature points")
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ffc/+bug/488661/+subscriptions

Martin Sandve Alnæs (martinal) wrote :

I think the underlying problem here is that the form is not well defined. It would be better to agree on a cleaner way to define the quadrature rule/degree to use, in a way that we can check early for consistency, i.e. all quadrature elements should have implicit degree or degree equal to the one defined in the form.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers