-
Notifications
You must be signed in to change notification settings - Fork 4
Add turbo version of baroclinic instability #128
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## ma/patch #128 +/- ##
============================================
- Coverage 97.30% 92.00% -5.31%
============================================
Files 30 31 +1
Lines 3903 4128 +225
============================================
Hits 3798 3798
- Misses 105 330 +225 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| # For optimal results consider increasing the resolution to 16x16x8 trees per cube face, i.e., | ||
| # set `trees_per_cube_face = (16, 8)` below. | ||
| # | ||
| # This elixir takes about 8 hours, using 16 threads of an AMD Ryzen 7 7800X3D. |
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.
| # This elixir takes about 8 hours, using 16 threads of an AMD Ryzen 7 7800X3D. | |
| # This elixir takes about 1 hours, using 16 threads of an AMD Ryzen 7 7800X3D. |
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.
Are you still using the same hardware as described there?
| @inline Trixi.combine_conservative_and_nonconservative_fluxes(::typeof(flux_kennedy_gruber_souza_etal_turbo), | ||
| equations::CompressibleEulerEnergyEquationsWithGravity3D) = Trixi.True() | ||
|
|
||
| @inline function flux_lmars_turbo(u_ll, u_rr, normal_direction, equations) | ||
| flux = FluxLMARS(340)(u_ll, u_rr, normal_direction, equations) | ||
| return flux, flux | ||
| end | ||
|
|
||
| @inline Trixi.combine_conservative_and_nonconservative_fluxes(::typeof(flux_lmars_turbo), equations::CompressibleEulerEnergyEquationsWithGravity3D) = Trixi.True() | ||
|
|
||
| @inline function boundary_condition_slip_wall(u_inner, | ||
| normal_direction::AbstractVector, | ||
| x, t, | ||
| surface_flux_function::typeof(flux_lmars_turbo), | ||
| equations::CompressibleEulerEnergyEquationsWithGravity3D) |
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.
Can you please add a comment describing what you are doing here and why?
| # Unperturbed balanced steady-state. | ||
| # Returns primitive variables with only the velocity in longitudinal direction (rho, u, p). | ||
| # The other velocity components are zero. |
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.
I guess the remaining part is just copied from another elixir?
| using Trixi: True, get_contravariant_vector, multiply_add_to_node_vars!, @threaded, | ||
| get_surface_node_vars, get_normal_direction, get_node_coords, @turbo, PtrArray, | ||
| StrideArray |
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.
| using Trixi: True, get_contravariant_vector, multiply_add_to_node_vars!, @threaded, | |
| get_surface_node_vars, get_normal_direction, get_node_coords, @turbo, PtrArray, | |
| StrideArray | |
| using Trixi: True, get_contravariant_vector, multiply_add_to_node_vars!, @threaded, | |
| get_surface_node_vars, get_normal_direction, get_node_coords, @turbo, PtrArray, | |
| StrideArray, flux_kennedy_gruber |
| @test_allocations(TrixiAtmo.Trixi.rhs!, semi, sol, 100) | ||
| end | ||
|
|
||
| @trixi_testset "elixir_euler_energy_baroclinic_instability" begin |
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.
| @trixi_testset "elixir_euler_energy_baroclinic_instability" begin | |
| @trixi_testset "elixir_euler_energy_baroclinic_instability with turbo flux" begin |
In this PR the new performance specialization for the nonconservative fluxes is being used, along with the definition of a new turbo flux, based on the same principles.