ffc team mailing list archive
-
ffc team
-
Mailing list archive
-
Message #01959
bug with triangles?
I have the following code:
q = 2
EL1 = VectorElement("Lagrange", "triangle", q, 3)
EL2 = VectorElement("Lagrange", "triangle", q - 1, 3)
Mh = EL1 + EL2
(psi, phi) = TestFunctions(Mh)
(b, w) = TrialFunctions(Mh)
k = dot( grad(phi),grad(b) )
which gives me the error:
k = dot( grad(phi),grad(b) )
File "/Library/Python/2.5/site-packages/ffc/compiler/language/operators.py", line 102, in dot
form = form + v[i][j]*w[i][j]
IndexError: list index out of range
I don't think I hven't understood what I supposed to give to ffc, since if I define the following I get the desired behavior:
def vect(a):
return [ a[i][j] for j in range(2) for i in range(3) ]
gphi = vect( grad(phi) )
gb = vect( grad(b) )
k = dot( gphi,gb )
Is there a problem in handling (n x d) matrices with 2D meshes?
Alessio
Follow ups