@@ -272,11 +272,7 @@ function semidiscretize(semi, tspan; reset_threads=true)
272272 # Therefore, we have to re-link them, which yields yet another `Semidiscretization`.
273273 # Note that this re-creates systems containing links, so it only works as long
274274 # as systems don't link to other systems containing links.
275- semi_new = Semidiscretization (set_system_links .(semi_. systems, Ref (semi_)),
276- semi_. ranges_u, semi_. ranges_v,
277- semi_. neighborhood_searches,
278- semi_. parallelization_backend,
279- semi_. update_callback_used, semi_. integrate_tlsph)
275+ semi_new = @set semi_. systems = set_system_links .(semi_. systems, Ref (semi_))
280276
281277 @info " To move data to the GPU, `semidiscretize` creates a deep copy of the passed " *
282278 " `Semidiscretization`. Use `semi = ode.p` to access simulation data."
@@ -822,26 +818,10 @@ end
822818# After `adapt`, the system type information may change.
823819# This means that systems linking to other systems still point to old systems.
824820# Therefore, we have to re-link them based on the stored system index.
825- set_system_links (system, semi) = system
826-
827821function set_system_links (system:: OpenBoundarySystem , semi)
828822 fluid_system = semi. systems[system. fluid_system_index[]]
829823
830- return OpenBoundarySystem (system. boundary_model,
831- system. initial_condition,
832- fluid_system, # link to fluid system
833- system. fluid_system_index,
834- system. smoothing_kernel,
835- system. smoothing_length,
836- system. mass,
837- system. volume,
838- system. boundary_candidates,
839- system. fluid_candidates,
840- system. boundary_zone_indices,
841- system. boundary_zones,
842- system. buffer,
843- system. pressure_acceleration_formulation,
844- system. shifting_technique,
845- system. calculate_flow_rate,
846- system. cache)
824+ return @set system. fluid_system = fluid_system
847825end
826+
827+ set_system_links (system, semi) = system
0 commit comments