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

Variable namings within MPIInterfaceContainer2D, MPIL2MortarContainer2D #2040

Closed
DanielDoehring opened this issue Aug 15, 2024 · 1 comment · Fixed by #2059
Closed

Variable namings within MPIInterfaceContainer2D, MPIL2MortarContainer2D #2040

DanielDoehring opened this issue Aug 15, 2024 · 1 comment · Fixed by #2059
Labels
discussion low-priority parallelization Related to MPI, threading, tasks etc.

Comments

@DanielDoehring
Copy link
Contributor

I think local_neighbor_ids in MPIInterfaceContainer2D and MPIL2MortarContainer2D is a bit of a misnomer, as the global element ids are stored in those datastructures:

mpi_interfaces.local_neighbor_ids[count] = element

local_neighbor_ids = Vector{Int}()
local_neighbor_positions = Vector{Int}()
if is_own_cell(mesh.tree, lower_cell_id)
push!(local_neighbor_ids, c2e[lower_cell_id])
push!(local_neighbor_positions, 1)
end
if is_own_cell(mesh.tree, upper_cell_id)
push!(local_neighbor_ids, c2e[upper_cell_id])
push!(local_neighbor_positions, 2)
end
if is_own_cell(mesh.tree, large_cell_id)
push!(local_neighbor_ids, c2e[large_cell_id])
push!(local_neighbor_positions, 3)
end
mpi_mortars.local_neighbor_ids[count] = local_neighbor_ids

In contrast, the stored quantities for the P4est version seem truly local:

mpi_interfaces.local_neighbor_ids[mpi_interface_id] = local_quad_id + 1

local_neighbor_ids = local_small_quad_ids .+ 1
local_neighbor_positions = local_small_quad_positions
# Add large element information if it is locally available
if local_large_quad_id > -1
push!(local_neighbor_ids, local_large_quad_id + 1) # convert to 1-based index
push!(local_neighbor_positions, 2^(ndims(mesh)-1) + 1)
end
mpi_mortars.local_neighbor_ids[mpi_mortar_id] = local_neighbor_ids

Xref: https://github.com/trixi-framework/Trixi.jl/pull/1097/files

@ranocha
Copy link
Member

ranocha commented Aug 15, 2024

Could you please add this to the agenda of one of our next developer meetings? Ideally, when @sloede is back

@DanielDoehring DanielDoehring added the parallelization Related to MPI, threading, tasks etc. label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion low-priority parallelization Related to MPI, threading, tasks etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants