Skip to content

Commit

Permalink
friendlier for gpu (#3528)
Browse files Browse the repository at this point in the history
  • Loading branch information
navidcy authored Apr 1, 2024
1 parent 4367d42 commit fc871ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/kelvin_helmholtz_instability.jl
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ function estimate_growth_rate(simulation, energy, ω, b; convergence_criterion=1
σ = []
power_method_data = []
compute!(ω)
push!(power_method_data, (ω=collect(interior)[:, 1, :]), b=collect(interior(b)[:, 1, :]), σ=deepcopy(σ)))
push!(power_method_data, (ω=collect(interior, :, 1, :)), b=collect(interior(b, :, 1, :)), σ=deepcopy(σ)))

while convergence(σ) > convergence_criterion
compute!(energy)
Expand All @@ -267,7 +267,7 @@ function estimate_growth_rate(simulation, energy, ω, b; convergence_criterion=1

compute!(ω)
rescale!(simulation.model, energy)
push!(power_method_data, (ω=collect(interior)[:, 1, :]), b=collect(interior(b)[:, 1, :]), σ=deepcopy(σ)))
push!(power_method_data, (ω=collect(interior, :, 1, :)), b=collect(interior(b, :, 1, :)), σ=deepcopy(σ)))
end

return σ, power_method_data
Expand Down

0 comments on commit fc871ef

Please sign in to comment.