ufl team mailing list archive
-
ufl team
-
Mailing list archive
-
Message #01505
[Bug 461775] [NEW] form errors related to zeros
Public bug reported:
The following form crashes with
AttributeError: 'Zero' object has no attribute '_expressions'
element = VectorElement("Lagrange", triangle, 1)
v = TestFunction(element)
du = TrialFunction(element)
U = Function(element)
def planarGrad(u):
return as_matrix([[u[0].dx(0), 0 ,u[0].dx(1)],
[ 0 , 0 , 0 ],
[u[1].dx(0), 0 ,u[1].dx(1)]])
def epsilon(u):
return 0.5*(planarGrad(u)+planarGrad(u).T)
def NS_a(u,v):
return inner(epsilon(u),epsilon(v))
L = NS_a(U,v)*dx
a = derivative(L, U, du)
** Affects: ufl
Importance: Undecided
Status: New
--
form errors related to zeros
https://bugs.launchpad.net/bugs/461775
You received this bug notification because you are subscribed to UFL.
Status in Unified Form Language: New
Bug description:
The following form crashes with
AttributeError: 'Zero' object has no attribute '_expressions'
element = VectorElement("Lagrange", triangle, 1)
v = TestFunction(element)
du = TrialFunction(element)
U = Function(element)
def planarGrad(u):
return as_matrix([[u[0].dx(0), 0 ,u[0].dx(1)],
[ 0 , 0 , 0 ],
[u[1].dx(0), 0 ,u[1].dx(1)]])
def epsilon(u):
return 0.5*(planarGrad(u)+planarGrad(u).T)
def NS_a(u,v):
return inner(epsilon(u),epsilon(v))
L = NS_a(U,v)*dx
a = derivative(L, U, du)
Follow ups
References