Ferrite-FEM / Tensors.jl

Efficient computations with symmetric and non-symmetric tensors with support for automatic differentiation.
https://ferrite-fem.github.io/Tensors.jl/
Other
170 stars 38 forks source link

Get rid of dimension restriction? #116

Open dkarrasch opened 5 years ago

dkarrasch commented 5 years ago

I was recommending this package in a fantastic WIP https://github.com/JuliaNLSolvers/ManifoldMuseum/pull/12, but forgot that there is a restriction on dim. A brief check seems to indicate that one could in principle get rid of that restriction, since many operators are written in terms of loops i = 1:dim and would work right away. It seems that only a few functions (like inv) are currently written assuming dim in (1, 2, 3). Would you consider PRs to the effect of getting rid of the dimension restriction? One could let certain continuum mechanics-related functions be restricted to dim in (1, 2, 3) and throw errors otherwise?

fredrikekre commented 5 years ago

Could be interesting to play around with if you like. What kind of dimensions are we talking about? The same number-of-element restrictions as with e.g. StaticArrays.jl holds for Tensors.jl too, and tensors with more than ~100 or so elements quickly becomes slow and you are better off with regular Arrays.