Missing coverage for UFL preprocessing of derivatives of expressions

Issue #854 new
Nico Schlömer created an issue

The case found by @nschloe should have a coverage in DOLFIN so that UFL issue 96 would not happen.

from dolfin import *

#parameters.form_compiler.representation = "quadrature"  # Works
#parameters.form_compiler.representation = "tensor"      # Works
#parameters.form_compiler.representation = "uflacs"      # Fails
#parameters.form_compiler.representation = "tsfc"        # Fails

mesh = UnitSquareMesh(10, 10)
V = FunctionSpace(mesh, 'P', 1)
v = TestFunction(V)

element = FiniteElement("P", mesh.ufl_cell(), 1)
p = Expression('2.71 * x[0]', element=element)
assemble(p.dx(0)*v*dx)

Comments (6)

  1. Jan Blechta

    Wow, looks like a bug we don't want to have in a release. This is @martinal's field. Can you give us a direction if too busy, @martinal?

    BTW, specifying a full element does not help either:

    from dolfin import *
    
    mesh = UnitSquareMesh(10, 10)
    V = FunctionSpace(mesh, 'CG', 1)
    v = TestFunction(V)
    
    element = FiniteElement("P", mesh.ufl_cell(), 1)
    p = Expression('2.71 * x[0]', element=element)
    assemble(p.dx(0) * v * dx)
    
  2. Log in to comment