Sums in as_vector/as_matrix
Bug #665078 reported by
Guennel Andreas
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(
# test and trial functions
u = TrialFunction(
v = TestFunction(
# variational problem: Linear form
L = inner( test_vector(u), test_vector(v) ) * dx
#L = inner( test_matrix(u), test_matrix(v) ) * dx
To post a comment you must log in.
Problem seems to be handling of u[0] + u[1] in as_vector.