Skip to content
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

Eliminate ViscousSponge cache, fix unit test #3447

Merged
merged 1 commit into from
Nov 23, 2024

Conversation

charleskawczynski
Copy link
Member

This PR eliminates the ViscousSponge cache, and fixes the ViscousSponge unit test, which was not being exercised.

This is a followup to #3446.

@charleskawczynski
Copy link
Member Author

I realized, we can actually just eliminate these caches entirely, since no version returns anything other than nothing.

src/solver/types.jl Outdated Show resolved Hide resolved
@charleskawczynski
Copy link
Member Author

I've removed zmax from both sponges, and instead grab zmax from existing fields.

Copy link
Member

@szy21 szy21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@charleskawczynski
Copy link
Member Author

Spaces.z_max wasn't added until ClimaCore 0.14.18, so I need to update the compat. I could add a check, but the alternatives would be to dig into internals, which I think is not a good idea, or use maximum, which is not really performant.

@Sbozzolo
Copy link
Member

I would prefer if we added a version check and kept the compat to 0.14.12. It's fine to have ugly code confined to a branch that will be deleted in the future

@charleskawczynski charleskawczynski force-pushed the ck/elim_some_cache branch 4 times, most recently from e5109a8 to c9c0fce Compare November 22, 2024 15:35
Remove Viscous/Rayleigh caches entirely

Update compat to be compatible with Spaces.z_max
@charleskawczynski charleskawczynski added this pull request to the merge queue Nov 23, 2024
Merged via the queue into main with commit 00082c0 Nov 23, 2024
16 checks passed
@charleskawczynski charleskawczynski deleted the ck/elim_some_cache branch November 23, 2024 23:17
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.

3 participants