Skip to content

Commit 4cc3a6b

Browse files
committed
style: apply ffmt v0.4.0 formatting to refactored files
1 parent 9d2223f commit 4cc3a6b

7 files changed

Lines changed: 56 additions & 59 deletions

File tree

src/pre_process/m_assign_variables.fpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,15 @@ contains
9797
9898
do i = 1, eqn_idx%E - eqn_idx%mom%beg
9999
q_prim_vf(i + 1)%sf(j, k, l) = 1._wp/q_prim_vf(1)%sf(j, k, &
100-
& l)*(eta*patch_icpp(patch_id)%rho*patch_icpp(patch_id)%vel(i) + (1._wp - eta)*patch_icpp(smooth_patch_id) &
101-
& %rho*patch_icpp(smooth_patch_id)%vel(i))
100+
& l)*(eta*patch_icpp(patch_id)%rho*patch_icpp(patch_id)%vel(i) + (1._wp - eta) &
101+
& *patch_icpp(smooth_patch_id)%rho*patch_icpp(smooth_patch_id)%vel(i))
102102
end do
103103
104104
q_prim_vf(eqn_idx%gamma)%sf(j, k, l) = eta*patch_icpp(patch_id)%gamma + (1._wp - eta)*patch_icpp(smooth_patch_id)%gamma
105105
106106
q_prim_vf(eqn_idx%E)%sf(j, k, l) = 1._wp/q_prim_vf(eqn_idx%gamma)%sf(j, k, &
107-
& l)*(eta*patch_icpp(patch_id)%gamma*patch_icpp(patch_id)%pres + (1._wp - eta)*patch_icpp(smooth_patch_id) &
108-
& %gamma*patch_icpp(smooth_patch_id)%pres)
107+
& l)*(eta*patch_icpp(patch_id)%gamma*patch_icpp(patch_id)%pres + (1._wp - eta) &
108+
& *patch_icpp(smooth_patch_id)%gamma*patch_icpp(smooth_patch_id)%pres)
109109
110110
q_prim_vf(eqn_idx%pi_inf)%sf(j, k, l) = eta*patch_icpp(patch_id)%pi_inf + (1._wp - eta)*patch_icpp(smooth_patch_id)%pi_inf
111111

src/pre_process/m_icpp_patches.fpp

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,9 @@ contains
316316
& dy)*(sqrt((x%cc(i) - x_centroid)**2 + (y%cc(j) - y_centroid)**2) - radius))*(-0.5_wp) + 0.5_wp
317317
end if
318318
319-
if (((x%cc(i) - x_centroid)**2 + (y%cc(j) - y_centroid)**2 <= radius**2 .and. patch_icpp(patch_id) &
320-
& %alter_patch(patch_id_fp(i, j, 0))) .or. patch_id_fp(i, j, 0) == smooth_patch_id) then
319+
if (((x%cc(i) - x_centroid)**2 + (y%cc(j) - y_centroid)**2 <= radius**2 &
320+
& .and. patch_icpp(patch_id)%alter_patch(patch_id_fp(i, j, 0))) .or. patch_id_fp(i, j, &
321+
& 0) == smooth_patch_id) then
321322
call s_assign_patch_primitive_variables(patch_id, i, j, 0, eta, q_prim_vf, patch_id_fp)
322323
323324
@:analytical()
@@ -367,8 +368,8 @@ contains
367368
do i = 0, m
368369
myr = sqrt((x%cc(i) - x_centroid)**2 + (y%cc(j) - y_centroid)**2)
369370

370-
if (myr <= radius + thickness/2._wp .and. myr >= radius - thickness/2._wp .and. patch_icpp(patch_id) &
371-
& %alter_patch(patch_id_fp(i, j, 0))) then
371+
if (myr <= radius + thickness/2._wp .and. myr >= radius - thickness/2._wp &
372+
& .and. patch_icpp(patch_id)%alter_patch(patch_id_fp(i, j, 0))) then
372373
call s_assign_patch_primitive_variables(patch_id, i, j, 0, eta, q_prim_vf, patch_id_fp)
373374

374375
@:analytical()
@@ -429,8 +430,8 @@ contains
429430
do i = 0, m
430431
myr = sqrt((x%cc(i) - x_centroid)**2 + (y%cc(j) - y_centroid)**2)
431432
432-
if (myr <= radius + thickness/2._wp .and. myr >= radius - thickness/2._wp .and. patch_icpp(patch_id) &
433-
& %alter_patch(patch_id_fp(i, j, k))) then
433+
if (myr <= radius + thickness/2._wp .and. myr >= radius - thickness/2._wp &
434+
& .and. patch_icpp(patch_id)%alter_patch(patch_id_fp(i, j, k))) then
434435
call s_assign_patch_primitive_variables(patch_id, i, j, k, eta, q_prim_vf, patch_id_fp)
435436
436437
@:analytical()
@@ -489,8 +490,9 @@ contains
489490
& + 0.5_wp
490491
end if
491492

492-
if ((((x%cc(i) - x_centroid)/a)**2 + ((y%cc(j) - y_centroid)/b)**2 <= 1._wp .and. patch_icpp(patch_id) &
493-
& %alter_patch(patch_id_fp(i, j, 0))) .or. patch_id_fp(i, j, 0) == smooth_patch_id) then
493+
if ((((x%cc(i) - x_centroid)/a)**2 + ((y%cc(j) - y_centroid)/b)**2 <= 1._wp &
494+
& .and. patch_icpp(patch_id)%alter_patch(patch_id_fp(i, j, 0))) .or. patch_id_fp(i, j, &
495+
& 0) == smooth_patch_id) then
494496
call s_assign_patch_primitive_variables(patch_id, i, j, 0, eta, q_prim_vf, patch_id_fp)
495497

496498
@:analytical()
@@ -558,8 +560,8 @@ contains
558560
& - z_centroid)/c)**2) - 1._wp))*(-0.5_wp) + 0.5_wp
559561
end if
560562
561-
if ((((x%cc(i) - x_centroid)/a)**2 + ((cart_y - y_centroid)/b)**2 + ((cart_z - z_centroid)/c) &
562-
& **2 <= 1._wp .and. patch_icpp(patch_id)%alter_patch(patch_id_fp(i, j, k))) .or. patch_id_fp(i, j, &
563+
if ((((x%cc(i) - x_centroid)/a)**2 + ((cart_y - y_centroid)/b)**2 + ((cart_z - z_centroid)/c)**2 <= 1._wp &
564+
& .and. patch_icpp(patch_id)%alter_patch(patch_id_fp(i, j, k))) .or. patch_id_fp(i, j, &
563565
& k) == smooth_patch_id) then
564566
call s_assign_patch_primitive_variables(patch_id, i, j, k, eta, q_prim_vf, patch_id_fp)
565567
@@ -634,8 +636,8 @@ contains
634636
if ((q_prim_vf(1)%sf(i, j, 0) < 1.e-10) .and. (model_eqns == 4)) then
635637
! zero density, reassign according to Tait EOS
636638
q_prim_vf(1)%sf(i, j, 0) = (((q_prim_vf(eqn_idx%E)%sf(i, j, &
637-
& 0) + pi_inf)/(pref + pi_inf))**(1._wp/lit_gamma))*rhoref*(1._wp - q_prim_vf(eqn_idx%alf) &
638-
& %sf(i, j, 0))
639+
& 0) + pi_inf)/(pref + pi_inf))**(1._wp/lit_gamma))*rhoref*(1._wp &
640+
& - q_prim_vf(eqn_idx%alf)%sf(i, j, 0))
639641
end if
640642

641643
! Updating the patch identities bookkeeping variable
@@ -1067,8 +1069,8 @@ contains
10671069
cart_z = z%cc(k)
10681070
end if
10691071

1070-
if (x_boundary%beg <= x%cc(i) .and. x_boundary%end >= x%cc(i) &
1071-
& .and. y_boundary%beg <= cart_y .and. y_boundary%end >= cart_y .and. z_boundary%beg <= cart_z .and. z_boundary%end >= cart_z) then
1072+
if (x_boundary%beg <= x%cc(i) .and. x_boundary%end >= x%cc(i) .and. y_boundary%beg <= cart_y &
1073+
& .and. y_boundary%end >= cart_y .and. z_boundary%beg <= cart_z .and. z_boundary%end >= cart_z) then
10721074
if (patch_icpp(patch_id)%alter_patch(patch_id_fp(i, j, k))) then
10731075
call s_assign_patch_primitive_variables(patch_id, i, j, k, eta, q_prim_vf, patch_id_fp)
10741076

@@ -1158,12 +1160,11 @@ contains
11581160
end if
11591161
end if
11601162

1161-
if (((.not. f_is_default(length_x) .and. (cart_y - y_centroid)**2 + (cart_z - z_centroid) &
1162-
& **2 <= radius**2 .and. x_boundary%beg <= x%cc(i) .and. x_boundary%end >= x%cc(i)) &
1163-
& .or. (.not. f_is_default(length_y) .and. (x%cc(i) - x_centroid)**2 + (cart_z - z_centroid) &
1164-
& **2 <= radius**2 .and. y_boundary%beg <= cart_y .and. y_boundary%end >= cart_y) &
1165-
& .or. (.not. f_is_default(length_z) .and. (x%cc(i) - x_centroid)**2 + (cart_y - y_centroid) &
1166-
& **2 <= radius**2 .and. z_boundary%beg <= cart_z .and. z_boundary%end >= cart_z) &
1163+
if (((.not. f_is_default(length_x) .and. (cart_y - y_centroid)**2 + (cart_z - z_centroid)**2 <= radius**2 &
1164+
& .and. x_boundary%beg <= x%cc(i) .and. x_boundary%end >= x%cc(i)) .or. (.not. f_is_default(length_y) &
1165+
& .and. (x%cc(i) - x_centroid)**2 + (cart_z - z_centroid)**2 <= radius**2 .and. y_boundary%beg <= cart_y &
1166+
& .and. y_boundary%end >= cart_y) .or. (.not. f_is_default(length_z) .and. (x%cc(i) - x_centroid)**2 &
1167+
& + (cart_y - y_centroid)**2 <= radius**2 .and. z_boundary%beg <= cart_z .and. z_boundary%end >= cart_z) &
11671168
& .and. patch_icpp(patch_id)%alter_patch(patch_id_fp(i, j, k))) .or. patch_id_fp(i, j, &
11681169
& k) == smooth_patch_id) then
11691170
call s_assign_patch_primitive_variables(patch_id, i, j, k, eta, q_prim_vf, patch_id_fp)

src/simulation/m_acoustic_src.fpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ contains
6969
& gauss_sigma_dist(1:num_source), gauss_sigma_time(1:num_source), foc_length(1:num_source), &
7070
& aperture(1:num_source), npulse(1:num_source), pulse(1:num_source), dir(1:num_source), delay(1:num_source), &
7171
& element_polygon_ratio(1:num_source), rotate_angle(1:num_source), element_spacing_angle(1:num_source), &
72-
& num_elements(1:num_source), element_on(1:num_source), bb_num_freq(1:num_source), bb_bandwidth(1:num_source), &
73-
& bb_lowest_freq(1:num_source))
72+
& num_elements(1:num_source), element_on(1:num_source), bb_num_freq(1:num_source), bb_bandwidth(1:num_source), bb_lowest_freq(1:num_source))
7473

7574
do i = 1, num_source
7675
do j = 1, 3

src/simulation/m_cbc.fpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -725,15 +725,15 @@ contains
725725
726726
Ma = vel(dir_idx(1))/c
727727
728-
if ((cbc_loc == -1 .and. bc_${XYZ}$%beg == BC_CHAR_SLIP_WALL) &
729-
& .or. (cbc_loc == 1 .and. bc_${XYZ}$%end == BC_CHAR_SLIP_WALL)) then
728+
if ((cbc_loc == -1 .and. bc_${XYZ}$%beg == BC_CHAR_SLIP_WALL) .or. (cbc_loc == 1 &
729+
& .and. bc_${XYZ}$%end == BC_CHAR_SLIP_WALL)) then
730730
call s_compute_slip_wall_L(lambda, L, rho, c, dpres_ds, dvel_ds)
731-
else if ((cbc_loc == -1 .and. bc_${XYZ}$%beg == BC_CHAR_NR_SUB_BUFFER) &
732-
& .or. (cbc_loc == 1 .and. bc_${XYZ}$%end == BC_CHAR_NR_SUB_BUFFER)) then
731+
else if ((cbc_loc == -1 .and. bc_${XYZ}$%beg == BC_CHAR_NR_SUB_BUFFER) .or. (cbc_loc == 1 &
732+
& .and. bc_${XYZ}$%end == BC_CHAR_NR_SUB_BUFFER)) then
733733
call s_compute_nonreflecting_subsonic_buffer_L(lambda, L, rho, c, mf, dalpha_rho_ds, dpres_ds, &
734734
& dvel_ds, dadv_ds, dYs_ds)
735-
else if ((cbc_loc == -1 .and. bc_${XYZ}$%beg == BC_CHAR_NR_SUB_INFLOW) &
736-
& .or. (cbc_loc == 1 .and. bc_${XYZ}$%end == BC_CHAR_NR_SUB_INFLOW)) then
735+
else if ((cbc_loc == -1 .and. bc_${XYZ}$%beg == BC_CHAR_NR_SUB_INFLOW) .or. (cbc_loc == 1 &
736+
& .and. bc_${XYZ}$%end == BC_CHAR_NR_SUB_INFLOW)) then
737737
call s_compute_nonreflecting_subsonic_inflow_L(lambda, L, rho, c, dpres_ds, dvel_ds)
738738
! Add GRCBC for Subsonic Inflow
739739
if (bc_${XYZ}$%grcbc_in) then
@@ -759,8 +759,8 @@ contains
759759
& dir_idx(1))*sign(1, &
760760
& cbc_loc))/Del_in(${CBC_DIR}$) + c*(1._wp + Ma)*(pres - pres_in(${CBC_DIR}$))/Del_in(${CBC_DIR}$)
761761
end if
762-
else if ((cbc_loc == -1 .and. bc_${XYZ}$%beg == BC_CHAR_NR_SUB_OUTFLOW) &
763-
& .or. (cbc_loc == 1 .and. bc_${XYZ}$%end == BC_CHAR_NR_SUB_OUTFLOW)) then
762+
else if ((cbc_loc == -1 .and. bc_${XYZ}$%beg == BC_CHAR_NR_SUB_OUTFLOW) .or. (cbc_loc == 1 &
763+
& .and. bc_${XYZ}$%end == BC_CHAR_NR_SUB_OUTFLOW)) then
764764
call s_compute_nonreflecting_subsonic_outflow_L(lambda, L, rho, c, mf, dalpha_rho_ds, dpres_ds, &
765765
& dvel_ds, dadv_ds, dYs_ds)
766766
! Add GRCBC for Subsonic Outflow (Pressure)
@@ -773,19 +773,19 @@ contains
773773
& + vel_out(${CBC_DIR}$, dir_idx(1))*sign(1, cbc_loc))/Del_out(${CBC_DIR}$)
774774
end if
775775
end if
776-
else if ((cbc_loc == -1 .and. bc_${XYZ}$%beg == BC_CHAR_FF_SUB_OUTFLOW) &
777-
& .or. (cbc_loc == 1 .and. bc_${XYZ}$%end == BC_CHAR_FF_SUB_OUTFLOW)) then
776+
else if ((cbc_loc == -1 .and. bc_${XYZ}$%beg == BC_CHAR_FF_SUB_OUTFLOW) .or. (cbc_loc == 1 &
777+
& .and. bc_${XYZ}$%end == BC_CHAR_FF_SUB_OUTFLOW)) then
778778
call s_compute_force_free_subsonic_outflow_L(lambda, L, rho, c, mf, dalpha_rho_ds, dpres_ds, dvel_ds, &
779779
& dadv_ds)
780-
else if ((cbc_loc == -1 .and. bc_${XYZ}$%beg == BC_CHAR_CP_SUB_OUTFLOW) &
781-
& .or. (cbc_loc == 1 .and. bc_${XYZ}$%end == BC_CHAR_CP_SUB_OUTFLOW)) then
780+
else if ((cbc_loc == -1 .and. bc_${XYZ}$%beg == BC_CHAR_CP_SUB_OUTFLOW) .or. (cbc_loc == 1 &
781+
& .and. bc_${XYZ}$%end == BC_CHAR_CP_SUB_OUTFLOW)) then
782782
call s_compute_constant_pressure_subsonic_outflow_L(lambda, L, rho, c, mf, dalpha_rho_ds, dpres_ds, &
783783
& dvel_ds, dadv_ds)
784-
else if ((cbc_loc == -1 .and. bc_${XYZ}$%beg == BC_CHAR_SUP_INFLOW) &
785-
& .or. (cbc_loc == 1 .and. bc_${XYZ}$%end == BC_CHAR_SUP_INFLOW)) then
784+
else if ((cbc_loc == -1 .and. bc_${XYZ}$%beg == BC_CHAR_SUP_INFLOW) .or. (cbc_loc == 1 &
785+
& .and. bc_${XYZ}$%end == BC_CHAR_SUP_INFLOW)) then
786786
call s_compute_supersonic_inflow_L(L)
787-
else if ((cbc_loc == -1 .and. bc_${XYZ}$%beg == BC_CHAR_SUP_OUTFLOW) &
788-
& .or. (cbc_loc == 1 .and. bc_${XYZ}$%end == BC_CHAR_SUP_OUTFLOW)) then
787+
else if ((cbc_loc == -1 .and. bc_${XYZ}$%beg == BC_CHAR_SUP_OUTFLOW) .or. (cbc_loc == 1 &
788+
& .and. bc_${XYZ}$%end == BC_CHAR_SUP_OUTFLOW)) then
789789
call s_compute_supersonic_outflow_L(lambda, L, rho, c, mf, dalpha_rho_ds, dpres_ds, dvel_ds, dadv_ds, &
790790
& dYs_ds)
791791
end if

src/simulation/m_hypoelastic.fpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,7 @@ contains
312312
! S_rr -= rho * v/r * (tau_rr + 2/3*G)
313313
rhs_vf(eqn_idx%stress%beg + 2)%sf(k, l, q) = rhs_vf(eqn_idx%stress%beg + 2)%sf(k, l, q) - rho_K_field(k, &
314314
& l, q)*q_prim_vf(eqn_idx%mom%beg + 1)%sf(k, l, &
315-
& q)/y%cc(l)*(q_prim_vf(eqn_idx%stress%beg + 2)%sf(k, l, q) + (2._wp/3._wp)*G_K_field(k, l, &
316-
& q)) ! tau_rr + 2/3*G
315+
& q)/y%cc(l)*(q_prim_vf(eqn_idx%stress%beg + 2)%sf(k, l, q) + (2._wp/3._wp)*G_K_field(k, l, q)) ! tau_rr + 2/3*G
317316

318317
! S_thetatheta += rho * ( -(tau_thetatheta + 2/3*G)*(du/x%spacing + dv/dr + v/r) + 2*(tau_thetatheta +
319318
! G)*v/r )

src/simulation/m_ibm.fpp

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -544,8 +544,7 @@ contains
544544
if (p == 0) gp_layers_z = 0
545545
546546
$:GPU_PARALLEL_LOOP(private='[i, j, k, ii, jj, kk, is_gp, local_idx, patch_id, encoded_patch_id, xp, yp, zp]', &
547-
& copyin='[count, count_i, x_domain, y_domain, z_domain]', firstprivate='[gp_layers, gp_layers_z]', &
548-
& collapse=3)
547+
& copyin='[count, count_i, x_domain, y_domain, z_domain]', firstprivate='[gp_layers, gp_layers_z]', collapse=3)
549548
do i = 0, m
550549
do j = 0, n
551550
do k = 0, p
@@ -941,17 +940,16 @@ contains
941940
! Get the pressure contribution to force via a finite difference to compute the 2D components of the
942941
! gradient of the pressure and cell volume
943942
local_force_contribution(1) = local_force_contribution(1) - (q_prim_vf(eqn_idx%E + fluid_idx)%sf(i &
944-
& + 1, j, k) - q_prim_vf(eqn_idx%E + fluid_idx)%sf(i - 1, j, &
945-
& k))/(2._wp*dx_loc) ! force is the negative pressure gradient
943+
& + 1, j, k) - q_prim_vf(eqn_idx%E + fluid_idx)%sf(i - 1, j, k))/(2._wp*dx_loc) ! force is the negative pressure gradient
946944
local_force_contribution(2) = local_force_contribution(2) - (q_prim_vf(eqn_idx%E + fluid_idx)%sf(i, &
947945
& j + 1, k) - q_prim_vf(eqn_idx%E + fluid_idx)%sf(i, j - 1, k))/(2._wp*dy_loc)
948946
cell_volume = abs(dx_loc*dy_loc)
949947
! add the 3D component of the pressure gradient, if we are working in 3 dimensions
950948
if (num_dims == 3) then
951949
dz_loc = z%cc(k + 1) - z%cc(k)
952-
local_force_contribution(3) = local_force_contribution(3) - (q_prim_vf(eqn_idx%E + fluid_idx) &
953-
& %sf(i, j, k + 1) - q_prim_vf(eqn_idx%E + fluid_idx)%sf(i, j, &
954-
& k - 1))/(2._wp*dz_loc)
950+
local_force_contribution(3) = local_force_contribution(3) - (q_prim_vf(eqn_idx%E &
951+
& + fluid_idx)%sf(i, j, k + 1) - q_prim_vf(eqn_idx%E + fluid_idx)%sf(i, &
952+
& j, k - 1))/(2._wp*dz_loc)
955953
cell_volume = abs(cell_volume*dz_loc)
956954
end if
957955
end do
@@ -1061,8 +1059,8 @@ contains
10611059

10621060
! Offset only needs to be computes for specific geometries
10631061

1064-
if (patch_ib(ib_marker)%geometry == 4 .or. patch_ib(ib_marker)%geometry == 5 .or. patch_ib(ib_marker) &
1065-
& %geometry == 11 .or. patch_ib(ib_marker)%geometry == 12) then
1062+
if (patch_ib(ib_marker)%geometry == 4 .or. patch_ib(ib_marker)%geometry == 5 .or. patch_ib(ib_marker)%geometry == 11 &
1063+
& .or. patch_ib(ib_marker)%geometry == 12) then
10661064
center_of_mass_local = [0._wp, 0._wp, 0._wp]
10671065
num_cells_local = 0
10681066

@@ -1131,11 +1129,11 @@ contains
11311129
if (patch_ib(ib_marker)%geometry == 2) then ! circle
11321130
patch_ib(ib_marker)%moment = 0.5_wp*patch_ib(ib_marker)%mass*(patch_ib(ib_marker)%radius)**2
11331131
else if (patch_ib(ib_marker)%geometry == 3) then ! rectangle
1134-
patch_ib(ib_marker)%moment = patch_ib(ib_marker)%mass*(patch_ib(ib_marker)%length_x**2 + patch_ib(ib_marker) &
1135-
& %length_y**2)/6._wp
1132+
patch_ib(ib_marker)%moment = patch_ib(ib_marker)%mass*(patch_ib(ib_marker)%length_x**2 &
1133+
& + patch_ib(ib_marker)%length_y**2)/6._wp
11361134
else if (patch_ib(ib_marker)%geometry == 6) then ! ellipse
1137-
patch_ib(ib_marker)%moment = 0.0625_wp*patch_ib(ib_marker)%mass*(patch_ib(ib_marker)%length_x**2 + patch_ib(ib_marker) &
1138-
& %length_y**2)
1135+
patch_ib(ib_marker)%moment = 0.0625_wp*patch_ib(ib_marker)%mass*(patch_ib(ib_marker)%length_x**2 &
1136+
& + patch_ib(ib_marker)%length_y**2)
11391137
else if (patch_ib(ib_marker)%geometry == 8) then ! sphere
11401138
patch_ib(ib_marker)%moment = 0.4*patch_ib(ib_marker)%mass*(patch_ib(ib_marker)%radius)**2
11411139
else ! we do not have an analytic moment of inertia calculation and need to approximate it directly via a sum

0 commit comments

Comments
 (0)