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

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mailing list: https://launchpad.net/~ffc
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~ffc
More help   : https://help.launchpad.net/ListHelp

Reply via email to