Skip to content

Use a Symmetric matrix in the Covariant Axis2Tensor#1828

Open
charleskawczynski wants to merge 1 commit into
mainfrom
ck/symmetry
Open

Use a Symmetric matrix in the Covariant Axis2Tensor#1828
charleskawczynski wants to merge 1 commit into
mainfrom
ck/symmetry

Conversation

@charleskawczynski

@charleskawczynski charleskawczynski commented Jun 18, 2024

Copy link
Copy Markdown
Member

This PR adds the use of symmetric matrices for the Covariant Axis2Tensors.

I think that this should be all we need, and this may result in a nice improvement in our kernels that use these tensors.

I first tried to use LinearAlgebra.Symmetric, however, it has a uplo::Char field, and this isn't a float type and as a result does not pass the check_basetype(T, S) test in our DataLayouts. So, I grabbed most of those definitions from LinearAlgebra and simply removed uplo.

I did have to widen the allowable types in AxisTensor.

Closes #1827 (the issymmetric test fails on main without fixing #1827).

@charleskawczynski

Copy link
Copy Markdown
Member Author

It looks like we'll need to generalize the rmul_with_projection logic to handle more generic AxisTensors (i.e., ones backed by SimpleSymmetric matrices).

@charleskawczynski

Copy link
Copy Markdown
Member Author

I'm going to leave this open, as I'm still not convinced that I did this correctly. Also, I'm not sure if and how this works on the CUDA side. This sort of optimization could account for 12 scalar fields, which is a lot of additional memory to store (in the context of columnwise!).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The Δz_field test generates bad LocalGeometry objects

1 participant