← Back to team overview

ffc team mailing list archive

Tensors

 

Hi,

I'm at a point where tensor (matrix) notation would be very useful in
FFC. Has anyone given any thought to what needs to be done? I can work
on implementing it, I need some exercise in Python and to learn more
about FFC. It would be good to discuss which features are needed
here on this list.

Right now I'm thinking that all that should be necessary is a matrix
indexing operator: [a, b] (perhaps general tensor indexing can wait,
but presumably it would extend naturally: [a, b, c] etc.), which would
be very similar to the vector indexing operator: [a]. There also needs
to be a way of specifying the dimensions for the components of the
tensor. Perhaps slicing would also be useful, i.e. the [:, b] and [a,
:] operators.

The actual tensor operators (matrix multiplication etc.) could then be
user-defined, at least at this stage.

What do you think? The rest of FFC and FIAT shouldn't have to know
about tensors, an M x N tensor-valued element should just look like an
M * N vector-valued element to them. I haven't looked much at the code
yet, but hopefully it should be straightforward to do it this way.

  Johan



Follow ups