-
Notifications
You must be signed in to change notification settings - Fork 109
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
Trixi on unstructured mesh of 2d curved quads #500
Trixi on unstructured mesh of 2d curved quads #500
Conversation
Codecov Report
@@ Coverage Diff @@
## main #500 +/- ##
==========================================
+ Coverage 93.69% 93.87% +0.18%
==========================================
Files 130 138 +8
Lines 13219 13799 +580
==========================================
+ Hits 12385 12954 +569
- Misses 834 845 +11
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
… initial condtion at future times
…the existing Trixi formulations
… interfaces into two container types. periodic coupling now built inside the mesh constructor
…ation is stored. now matches better to Tree Trixi
…an and calc_sources to save on code duplication
…d in the future to avoid code duplication
* Update styleguide.md As discussed in #500 (comment) * Update docs/src/styleguide.md Co-authored-by: Michael Schlottke-Lakemper <[email protected]>
… Unified how the rotation works across Unstrucutred and CurvedMesh. Also updated the comments in rotate_to_x and rotate_from_x to better reflect what is happening
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've left a few comments and questions, but nothing major... LGTM in general!
Just for clarification: @andrewwinters5000, you ask us to review this PR since everything is ready from your side, isn't it? Or is there something else you would like to change before we shall (squash-)merge this PR? |
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.
Once the comments of @sloede are resolved, we can go forward and squash-merge this! Great work, @andrewwinters5000 👍 Then, we should continue to resolve the issues collected in #542.
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.
Some benchmarks:
Using GammaCurve
:
julia> using Revise, BenchmarkTools; using Trixi
julia> trixi_include("examples/2d/elixir_euler_unstructured_quad.jl")
julia> @benchmark UnstructuredQuadMesh($"examples/2d/BoxAroundCircle8.mesh", $false)
BenchmarkTools.Trial:
memory estimate: 213.86 KiB
allocs estimate: 2416
--------------
minimum time: 350.433 μs (0.00% GC)
median time: 360.030 μs (0.00% GC)
mean time: 395.716 μs (4.70% GC)
maximum time: 9.321 ms (90.49% GC)
--------------
samples: 10000
evals/sample: 1
julia> @benchmark Trixi.init_elements(
$(Float64),
$(Float64),
$(mesh),
$(solver.basis.nodes),
$(nvariables(equations)),
$(nnodes(solver)-1))
BenchmarkTools.Trial:
memory estimate: 132.83 KiB
allocs estimate: 18
--------------
minimum time: 702.831 μs (0.00% GC)
median time: 721.660 μs (0.00% GC)
mean time: 756.933 μs (0.42% GC)
maximum time: 3.881 ms (71.27% GC)
--------------
samples: 6604
evals/sample: 1
Using CurvedSurface
:
julia> using Revise, BenchmarkTools; using Trixi
julia> trixi_include("examples/2d/elixir_euler_unstructured_quad.jl")
julia> @benchmark UnstructuredQuadMesh($"examples/2d/mesh_euler_unstructured_quad.mesh", $false)
BenchmarkTools.Trial:
memory estimate: 189.16 KiB
allocs estimate: 2502
--------------
minimum time: 348.237 μs (0.00% GC)
median time: 360.937 μs (0.00% GC)
mean time: 398.437 μs (4.48% GC)
maximum time: 10.105 ms (88.14% GC)
--------------
samples: 10000
evals/sample: 1
julia> @benchmark Trixi.init_elements(
$(Float64),
$(Float64),
$(mesh),
$(solver.basis.nodes),
$(nvariables(equations)),
$(nnodes(solver)-1))
BenchmarkTools.Trial:
memory estimate: 132.83 KiB
allocs estimate: 18
--------------
minimum time: 843.255 μs (0.00% GC)
median time: 865.961 μs (0.00% GC)
mean time: 906.488 μs (0.37% GC)
maximum time: 3.492 ms (69.56% GC)
--------------
samples: 5516
evals/sample: 1
Looks reasonable to me and doesn't seem to be a huge bottleneck right now, so that's fine. I didn't see any obvious type instabilities etc. Please find below some additional comments.
src/solvers/dg_unstructured_quad/mappings_geometry_curved_2d.jl
Outdated
Show resolved
Hide resolved
src/solvers/dg_unstructured_quad/mappings_geometry_curved_2d.jl
Outdated
Show resolved
Hide resolved
src/solvers/dg_unstructured_quad/mappings_geometry_straight_2d.jl
Outdated
Show resolved
Hide resolved
src/solvers/dg_unstructured_quad/mappings_geometry_straight_2d.jl
Outdated
Show resolved
Hide resolved
src/solvers/dg_unstructured_quad/mappings_geometry_straight_2d.jl
Outdated
Show resolved
Hide resolved
src/solvers/dg_unstructured_quad/mappings_geometry_straight_2d.jl
Outdated
Show resolved
Hide resolved
…emoved NNODES from CurvedSurface struct
…into curved_trixi
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.
🎉
No description provided.