ufl icon indicating copy to clipboard operation
ufl copied to clipboard

Add Numpy-like functions

Open bleyerj opened this issue 1 year ago • 1 comments

I found it sometimes painful to use UFL when reshaping matrix/vectors, etc.

It would be useful to have UFL functions mimicking numpy like behavior such as: flatten, reshape, vstack, hstack, concatenate, etc.

I would be happy to make a proposal if we agree on this

bleyerj avatar Apr 29 '24 09:04 bleyerj

Presumably all of these are syntactic sugar for combinations of indexing on the one hand, and as_vector and as_tensor on the other. That being the case, this seems fairly unobjectionable.

dham avatar Apr 29 '24 09:04 dham