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.
On 05/10/2012 08:18 PM, Johan Hake 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)
> 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.
--
Marie