@@ -31,7 +31,7 @@ function ρfb_init_coefs!(::Type{FT}, params) where {FT}
31
31
kz:: FT = 2 * π / (2 * z_max) * ikz
32
32
ρfb_init_array[ikx + max_ikx + 1 , ikz + max_ikz + 1 ] =
33
33
sum (ᶜρb_init_xz) do nt
34
- (;ρ, x, z) = nt
34
+ (; ρ, x, z) = nt
35
35
ρ / exp (im * (kx * x + kz * z))
36
36
end / unit_integral
37
37
@@ -193,7 +193,8 @@ function postprocessing(sol, output_dir)
193
193
Y = sol. u[iframe]
194
194
linear_solution! (Y_lin, lin_cache, t)
195
195
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′))
197
198
var = f (Y)
198
199
var_lin = f (Y_lin)
199
200
strings = (
@@ -228,9 +229,17 @@ function postprocessing(sol, output_dir)
228
229
end
229
230
end
230
231
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
+ )
232
237
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
+ )
234
243
end
235
244
end
236
245
end
@@ -277,21 +286,29 @@ function ρfb_init_coefs_params(
277
286
ᶜbretherton_factor_pρ = @. exp (- δ * ᶜz / 2 )
278
287
ᶜρb_init = @. ᶜρ′_init / ᶜbretherton_factor_pρ
279
288
end
280
- combine (ρ, lg) = (; ρ, x= lg. coordinates. x, z= lg. coordinates. z)
289
+ combine (ρ, lg) = (; ρ, x = lg. coordinates. x, z = lg. coordinates. z)
281
290
ᶜρb_init_xz = combine .(ᶜρb_init, ᶜlocal_geometry)
282
291
283
292
# Fourier coefficients of Bretherton transform of initial perturbation
284
293
ρfb_init_array = Array {Complex{FT}} (undef, 2 * max_ikx + 1 , 2 * max_ikz + 1 )
285
294
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
+ )
287
304
end
288
305
289
306
function linear_solution_cache (ᶜlocal_geometry, ᶠlocal_geometry)
290
307
ᶜz = ᶜlocal_geometry. coordinates. z
291
308
ᶠz = ᶠlocal_geometry. coordinates. z
292
309
ρfb_init_array_params = ρfb_init_coefs_params ()
293
310
@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
295
312
ᶜp₀ = @. p₀ (ᶜz)
296
313
return (;
297
314
# coordinates
0 commit comments