-
Notifications
You must be signed in to change notification settings - Fork 9
Well-balanced mortars #45
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
Well-balanced mortars #45
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #45 +/- ##
========================================
Coverage 99.32% 99.33%
========================================
Files 60 66 +6
Lines 2801 3115 +314
========================================
+ Hits 2782 3094 +312
- Misses 19 21 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The current version provides a well-balanced approximation for a fully wet configuration. The
The modification below in Trixi's # Create mortar container and initialize mortar data.
function init_mortars(mesh::Union{P4estMesh, T8codeMesh}, equations, basis, elements)
NDIMS = ndims(elements)
uEltype = eltype(elements)
# Initialize container
n_mortars = count_required_surfaces(mesh).mortars
_u = Vector{uEltype}(undef,
3 * nvariables(equations) * 2^(NDIMS - 1) *
nnodes(basis)^(NDIMS - 1) * n_mortars)
u = unsafe_wrap(Array, pointer(_u),
(3, nvariables(equations), 2^(NDIMS - 1),
ntuple(_ -> nnodes(basis), NDIMS - 1)..., n_mortars))
_neighbor_ids = Vector{Int}(undef, (2^(NDIMS - 1) + 1) * n_mortars)
neighbor_ids = unsafe_wrap(Array, pointer(_neighbor_ids),
(2^(NDIMS - 1) + 1, n_mortars))
_node_indices = Vector{NTuple{NDIMS, Symbol}}(undef, 2 * n_mortars)
node_indices = unsafe_wrap(Array, pointer(_node_indices), (2, n_mortars))
mortars = P4estMortarContainer{NDIMS, uEltype, NDIMS + 1, NDIMS + 3}(u,
neighbor_ids,
node_indices,
_u,
_neighbor_ids,
_node_indices)
if n_mortars > 0
init_mortars!(mortars, mesh)
end
return mortars
end UPDATE: This can be ignored as a new |
…wWater.jl into wb-mortars
I wonder if all the coveralls "noise" in the CI means we should update the reporting strategy as mentioned here |
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.
From my end this looks almost ready to merge. I just have a question and one comment that needs to be changed.
examples/p4est_2d_dgsem/elixir_shallowwater_well_balanced_nonconforming.jl
Show resolved
Hide resolved
Since the coverage issue has been solved by setting a higher |
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.
Do you want me to review the PR again? If so, please let me know (and tell me whether there is anything in particular you where you would like to have feedback). Otherwise, I am fine merging this PR when the remaining comments of Patrick are resolved.
Thanks a lot @ranocha and @patrickersing for your help getting this experimental feature over the finish line! |
9cb0e39
into
trixi-framework:main
This seeks to rewrite the mortar projection routines specifically for the shallow water equations to preserve well-balancedness with non-conforming approximations. That is, the shallow water solver could utilize the AMR capabilities of
TreeMesh
orP4estMesh
. The implementation might become delicate at wet/dry transition regions as one needs to take care in what solution values and/or fluxes are projected to and from the mortar while maintaining positivity.src/solvers
folderImplement and test onSave for a future PRTreeMesh
in 2DP4estMesh
in 2DFurther explorations and improvements are discussed in #77