Skip to content

Commit

Permalink
Cleaning up of the coupled semidiscretization.
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCan committed Nov 8, 2023
1 parent eb14606 commit 20a1676
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/semidiscretization/semidiscretization_coupled.jl
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ end
@inline function rhs!(u_ode, du_ode, t, semi, i, semi_, semi_tuple...)
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.semis[i], t)
if length(semi_tuple) > 0
rhs!(u_ode, du_ode, t, semi, i+1, semi.semis)
rhs!(du_loc, u_loc, semi_, t)
if i < nsystems(semi)
rhs!(u_ode, du_ode, t, semi, i+1, semi_tuple...)
end
end

Expand All @@ -159,19 +159,11 @@ function rhs!(du_ode, u_ode, semi::SemidiscretizationCoupled, t)

time_start = time_ns()

# @trixi_timeit timer() "copy to coupled boundaries" begin

foreach(semi_ -> copy_to_coupled_boundary!(semi_.boundary_conditions, u_ode, semi), semi.semis)

# Call rhs! for each semidiscretization
rhs!(u_ode, du_ode, t, semi, 1, semi.semis...)

# for i in eachsystem(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.semis[i], t)
# end

runtime = time_ns() - time_start
put!(semi.performance_counter, runtime)

Expand Down

0 comments on commit 20a1676

Please sign in to comment.