Skip to content

A rework for the advection module that (should) improve WENO performance #4434

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

Draft
wants to merge 197 commits into
base: main
Choose a base branch
from

Conversation

simone-silvestri
Copy link
Collaborator

This PR reworks how advection is implemented by passing a reduced_order integer to the interpolate functions.

At the moment, upwind and centered reconstruction do not formally change; the ifelse that was upstream before in the alt_interpolate functions is just pushed downstream in the reconstruction function.

For WENO, the reconstruction approach changes because the order is accounted for by changing the reconstruction coefficients and the smoothness coefficients.
This method should give us a boost in performance in the WENO case for bounded and immersed boundary grids, as there is much less computation to be performed. I will post some benchmarking later on.

This PR is still exploratory, so there is a bit of benchmarking and cleaning up to do.

@simone-silvestri
Copy link
Collaborator Author

simone-silvestri commented Apr 24, 2025

Results of benchmarking:

  • The diff_periodic_output.txt which is marginally affected by this PR (in the vertical direction only), shows and improvement of around 30% for tracer kernels and 10% for velocity kernels

  • To confirm this, the periodic_cheap_advection_output.txt which should not be affected at all by this PR, ideed shows ony a very mild improvement for both tracers and velocity kernels (about 3%) which is comparable to noise (altough is consistent between kernels)

  • The diff_bounded_output.txt which should be affected by this PR, shows an improvement of about 60% for tracer kernels and 20% for velocity kernels.

  • The diff_immersed_output.txt which sohuld be very much affected by this PR yields an improvement of about 80% (and more) for the tracer kernels and about 30% for the velocity kernels

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
benchmark performance runs preconfigured benchamarks and spits out timing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants