Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
benegee committed Sep 5, 2024
1 parent 7154dae commit ff513ba
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/callbacks_step/analysis_dg2d_parallel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ function integrate_via_indices(func::Func, u,
normalize = normalize)

# OBS! Global results are only calculated on MPI root, all other domains receive `nothing`
global_integral = MPI.Reduce!(Ref(local_integral), reduce_vector_plus, mpi_root(), mpi_comm())
global_integral = MPI.Reduce!(Ref(local_integral), reduce_vector_plus, mpi_root(),
mpi_comm())
if mpi_isroot()
integral = convert(typeof(local_integral), global_integral[])
else
Expand Down Expand Up @@ -195,7 +196,8 @@ function integrate_via_indices(func::Func, u,
end
end

global_integral = MPI.Reduce!(Ref(integral), reduce_vector_plus, mpi_root(), mpi_comm())
global_integral = MPI.Reduce!(Ref(integral), reduce_vector_plus, mpi_root(),
mpi_comm())
total_volume = MPI.Reduce(volume, +, mpi_root(), mpi_comm())
if mpi_isroot()
integral = convert(typeof(integral), global_integral[])
Expand Down

0 comments on commit ff513ba

Please sign in to comment.