← Back to team overview

ffc team mailing list archive

Re: All components of a list tensor most provide same arguments?

 

On 17. nov. 2010 14:36, Patrick Riesen wrote:
> hello,
> i'm trying to update my code for the most recent fenics development
> versions.
>
> compiling+demos for ffc/ufl/dolfin etc. is all ok.
>
> now my code has a problem, i have the following in the ufl-file:
>
> ****
> e = as_matrix([[0.5*u.dx(0)**2, 0.5*u.dx(0)],
>                [0.5*u.dx(0)   ,        0.0]])
>
> e_dev = e - 0.5*tr(e)*Identity(2)
>
> Ie = 0.5*tr(e_dev*e_dev)
> beta = K*exp(-c*Ie)
>
> ****
>
> note:
> the variable u is a coefficient from a mixed element as
> uw = Coefficient(ME)
> u, w = split(uw)
>
>
> compiling with ffc now terminates after the compiler stage 1 and gives:
>
> All components of a list tensor most provide same arguments
>
> *** FFC: All components of a list tensor most provide same arguments
> *** FFC: To get more information about this error, rerun FFC with
> --verbose.
>
> what does this mean? how do i need to fix my syntax above?

When compiling a given form 'a', FFC now checks that the form has a
single rank; that is, that all terms in the form has the same rank. FFC
does this (more or less) by extracting the ranks of all the terms
appearing in the form and checking that there is only one rank.

Problems can arise with list tensors (such as as_matrix(...)) where the
components have different ranks. It is odd however, that the above
example gives problems since if u is a coefficient, then 0.5*u.dx(0) and
0.0 should have the same rank.

Could you provide a minimal runnable example that reproduces the error?

--
Marie




















References