On 10 May 2012 19:45, Johan Hake <email address hidden> wrote:
> 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?
>
The form ranks are mixed up - u is a TrialFunction and Delta is a
constant. You're mixing linear and bilinear forms.
On 10 May 2012 19:45, Johan Hake <email address hidden> wrote: pace(mesh, "Lagrange" ,1) (1,1,1) )) cell(). geometric_ dimension( )) inner(Aij* (grad(u) +Delta) , grad(v))*dx) inner(Aij* grad(u) , grad(v))*dx) +Delta) .rank() == 2 u)+Delta) ).rank( ) == 2
> 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 = VectorFunctionS
>>> u = TrialFunction(VV)
>>> v = TestFunction(VV)
>>> Aij = diag(Constant(
>>> Delta = Identity( mesh.ufl_
>>> # Does not work (but works with sfc)
>>> assemble(
>>> # Works
>>> assemble(
>>
>> 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)
> (Aij*(grad(
>
> Can you point our where it is wrong?
>
The form ranks are mixed up - u is a TrialFunction and Delta is a
constant. You're mixing linear and bilinear forms.
Garth
> Johan /bugs.launchpad .net/bugs/ 997739 /bugs.launchpad .net/ffc/ +bug/997739/ +subscriptions
>
> --
> You received this bug notification because you are a member of FFC Core
> Team, which is subscribed to FFC.
> https:/
>
> Title:
> Rank analysis is wrong
>
> To manage notifications about this bug go to:
> https:/