UFL Error Generating Form for a Q1 Element

Asked by Ted Kord

Hi

I get the following error withh ffc when trying to generate the C++ header for a Q1 element.

In the ufl file, I have:

element = FiniteElement("Lagrange", "quadrilateral", 1)
v = TestFunction(element)
u = TrialFunction(element)

a = inner(grad(u), grad(v))*dx
L = v*f*dx

The output of ffc -l dolfin ?.ufl is:

Compiler stage 1: Analyzing form
--------------------------------
  Name: a
  Rank: 2
  Cell: <quadrilateral of degree 1>
  Topological dimension: 2
  Geometric dimension: 2
  Number of facets: 4
  Number of coefficients: 0
  Number of cell integrals: 1
  Number of exterior facet integrals: 0
  Number of interior facet integrals: 0
  Number of macro cell integrals: 0
  Number of cell domains: 1
  Number of exterior facet domains: 0
  Number or interior facet domains: 0
  Number of macro cell domains: 0
  Arguments: [v_0, v_1]
  Coefficients: []
  Argument names: [v, u]
  Coefficient names: []
  Unique elements: CG1
  Unique sub elements: CG1

  Quadrature rule: default
  Quadrature order: auto
  Automatic selection of representation not implemented, defaulting to quadrature.
  Integral quadrature degree is 0.
Traceback (most recent call last):
  File "/home/tedkord/FEniCS/build/bin/ffc", line 167, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/home/tedkord/FEniCS/build/bin/ffc", line 155, in main
    compile_form(ufd.forms, ufd.object_names, prefix, options)
  File "/home/tedkord/FEniCS/build/lib/python2.6/site-packages/ffc/compiler.py", line 87, in compile_form
    form, form_data = analyze_form(form, object_names, options)
  File "/home/tedkord/FEniCS/build/lib/python2.6/site-packages/ffc/compiler.py", line 155, in analyze_form
    form_data.ffc_elements = [create_element(element) for element in form_data.elements]
  File "/home/tedkord/FEniCS/build/lib/python2.6/site-packages/ffc/createelement.py", line 52, in create_element
    ffc_element = FFCFiniteElement(ufl_element, domain)
  File "/home/tedkord/FEniCS/build/lib/python2.6/site-packages/ffc/finiteelement.py", line 82, in __init__
    ufl_element.cell().domain(), ufl_element.degree())
  File "/home/tedkord/FEniCS/build/lib/python2.6/site-packages/ffc/finiteelement.py", line 237, in __choose_element
    fiat_shape = ufl_domain2fiat_domain[shape]
KeyError: 'quadrilateral'

What's the problem?

Ted

Question information

Language:
English Edit question
Status:
Solved
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Solved by:
Kristian B. Ølgaard
Solved:
Last query:
Last reply:
Revision history for this message
Best Kristian B. Ølgaard (k.b.oelgaard) said :
#1

FFC only suports elements defined on interval, triangle or tetrahedron.

Revision history for this message
Ted Kord (teddy-kord) said :
#2

Ok. Thanks.

I was just reading through the UFC manual and I thought I'd try out the quadrilateral.

Ted

Revision history for this message
Ted Kord (teddy-kord) said :
#3

Thanks Kristian B. Ølgaard, that solved my question.

Revision history for this message
Anders Logg (logg) said :
#4

On Thu, Jan 21, 2010 at 03:24:38PM -0000, Ted Kord wrote:
> Question #98201 on DOLFIN changed:
> https://answers.launchpad.net/dolfin/+question/98201
>
> Status: Answered => Solved
>
> Ted Kord confirmed that the question is solved:
> Ok. Thanks.
>
> I was just reading through the UFC manual and I thought I'd try out the
> quadrilateral.
>
> Ted

Quad elements are supported by UFL and UFC but not yet by the code
generator (FFC) and the assembler (DOLFIN).

--
Anders