ffc team mailing list archive
-
ffc team
-
Mailing list archive
-
Message #03455
Re: bug in MixedElement.tabulate()
I'm just about to take off for the Depeche Mode concert in Göteborg
but let's discuss it tomorrow. Or feel free to figure out what
tabulate should do... :-)
--
Anders
On Tue, Jan 26, 2010 at 04:08:07PM +0100, k.b.oelgaard@xxxxxxxxx wrote:
> MixedElement.tabulate() produces some mysterious results. Try the following in a ufl file:
>
> from ffc.fiatinterface import create_element
> elem = FiniteElement("Lagrange", triangle, 1)
> print create_element(elem).tabulate(1, [(0.333, 0.333)])
>
> This gives:
>
> {(0, 1): array([[-1.0],
> [0.0],
> [1.0]], dtype=object), (1, 0): array([[-1.0],
> [1.0],
> [0.0]], dtype=object), (0, 0): array([[0.334],
> [0.333],
> [0.333]], dtype=object)}
>
> which is correct.
>
> For a vector (mixed) element
>
> elem = VectorElement("Lagrange", triangle, 1)
>
> the result is
>
> {(0, 1): array([[[ 0.334], [ 0.
> ]],
>
> [[ 0.333],
> [ 0. ]],
>
> [[ 0.333],
> [ 0. ]],
>
> [[ 0. ],
> [ 0.334]],
>
> [[ 0. ],
> [ 0.333]],
>
> [[ 0. ],
> [ 0.333]]]), (1, 0): array([[[ 0.334],
> [ 0. ]],
>
> [[ 0.333],
> [ 0. ]],
>
> [[ 0.333],
> [ 0. ]],
>
> [[ 0. ],
> [ 0.334]],
>
> [[ 0. ],
> [ 0.333]],
>
> [[ 0. ],
> [ 0.333]]]), (0, 0): array([[[ 0.334],
> [ 0. ]],
>
> [[ 0.333],
> [ 0. ]],
>
> [[ 0.333],
> [ 0. ]],
>
> [[ 0. ],
> [ 0.334]],
>
> [[ 0. ],
> [ 0.333]],
>
> [[ 0. ],
> [ 0.333]]])}
>
> which is very wrong. I had a look at the code in MixedElement.tabulate(), but couldn't figure out what was going on.
>
> Kristian
>
> _______________________________________________
> Mailing list: https://launchpad.net/~ffc
> Post to : ffc@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~ffc
> More help : https://help.launchpad.net/ListHelp
Attachment:
signature.asc
Description: Digital signature
Follow ups
References