← Back to team overview

ufl team mailing list archive

Re: [HG UFL] Fixed lhs/rhs bug, turns out it was in the list_tensor handler.

 

I agree that the error is completely incomprehensible,
but in sigma(u, p0) you're adding terms with a trialfunction
only in one of the terms. Can you try with a valid form?

Martin



On Tue, Sep 22, 2009 at 8:47 PM, Harish Narayanan
<harish.mlists@xxxxxxxxx> wrote:
> 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)
>
> _______________________________________________
> UFL-dev mailing list
> UFL-dev@xxxxxxxxxx
> http://fenics.org/mailman/listinfo/ufl-dev
>
>


Follow ups

References