Skip to content

Commit bb97c08

Browse files
Apply formatter
1 parent 4c99d83 commit bb97c08

File tree

1 file changed

+24
-7
lines changed

1 file changed

+24
-7
lines changed

examples/hybrid/plane/inertial_gravity_wave.jl

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function ρfb_init_coefs!(::Type{FT}, params) where {FT}
3131
kz::FT = 2 * π / (2 * z_max) * ikz
3232
ρfb_init_array[ikx + max_ikx + 1, ikz + max_ikz + 1] =
3333
sum(ᶜρb_init_xz) do nt
34-
(;ρ, x, z) = nt
34+
(; ρ, x, z) = nt
3535
ρ / exp(im * (kx * x + kz * z))
3636
end / unit_integral
3737

@@ -193,7 +193,8 @@ function postprocessing(sol, output_dir)
193193
Y = sol.u[iframe]
194194
linear_solution!(Y_lin, lin_cache, t)
195195
println("Error norms at time t = $t:")
196-
for (name, f) in ((:ρ′, ρ′), (:T′, T′), (:u′, u′), (:v′, v′), (:w′, w′))
196+
for (name, f) in
197+
((:ρ′, ρ′), (:T′, T′), (:u′, u′), (:v′, v′), (:w′, w′))
197198
var = f(Y)
198199
var_lin = f(Y_lin)
199200
strings = (
@@ -228,9 +229,17 @@ function postprocessing(sol, output_dir)
228229
end
229230
end
230231
for (ivar, (name, _, _)) in enumerate(anim_vars)
231-
mp4(anims[3 * ivar - 2], joinpath(output_dir, "$(name)_lin.mp4"); fps)
232+
mp4(
233+
anims[3 * ivar - 2],
234+
joinpath(output_dir, "$(name)_lin.mp4");
235+
fps,
236+
)
232237
mp4(anims[3 * ivar - 1], joinpath(output_dir, "$name.mp4"); fps)
233-
mp4(anims[3 * ivar], joinpath(output_dir, "$(name)_rel_err.mp4"); fps)
238+
mp4(
239+
anims[3 * ivar],
240+
joinpath(output_dir, "$(name)_rel_err.mp4");
241+
fps,
242+
)
234243
end
235244
end
236245
end
@@ -277,21 +286,29 @@ function ρfb_init_coefs_params(
277286
ᶜbretherton_factor_pρ = @. exp(-δ * ᶜz / 2)
278287
ᶜρb_init = @. ᶜρ′_init / ᶜbretherton_factor_pρ
279288
end
280-
combine(ρ, lg) = (; ρ, x=lg.coordinates.x, z=lg.coordinates.z)
289+
combine(ρ, lg) = (; ρ, x = lg.coordinates.x, z = lg.coordinates.z)
281290
ᶜρb_init_xz = combine.(ᶜρb_init, ᶜlocal_geometry)
282291

283292
# Fourier coefficients of Bretherton transform of initial perturbation
284293
ρfb_init_array = Array{Complex{FT}}(undef, 2 * max_ikx + 1, 2 * max_ikz + 1)
285294
unit_integral = 2 * sum(one.(ᶜρb_init))
286-
return (; ρfb_init_array, ᶜρb_init_xz, max_ikz, max_ikx, x_max, z_max, unit_integral)
295+
return (;
296+
ρfb_init_array,
297+
ᶜρb_init_xz,
298+
max_ikz,
299+
max_ikx,
300+
x_max,
301+
z_max,
302+
unit_integral,
303+
)
287304
end
288305

289306
function linear_solution_cache(ᶜlocal_geometry, ᶠlocal_geometry)
290307
ᶜz = ᶜlocal_geometry.coordinates.z
291308
ᶠz = ᶠlocal_geometry.coordinates.z
292309
ρfb_init_array_params = ρfb_init_coefs_params()
293310
@time "ρfb_init_coefs!" ρfb_init_coefs!(FT, ρfb_init_array_params)
294-
(;ρfb_init_array ) = ρfb_init_array_params
311+
(; ρfb_init_array) = ρfb_init_array_params
295312
ᶜp₀ = @. p₀(ᶜz)
296313
return (;
297314
# coordinates

0 commit comments

Comments
 (0)