Sums in as_vector/as_matrix

Bug #665078 reported by Guennel Andreas
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
FEniCS Project
Fix Released
Medium
Unassigned

Bug Description

The following UFL-code generates an error: "UFLException: All terms in form must have same rank."
It seems that sums in as_vector and as_matrix cause this problem. (Version 0.9.9)

# UFL to test sums in as_matrix or as_vector
# Compile this form with FFC: ffc -l dolfin as_matrix.ufl

def test_vector(u):
    return as_vector([ u[0]+u[1], u[1] ])

def test_matrix(u):
    return as_matrix([[ u[0]+u[1], u[1] ]])

element = VectorElement("Lagrange", triangle, degree=1, dim=2)

# test and trial functions
u = TrialFunction(element)
v = TestFunction(element)

# variational problem: Linear form
L = inner( test_vector(u), test_vector(v) ) * dx
#L = inner( test_matrix(u), test_matrix(v) ) * dx

Revision history for this message
Guennel Andreas (andreas-guennel) wrote :
Revision history for this message
Anders Logg (logg) wrote :

Problem seems to be handling of u[0] + u[1] in as_vector.

Changed in fenics:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Martin Sandve Alnæs (martinal) wrote :

Seems like this no longer applies, looks like a duplicate of other fixed bugs.

Changed in fenics:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.