ListTensor assumption fails

Issue #27 resolved
Marie Elisabeth Rognes created an issue

The below code fails with

ufl.log.UFLException: ListTensor assumption 1 failed, please report this incident as a potential bug.

from ufl import *
V = VectorElement("CG", triangle, 1)
Q = FiniteElement("CG", triangle, 1)
v = Coefficient(V)
q = Coefficient(Q)
M = MixedElement([V, Q])
as_tensor((v, q))

Comments (7)

  1. Martin Sandve Alnæs

    That's not supposed to work, the only bug is a lack of error checking at an earlier point.

    Try as_vector(list(v) + [q]).

  2. Log in to comment