Skip to content

Commit

Permalink
Output the mpi rank to element_variables for visualization
Browse files Browse the repository at this point in the history
  • Loading branch information
amrueda committed Oct 24, 2024
1 parent 4a81e00 commit e11d19c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/solvers/dg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ function get_element_variables!(element_variables, u, mesh, equations,
nothing
end

function get_element_variables!(element_variables, mesh)
nothing
end

function get_node_variables!(node_variables, mesh, equations,
volume_integral::AbstractVolumeIntegral, dg, cache)
nothing
Expand Down Expand Up @@ -427,6 +431,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)
end

function get_node_variables!(node_variables, mesh, equations, dg::DG, cache)
Expand Down
8 changes: 8 additions & 0 deletions src/solvers/dgsem_p4est/dg_3d_parallel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
@muladd begin
#! format: noindent

# Function to output the mpi rank for visualization
function get_element_variables!(element_variables,
mesh::Union{ParallelP4estMesh{3},
ParallelT8codeMesh{3}})
element_variables[:mpi_rank] = mpi_rank()
return nothing
end

function rhs!(du, u, t,
mesh::Union{ParallelP4estMesh{3}, ParallelT8codeMesh{3}}, equations,
boundary_conditions, source_terms::Source,
Expand Down

0 comments on commit e11d19c

Please sign in to comment.