Basic math for Multidimensional arrays
To use BasicMatrix3x3 as a drop in for the c-style tensor, we need to support the addition, subtraction, and several multiplication functionality found in math/vec.h. A lot of these functions are used in the main MD code, each of which will need to be supported before the matrices can be replaced.
Functions to replace:
det m_add m_sub
Add mdspan basic elementwise math
BasicMatrix3x3 provides a replacement for the c-style tensors, but
has yet to replicate the tensor operations in math/vec.h. This provides
a subset of that functionality for msdpan in general, which can be used
for MultiDimArray trivially
Add transpose operation to Matrix3x3
Add free function to convert matrix type
New free function that allows generation of a Matrix3x3 type from the
legacy matrix type. Prepares for replacing the old matrix types.
#6 Updated by Mark Abraham about 2 months ago
We would also want to think about the consequences on compilation time. Anecdotally, the density fitting code that Christian has been landing is rather slow to compile, presumably because of the cost of compiling code based on mdspan. Before Kevin gets too committed to the project, we should probably try replacing matrix type with Matrix3x3 in a whole source file and getting a feel for the cost, in release and debug mode.