FFC

Non-informative error for non-supported elements

Bug #1153515 reported by Marie Rognes on 2013-03-11
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
FFC
Undecided
Marie Rognes

Bug Description

Hi guys,

Whenever I try to run any simulation with Argyris elements, I get the following error:

Traceback (most recent call last):
  File "demo_poisson.py", line 41, in <module>
    V = FunctionSpace(mesh, "ARG",5)
  File "/maybehome/claing/fenics/FEniCS/lib64/python2.7/site-packages/dolfin/functions/functionspace.py", line 353, in __init__
    FunctionSpaceBase.__init__(self, mesh, element)
  File "/maybehome/claing/fenics/FEniCS/lib64/python2.7/site-packages/dolfin/functions/functionspace.py", line 77, in __init__
    ufc_element, ufc_dofmap = jit(self._ufl_element)
  File "/maybehome/claing/fenics/FEniCS/lib64/python2.7/site-packages/dolfin/compilemodules/jit.py", line 66, in mpi_jit
    return local_jit(*args, **kwargs)
  File "/maybehome/claing/fenics/FEniCS/lib64/python2.7/site-packages/dolfin/compilemodules/jit.py", line 154, in jit
    return jit_compile(form, parameters=p, common_cell=common_cell)
  File "/maybehome/claing/fenics/FEniCS/lib/python2.7/site-packages/ffc/jitcompiler.py", line 71, in jit
    return jit_element(ufl_object, parameters)
  File "/maybehome/claing/fenics/FEniCS/lib/python2.7/site-packages/ffc/jitcompiler.py", line 178, in jit_element
    compiled_form, module, form_data, prefix = jit_form(form, parameters)
  File "/maybehome/claing/fenics/FEniCS/lib/python2.7/site-packages/ffc/jitcompiler.py", line 130, in jit_form
    common_cell=common_cell)
  File "/maybehome/claing/fenics/FEniCS/lib/python2.7/site-packages/ffc/compiler.py", line 155, in compile_form
    ir = compute_ir(analysis, parameters, common_cell)
  File "/maybehome/claing/fenics/FEniCS/lib/python2.7/site-packages/ffc/representation.py", line 78, in compute_ir
    for (i, e) in enumerate(elements)]
  File "/maybehome/claing/fenics/FEniCS/lib/python2.7/site-packages/ffc/representation.py", line 131, in _compute_dofmap_ir
    num_dofs_per_entity = _num_dofs_per_entity(element)
  File "/maybehome/claing/fenics/FEniCS/lib/python2.7/site-packages/ffc/representation.py", line 492, in _num_dofs_per_entity
    return [len(entity_dofs[e][0]) for e in range(len(entity_dofs.keys()))]
KeyError: 0

This particular one was produced using the demo_poisson.py code with Argyris elements. The code is reproduced minimally below:

from dolfin import *

mesh = UnitSquare(32, 32)
V = FunctionSpace(mesh, "ARG",5)

def boundary(x):
    return x[0] < DOLFIN_EPS or x[0] > 1.0 - DOLFIN_EPS

u0 = Constant(0.0)
bc = DirichletBC(V, u0, boundary)

u = TrialFunction(V)
v = TestFunction(V)
f = Expression("10*exp(-(pow(x[0] - 0.5, 2) + pow(x[1] - 0.5, 2)) / 0.02)")
g = Expression("sin(5*x[0])")
a = inner(grad(u), grad(v))*dx
L = f*v*dx + g*v*ds

u = Function(V)
solve(a == L, u, bc)

Is this a bug, or do I just not understand how Argyris elements work?

Many thanks,

Chris

affects: dolfin → ffc
Changed in ffc:
assignee: nobody → Marie Rognes (meg-simula)
Changed in ffc:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers