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

Reduce allocations in divf2c #687

Closed
Tracked by #684
kmdeck opened this issue Jul 2, 2024 · 0 comments · Fixed by #840
Closed
Tracked by #684

Reduce allocations in divf2c #687

kmdeck opened this issue Jul 2, 2024 · 0 comments · Fixed by #840
Labels
enhancement New feature or request

Comments

@kmdeck
Copy link
Member

kmdeck commented Jul 2, 2024

In our tendency functions and Jacobians, we have

top_bc = p.top_bc # scalar field
bottom_bc = p.bottom_bc # scalar field
divf2c =  Operators.DivergenceF2C(
            top = Operators.SetValue(Geometry.WVector.(top_bc)),
            bottom = Operators.SetValue(Geometry.WVector.(bottom_bc)),)

This is allocationg. We need to either make p.top_bc a field of WVectors, or else cache two fields of WVectors. This appears now in the soil implicit tendency (2x), soil jacobian (2x), and soil CO2 tendency (1x). so it may be worth doing something about.

@kmdeck kmdeck added the enhancement New feature or request label Jul 2, 2024
@kmdeck kmdeck mentioned this issue Jul 2, 2024
36 tasks
@kmdeck kmdeck linked a pull request Oct 14, 2024 that will close this issue
1 task
@kmdeck kmdeck closed this as completed Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant