Skip to content

Commit 4fc5a17

Browse files
committed
style: apply ffmt v0.4.0 formatting
1 parent beb153e commit 4fc5a17

5 files changed

Lines changed: 39 additions & 41 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_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

src/simulation/m_qbmm.fpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -841,8 +841,8 @@ contains
841841
& momrhs(:,i1, i2, j, q))
842842
end if
843843
case (2)
844-
if ((j >= 7 .and. j <= 9) .or. (j >= 22 .and. j <= 23) &
845-
& .or. (j >= 10 .and. j <= 11) .or. (j == 26)) then
844+
if ((j >= 7 .and. j <= 9) .or. (j >= 22 .and. j <= 23) .or. (j >= 10 &
845+
& .and. j <= 11) .or. (j == 26)) then
846846
momsum = momsum + coeff(j, i1, i2)*(R0(q)**momrhs(3, i1, i2, j, &
847847
& q))*f_quad2D(abscX(:,q), abscY(:,q), wght_pb(:,q), &
848848
& momrhs(:,i1, i2, j, q))

0 commit comments

Comments
 (0)