Skip to content

Commit

Permalink
Use the right array data structure for the mpi rank
Browse files Browse the repository at this point in the history
  • Loading branch information
amrueda committed Oct 28, 2024
1 parent 9559793 commit d1f6d44
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/solvers/dg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ end
# Function to define "element variables" for the SaveSolutionCallback. It does
# nothing by default, but can be specialized for certain mesh types. For instance,
# parallel meshes output the mpi rank as an "element variable".
function get_element_variables!(element_variables, mesh)
function get_element_variables!(element_variables, mesh, dg, cache)
nothing
end

Expand Down Expand Up @@ -438,7 +438,7 @@ Base.summary(io::IO, dg::DG) = print(io, "DG(" * summary(dg.basis) * ")")
function get_element_variables!(element_variables, u, mesh, equations, dg::DG, cache)
get_element_variables!(element_variables, u, mesh, equations, dg.volume_integral,
dg, cache)
get_element_variables!(element_variables, mesh)
get_element_variables!(element_variables, mesh, dg, cache)
end

function get_node_variables!(node_variables, mesh, equations, dg::DG, cache)
Expand Down
6 changes: 4 additions & 2 deletions src/solvers/dgsem_tree/dg_parallel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
# Function to output the mpi rank for visualization
function get_element_variables!(element_variables,
mesh::Union{ParallelTreeMesh, ParallelP4estMesh,
ParallelT8codeMesh})
element_variables[:mpi_rank] = mpi_rank()
ParallelT8codeMesh},
dg, cache)
element_variables[:mpi_rank] = fill(mpi_rank(),
SVector{nelements(mesh, dg, cache), real(dg)})
return nothing
end

Expand Down

0 comments on commit d1f6d44

Please sign in to comment.