Comment 3 for bug 997739

Revision history for this message
Johan Hake (johan-hake) wrote : Re: [Bug 997739] [NEW] Rank analysis is wrong

On 05/10/2012 08:34 PM, Marie Rognes wrote:
> On 05/10/2012 08:18 PM, Johan Hake wrote:
>> mesh = UnitCube(5,5,5)
>> VV = VectorFunctionSpace(mesh,"Lagrange",1)
>> u = TrialFunction(VV)
>> v = TestFunction(VV)
>> Aij = diag(Constant((1,1,1)))
>> Delta = Identity( mesh.ufl_cell().geometric_dimension())
>> # Does not work (but works with sfc)
>> assemble(inner(Aij*(grad(u)+Delta), grad(v))*dx)
>> # Works
>> assemble(inner(Aij*grad(u), grad(v))*dx)
>
> As far as I can see, your form has different ranks.
> The error message then seems very correct.

grad(u).rank() == 2
Delta.rank() == 2
Aij.rank() == 2
(grad(u)+Delta).rank() == 2
(Aij*(grad(u)+Delta)).rank() == 2

Can you point our where it is wrong?

Johan