-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
on non-standard infix operators #210
Comments
Hi, thanks for your suggesting and giving a star. This package is mainly developed for the field of continuum mechanics. A similar package is Tensors.jl, while Tensorial.jl can handle the arbitrary size of tensor. Maybe I should change the description of this package so that people can know the package focuses on continuum mechanics. So, I'm not sure that this package is as useful for general usage as StaticArrays.jl because the key features of this package, such as symmetric tensors, contractions, tensor product, etc., seems to be beneficial in continuum mechanics. For example, the multiplication between two symmetric matrices So, in answer to your question, if there are significant advantages to using this package over StaticArrays.jl in general usage, yes, I will reconsider the definitions of the infix operators. May I ask which aspect of this package you find particularly useful in your case? |
I was interested in perhaps using it for differential geometry. One of the most obvious advantages of this package is what looks like extensive support for symmetry properties, something (almost) totally absent from the array libraries (though it doesn't seem there is anti-symmetry, is that right?). This package also seems to define many more convenient operations for tensors than are available directly with StaticArrays which would require shenanigans with tullio in that case (even if some of the notation looks very strange for someone from GR, diff-geo world).
So yes, in my case much of this stuff is still very useful. I have not done extensive performance comparisons but on initial observation this looks like quite a solid package. Anyway, I understand your not being interested in making extensive changes because some random guy on github claims your conventions are weird. I would merely encourage you to keep in mind that it may have more general applicability and I suspect there are a good number of people around the julia community who would be more interested in it were it more well known. Again, looks quite nice, compliments. I may at some point use this package as inspiration to write something similar more specifically focused on differential geometry. One of the things I considered was making it a requirement that all indices have the same dimension which would be a massive simplification for the type system relative to both this and StaticArrays (although it could rule out some use cases of mixed representations like spinors). |
Sorry, maybe I gave the wrong impression. I'm actually fine with changing codes if it is useful in different fields. I just didn't know that, and my world was too small. In my work, I often use single and double contractions, so I want to keep that usage. It can be resolved by defining the contraction operator with a different symbol. But to maintain compatibility with StaticArrays.jl, we need to restore the definition of the multiplication As for anti-symmetry, yes, I had implemented it before but decided not to include it and to keep the code simple because I could not come up with a situation where handling a skew-symmetric matrix would be effective for performance. |
Hi, thanks for all your work on this very impressive package.
I was wondering if you would ever be willing to re-consider the use of infix operators in this package. In particular, the use of$\cdot$ are incompatible with the conventions of all other $\cdot$ used as an inner product (i.e. having codomain $\mathbb{R}$ ), so I would expect $A \cdot B = \textrm{tr}(A^\dagger B)$ before simple matrix multplication.
*
andAbstractArray
. You cannot, for example, replace anSMatrix
with aMat
and have matrix multiplication still work. While I understand that theTensor
objects in this package are more general thanStaticArrays
and one is certainly not a drop-in replacement for the other, I nevertheless think it would go a long way to making this package more useful in the wider Julia ecosystem. Similarly, I have only ever seenI know this is a huge suggestion that might imply a lot of work, but I thought it worth mentioning as I very much doubt I am the only one who would hesitate to use this particularly because of differences in convention not only with
StaticArrays
but withAbstractArray
types more generally.The text was updated successfully, but these errors were encountered: