Argyris Elements - bug, or am I doing it wrong?

Asked by Christopher Laing on 2013-03-10

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

Question information

Language:
English Edit question
Status:
Solved
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Solved by:
Marie Rognes
Solved:
2013-03-12
Last query:
2013-03-12
Last reply:
2013-03-12
Marie Rognes (meg-simula) said : #1

Argyris elements are not really supported throughout the FEniCS pipeline. This should probably be intercepted earlier however, and a more informative error message given.

Okay, what does this mean in a practical sense? Are they usable at all, or only in certain circumstances? I haven't been able to find anything in the documentation about it.

Best Marie Rognes (meg-simula) said : #3

It means that they are not really usable.

Ah, okay then, thanks.

Thanks Marie Rognes, that solved my question.