Skip to content

Commit

Permalink
Fix timings for SemidiscretizationCoupled (#1978)
Browse files Browse the repository at this point in the history
  • Loading branch information
efaulhaber authored Jun 14, 2024
1 parent 7b57dd5 commit 961f64b
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/semidiscretization/semidiscretization_coupled.jl
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ end

"""
ndofsglobal(semi::SemidiscretizationCoupled)
Return the global number of degrees of freedom associated with each scalar variable across all MPI ranks, and summed up over all coupled systems.
This is the same as [`ndofs`](@ref) for simulations running in serial or
parallelized via threads. It will in general be different for simulations
Expand Down Expand Up @@ -180,12 +180,10 @@ function rhs!(du_ode, u_ode, semi::SemidiscretizationCoupled, t)
end

# Call rhs! for each semidiscretization
@trixi_timeit timer() "copy to coupled boundaries" begin
foreach_enumerate(semi.semis) do (i, semi_)
u_loc = get_system_u_ode(u_ode, i, semi)
du_loc = get_system_u_ode(du_ode, i, semi)
rhs!(du_loc, u_loc, semi_, t)
end
foreach_enumerate(semi.semis) do (i, semi_)
u_loc = get_system_u_ode(u_ode, i, semi)
du_loc = get_system_u_ode(du_ode, i, semi)
rhs!(du_loc, u_loc, semi_, t)
end

runtime = time_ns() - time_start
Expand Down

0 comments on commit 961f64b

Please sign in to comment.