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

Trixi on unstructured mesh of 2d curved quads #500

Merged
merged 59 commits into from
Apr 16, 2021

Conversation

andrewwinters5000
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented Mar 26, 2021

Codecov Report

Merging #500 (30b7559) into main (b31c312) will increase coverage by 0.18%.
The diff coverage is 97.81%.

Impacted file tree graph

@@            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     
Flag Coverage Δ
unittests 93.87% <97.81%> (+0.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/Trixi.jl 100.00% <ø> (ø)
src/mesh/mesh.jl 84.28% <ø> (ø)
src/solvers/dg_common.jl 90.62% <66.66%> (ø)
src/solvers/dg_unstructured_quad/dg.jl 75.00% <75.00%> (ø)
src/solvers/dg_curved/dg_2d.jl 97.67% <80.00%> (ø)
src/solvers/dg_unstructured_quad/containers_2d.jl 95.80% <95.80%> (ø)
src/mesh/unstructured_quad_mesh.jl 98.21% <98.21%> (ø)
src/solvers/dg_unstructured_quad/dg_2d.jl 98.60% <98.60%> (ø)
src/callbacks_step/analysis_dg2d.jl 96.66% <100.00%> (ø)
src/equations/compressible_euler_2d.jl 94.78% <100.00%> (ø)
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b31c312...30b7559. Read the comment docs.

src/solvers/dg_curve_quad/element_geometry.jl Outdated Show resolved Hide resolved
src/solvers/dg_curve_quad/curve_interpolant.jl Outdated Show resolved Hide resolved
src/solvers/dg_curve_quad/element_geometry.jl Outdated Show resolved Hide resolved
src/solvers/dg_curve_quad/element_geometry.jl Outdated Show resolved Hide resolved
src/solvers/dg_curve_quad/element_geometry.jl Outdated Show resolved Hide resolved
… 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
@ranocha ranocha requested a review from sloede April 10, 2021 06:32
ranocha added a commit that referenced this pull request Apr 15, 2021
* 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
Copy link
Member

@sloede sloede left a 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!

docs/src/unstructured_quad_mesh/unstructured_quad_mesh.md Outdated Show resolved Hide resolved
docs/src/unstructured_quad_mesh/unstructured_quad_mesh.md Outdated Show resolved Hide resolved
docs/src/unstructured_quad_mesh/unstructured_quad_mesh.md Outdated Show resolved Hide resolved
examples/2d/elixir_euler_unstructured_quad.jl Outdated Show resolved Hide resolved
src/solvers/dg_unstructured_quad/containers_2d.jl Outdated Show resolved Hide resolved
src/solvers/dg_unstructured_quad/containers_2d.jl Outdated Show resolved Hide resolved
src/solvers/dg_unstructured_quad/dg.jl Show resolved Hide resolved
src/solvers/dg_unstructured_quad/dg_2d.jl Outdated Show resolved Hide resolved
src/solvers/dg_unstructured_quad/dg_element_geometry_2d.jl Outdated Show resolved Hide resolved
@ranocha
Copy link
Member

ranocha commented Apr 15, 2021

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?

Copy link
Member

@ranocha ranocha left a 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.

@ranocha ranocha marked this pull request as ready for review April 15, 2021 16:46
@andrewwinters5000
Copy link
Member Author

example_mesh

Copy link
Member

@ranocha ranocha left a 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.

examples/2d/elixir_euler_unstructured_quad.jl Outdated Show resolved Hide resolved
examples/2d/elixir_euler_unstructured_quad_periodic.jl Outdated Show resolved Hide resolved
src/mesh/surface_interpolant.jl Outdated Show resolved Hide resolved
src/mesh/surface_interpolant.jl Outdated Show resolved Hide resolved
@ranocha ranocha enabled auto-merge (squash) April 16, 2021 10:23
@ranocha ranocha requested a review from sloede April 16, 2021 10:32
Copy link
Member

@sloede sloede left a comment

Choose a reason for hiding this comment

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

🎉

@ranocha ranocha merged commit f86bacc into trixi-framework:main Apr 16, 2021
@andrewwinters5000 andrewwinters5000 deleted the curved_trixi branch April 29, 2021 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants