ufl team mailing list archive
-
ufl team
-
Mailing list archive
-
Message #01480
Re: [HG UFL] Fixed lhs/rhs bug, turns out it was in the list_tensor handler.
Harish Narayanan wrote:
> Anders Logg wrote:
>> Harish, can you test on your forms so we know it works before the
>> release?
>
> I already did, and something's not ok (with LHS/RHS). I'll try to send
> the simplest case that reproduces my problem.
The attached form does not compile.
Harish
# Define the symmetric gradient of the velocity
def sgrad(v):
return 0.5*(grad(v) + grad(v).T)
# Define the Cauchy stress tensor
def sigma(v, q):
return 2.0*nu*sgrad(v) - q*Identity(v.cell().d)
cell = triangle
vector = VectorElement("Lagrange", cell, 2)
scalar = FiniteElement("Lagrange", cell, 1)
v = TestFunction(vector)
q = TestFunction(scalar)
u = TrialFunction(vector)
p = TrialFunction(scalar)
p0 = Function(scalar)
nu = Function(scalar)
F = inner(sgrad(v), sigma(u, p0))*dx
a = lhs(F)
L = rhs(F)
Follow ups
References