-
-
Notifications
You must be signed in to change notification settings - Fork 654
Description
Currently every Components
object has lots of metadata attributes in addition to the actual data dictionary in ._comp
.
If one has many different Components
objects with the same symmetry metadata, we can reduce storage space as follows.
We create new classes CompParent
, CompParentWithSym
, ..., which
store the symmetry attributes and become UniqueRepresentation
. We make Components
objects elements of these parents.
The parents will also have index iterator methods.
Data associated with symmetries and dimensions, computed currently each time for each CompWithSym
object in methods such as __init__
, __add__
, trace
, ... can be precomputed and cached in the parent using @cached_method
in the parent class).
This will make the code in #30229 (subspaces of tensor with symmetries) more elegant because it no longer needs a dummy Components
object to represent the symmetry but rather a CompParent
object.
See also:
- Action of a sympy TensorSymmetry #32029 Action of a sympy
TensorSymmetry
Depends on #31904
Depends on #29619
CC: @mjungmath @egourgoulhon @tscrim @honglizhaobob
Component: linear algebra
Author: Michael Jung, Matthias Koeppe
Branch/Commit: public/30307 @ e5a81f2
Issue created by migration from https://trac.sagemath.org/ticket/30307