Subject: [UFL-dev] UFL bug

From: Kristian Oelgaard <[email-masked]>
Date: Fri, 27 Feb 2009 14:56:30 +0100

Hi,

The following form fails:

element = FiniteElement("Lagrange", triangle, 2)
v = TestFunction(element)
C = VectorConstant("triangle")

L = C[0]*v*dx

  File "/home/oelgaard/fenics/ffc-ufl/ffc/compiler/uflcompiler.py", line 73, in
compile
    compile_forms(forms, prefix, options)
  File "/home/oelgaard/fenics/ffc-ufl/ffc/compiler/uflcompiler.py", line 105, in
compile_forms
    form_data = analyze_form(form)
  File "/home/oelgaard/fenics/ffc-ufl/ffc/compiler/uflcompiler.py", line 242, in
analyze_form
    form_data = FormData(form)
  File "/home/oelgaard/fenics/ufl/ufl/algorithms/formdata.py", line 56, in __init__
    build_argument_replace_map(basis_functions, functions)
  File "/home/oelgaard/fenics/ufl/ufl/algorithms/analysis.py", line 87, in
build_argument_replace_map
    for (i, f) in enumerate(functions)]
  File "/home/oelgaard/fenics/ufl/ufl/function.py", line 94, in reconstruct
    return VectorConstant(self._cell, self._element.value_shape()[0], count)
AttributeError: 'VectorConstant' object has no attribute '_cell'

Kristian

---

From: Martin Sandve Alnæs <[email-masked]>
Date: Fri, 27 Feb 2009 15:34:26 +0100

Fixed.

Martin

On Fri, Feb 27, 2009 at 2:56 PM, Kristian Oelgaard
<[email-masked]> wrote:
> _______________________________________________
> UFL-dev mailing list
> [email-masked]
> http://fenics.org/mailman/listinfo/ufl-dev
>