-
Notifications
You must be signed in to change notification settings - Fork 16
Refactor FieldMatrix indexing, add scalar_field_matrix #2346
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
Conversation
39ee021
to
14c7eed
Compare
c8572ee
to
6de72eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for all the new documentation! And the recursive implementations of get_internal_entry
and field_offset_and_type
are much clearer now.
Couple of minor suggestions for the docs, but overall this is good to merge in. This will be the last change to ClimaCore required for sparse autodiff, so we can make a new release after it's merged.
ee915f7
to
a1a38fb
Compare
Add scalar_fieldmatrix Add a function to convert a FieldMatrix where each matrix entry has an eltype of some struct into a FieldMatrix where each entry has an eltype of a scalar. Add additional tests for scalar_matrixfields Use @test_all in tests Make suggested changes to tests and field_name_dict.jl Revert unrolled_findfirst Clean up field matrix tests and add support for DiagonalMatrixRows CamelCase struct name Clean up tests and get_scalar_keys wip backup Minimal working with allocs WIP1 WIP more allocs fix Assorted cleanup Fix dx/dx case reduce code duplication; fix example Add gpu test further cleanup, extend diagonalrow fix names test and comments Add docs docs bugfix remvoe bad refs fix docs formatting WIP Y fields pre-switch to type space should work fix broken tests bugfix fix implicit tensor rep tests WIPP1 working state Improve readability at cost of concise code update docs further cleanup propgate full key vs keyerror propogate name_tree scalar_fielmatrix to scalar_field_matrix
Also add support for tensor slicing and improved docs wip finish docs minor formatting fix another minor docs formatting fix Make suggested docs changes
a1a38fb
to
633a291
Compare
This PR refactors the internal indexing of
FieldMatrix
blocks to use a generic recursive implementation, and it defines thescalar_field_matrix
function for obtaining views of scalar block components.