-
Notifications
You must be signed in to change notification settings - Fork 105
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
WIP: Add FV method for T8codeMesh #1844
base: main
Are you sure you want to change the base?
Conversation
Review checklistThis checklist is meant to assist creators of PRs (to let them know what reviewers will typically look for) and reviewers (to guide them in a structured review process). Items do not need to be checked explicitly for a PR to be eligible for merging. Purpose and scope
Code quality
Documentation
Testing
Performance
Verification
Created with ❤️ by the Trixi.jl community. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1844 +/- ##
==========================================
- Coverage 96.32% 86.80% -9.52%
==========================================
Files 470 476 +6
Lines 37485 38502 +1017
==========================================
- Hits 36106 33420 -2686
- Misses 1379 5082 +3703
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
src/meshes/t8code_mesh.jl
Outdated
# Simple meshes | ||
# Temporary routines to create simple `cmesh`s by hand | ||
|
||
# Directly ported from: `src/t8_cmesh/t8_cmesh_examples.c: t8_cmesh_new_periodic_hybrid`. | ||
function cmesh_new_periodic_hybrid(comm)::t8_cmesh_t | ||
n_dims = 2 | ||
vertices = [ # Just all vertices of all trees. partly duplicated | ||
-1.0, -1.0, 0, # tree 0, triangle | ||
0, -1.0, 0, | ||
0, 0, 0, | ||
-1.0, -1.0, 0, # tree 1, triangle |
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.
The following 300 lines are just by-hand building routines for simple cmesh
s. This is only temporary and will be deleted in the future.
function integrate_via_indices(func::Func, u, | ||
mesh::T8codeMesh, equations, | ||
solver::FV, cache, args...; | ||
normalize = true) where {Func} |
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.
TODO: Relocate this routine, calc_error_norms
and analyze
to analysis.jl
since they are dimension independent.
After c4a4813, doing some validation: Convergence test
non-periodic domain:
Second order with
When I remove the limiting completely by
Free stream preservation:
|
mesh.tree_node_coordinates = tree_node_coordinates | ||
mesh.max_number_faces = 2 * NDIMS # TODO: How to automatically adapt for other element types, e.g. triangles? |
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.
Is there a t8code routine that gives the maximum number of faces of all elements in a forest?
@jmark Could these issues be fixed by your PR we discussed yesterday? Or are they likely to be caused by the same (or similar) causes? |
Actually, the PR we talked about was the reason I added the lines in the first place. After failing, I was not sure, it should work in my examples at all, so I removed it again. Long story short, I'm aware of the merged PR, and I am in contact with @jmark. |
This PR adds the implementation of a first-order and second order finite volume scheme.
The mesh is organized with t8code. Therefore, it supports MPI parallelization.
Visualization is implemented using a t8code routine directly and therefore without .h5 files and Trixi2Vtk.
Validation is done in comments.
TODOs:
convergence_test
works parallel. If I remember correctly, it doesn't. Update: Seems to work now.