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

Output the mpi rank to element_variables (SaveSolutionCallback) for visualization with trixi2vtk #2132

Merged
merged 10 commits into from
Nov 18, 2024
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)
amrueda marked this conversation as resolved.
Show resolved Hide resolved
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
Loading