Skip to content

Commit 4071e43

Browse files
committed
style: apply ffmt formatting
1 parent 64ca703 commit 4071e43

9 files changed

Lines changed: 76 additions & 76 deletions

File tree

src/pre_process/m_check_ib_patches.fpp

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ contains
9393

9494
call s_int_to_str(patch_id, iStr)
9595

96-
@:PROHIBIT(n == 0 .or. p > 0 .or. patch_ib(patch_id)%length_x <= 0._wp .or. patch_ib(patch_id) &
97-
& %length_y <= 0._wp .or. f_is_default(patch_ib(patch_id)%x_centroid) .or. f_is_default(patch_ib(patch_id) &
98-
& %y_centroid), 'in ellipse IB patch ' // trim(iStr))
96+
@:PROHIBIT(n == 0 .or. p > 0 .or. patch_ib(patch_id)%length_x <= 0._wp .or. patch_ib(patch_id)%length_y <= 0._wp &
97+
& .or. f_is_default(patch_ib(patch_id)%x_centroid) .or. f_is_default(patch_ib(patch_id)%y_centroid), &
98+
& 'in ellipse IB patch ' // trim(iStr))
9999

100100
end subroutine s_check_ellipse_ib_patch_geometry
101101

@@ -107,9 +107,10 @@ contains
107107

108108
call s_int_to_str(patch_id, iStr)
109109

110-
@:PROHIBIT(n == 0 .or. p > 0 .or. patch_ib(patch_id)%c <= 0._wp .or. patch_ib(patch_id)%p <= 0._wp .or. patch_ib(patch_id) &
111-
& %t <= 0._wp .or. patch_ib(patch_id)%m <= 0._wp .or. f_is_default(patch_ib(patch_id)%x_centroid) &
112-
& .or. f_is_default(patch_ib(patch_id)%y_centroid), 'in airfoil IB patch ' // trim(iStr))
110+
@:PROHIBIT(n == 0 .or. p > 0 .or. patch_ib(patch_id)%c <= 0._wp .or. patch_ib(patch_id)%p <= 0._wp &
111+
& .or. patch_ib(patch_id)%t <= 0._wp .or. patch_ib(patch_id)%m <= 0._wp &
112+
& .or. f_is_default(patch_ib(patch_id)%x_centroid) .or. f_is_default(patch_ib(patch_id)%y_centroid), &
113+
& 'in airfoil IB patch ' // trim(iStr))
113114

114115
end subroutine s_check_airfoil_ib_patch_geometry
115116

@@ -121,9 +122,9 @@ contains
121122

122123
call s_int_to_str(patch_id, iStr)
123124

124-
@:PROHIBIT(n == 0 .or. p == 0 .or. patch_ib(patch_id)%c <= 0._wp .or. patch_ib(patch_id) &
125-
& %p <= 0._wp .or. patch_ib(patch_id)%t <= 0._wp .or. patch_ib(patch_id) &
126-
& %m <= 0._wp .or. f_is_default(patch_ib(patch_id)%x_centroid) .or. f_is_default(patch_ib(patch_id)%y_centroid) &
125+
@:PROHIBIT(n == 0 .or. p == 0 .or. patch_ib(patch_id)%c <= 0._wp .or. patch_ib(patch_id)%p <= 0._wp &
126+
& .or. patch_ib(patch_id)%t <= 0._wp .or. patch_ib(patch_id)%m <= 0._wp &
127+
& .or. f_is_default(patch_ib(patch_id)%x_centroid) .or. f_is_default(patch_ib(patch_id)%y_centroid) &
127128
& .or. f_is_default(patch_ib(patch_id)%z_centroid) .or. f_is_default(patch_ib(patch_id)%length_z), &
128129
& 'in 3d airfoil IB patch ' // trim(iStr))
129130

@@ -137,9 +138,9 @@ contains
137138

138139
call s_int_to_str(patch_id, iStr)
139140

140-
@:PROHIBIT(n == 0 .or. p > 0 .or. f_is_default(patch_ib(patch_id)%x_centroid) .or. f_is_default(patch_ib(patch_id) &
141-
& %y_centroid) .or. patch_ib(patch_id)%length_x <= 0._wp .or. patch_ib(patch_id)%length_y <= 0._wp, &
142-
& 'in rectangle IB patch ' // trim(iStr))
141+
@:PROHIBIT(n == 0 .or. p > 0 .or. f_is_default(patch_ib(patch_id)%x_centroid) &
142+
& .or. f_is_default(patch_ib(patch_id)%y_centroid) .or. patch_ib(patch_id)%length_x <= 0._wp &
143+
& .or. patch_ib(patch_id)%length_y <= 0._wp, 'in rectangle IB patch ' // trim(iStr))
143144

144145
end subroutine s_check_rectangle_ib_patch_geometry
145146

@@ -151,9 +152,9 @@ contains
151152

152153
call s_int_to_str(patch_id, iStr)
153154

154-
@:PROHIBIT(n == 0 .or. p == 0 .or. f_is_default(patch_ib(patch_id)%x_centroid) .or. f_is_default(patch_ib(patch_id) &
155-
& %y_centroid) .or. f_is_default(patch_ib(patch_id)%z_centroid) .or. patch_ib(patch_id)%radius <= 0._wp, &
156-
& 'in sphere IB patch ' // trim(iStr))
155+
@:PROHIBIT(n == 0 .or. p == 0 .or. f_is_default(patch_ib(patch_id)%x_centroid) &
156+
& .or. f_is_default(patch_ib(patch_id)%y_centroid) .or. f_is_default(patch_ib(patch_id)%z_centroid) &
157+
& .or. patch_ib(patch_id)%radius <= 0._wp, 'in sphere IB patch ' // trim(iStr))
157158

158159
end subroutine s_check_sphere_ib_patch_geometry
159160

@@ -165,10 +166,10 @@ contains
165166

166167
call s_int_to_str(patch_id, iStr)
167168

168-
@:PROHIBIT(n == 0 .or. p == 0 .or. f_is_default(patch_ib(patch_id)%x_centroid) .or. f_is_default(patch_ib(patch_id) &
169-
& %y_centroid) .or. f_is_default(patch_ib(patch_id)%z_centroid) .or. patch_ib(patch_id) &
170-
& %length_x <= 0._wp .or. patch_ib(patch_id)%length_y <= 0._wp .or. patch_ib(patch_id)%length_z <= 0._wp, &
171-
& 'in cuboid IB patch ' // trim(iStr))
169+
@:PROHIBIT(n == 0 .or. p == 0 .or. f_is_default(patch_ib(patch_id)%x_centroid) &
170+
& .or. f_is_default(patch_ib(patch_id)%y_centroid) .or. f_is_default(patch_ib(patch_id)%z_centroid) &
171+
& .or. patch_ib(patch_id)%length_x <= 0._wp .or. patch_ib(patch_id)%length_y <= 0._wp &
172+
& .or. patch_ib(patch_id)%length_z <= 0._wp, 'in cuboid IB patch ' // trim(iStr))
172173

173174
end subroutine s_check_cuboid_ib_patch_geometry
174175

@@ -181,15 +182,15 @@ contains
181182
call s_int_to_str(patch_id, iStr)
182183

183184
@:PROHIBIT(p == 0 .or. f_is_default(patch_ib(patch_id)%x_centroid) .or. f_is_default(patch_ib(patch_id)%y_centroid) &
184-
& .or. f_is_default(patch_ib(patch_id)%z_centroid) .or. (patch_ib(patch_id) &
185-
& %length_x <= 0._wp .and. patch_ib(patch_id)%length_y <= 0._wp .and. patch_ib(patch_id)%length_z <= 0._wp) &
185+
& .or. f_is_default(patch_ib(patch_id)%z_centroid) .or. (patch_ib(patch_id)%length_x <= 0._wp &
186+
& .and. patch_ib(patch_id)%length_y <= 0._wp .and. patch_ib(patch_id)%length_z <= 0._wp) &
186187
& .or. patch_ib(patch_id)%radius <= 0._wp, 'in cylinder IB patch ' // trim(iStr))
187188

188189
@:PROHIBIT((patch_ib(patch_id)%length_x > 0._wp .and. ((.not. f_is_default(patch_ib(patch_id)%length_y)) &
189-
& .or. (.not. f_is_default(patch_ib(patch_id)%length_z)))) .or. (patch_ib(patch_id) &
190-
& %length_y > 0._wp .and. ((.not. f_is_default(patch_ib(patch_id)%length_x)) &
191-
& .or. (.not. f_is_default(patch_ib(patch_id)%length_z)))) .or. (patch_ib(patch_id) &
192-
& %length_z > 0._wp .and. ((.not. f_is_default(patch_ib(patch_id)%length_x)) &
190+
& .or. (.not. f_is_default(patch_ib(patch_id)%length_z)))) .or. (patch_ib(patch_id)%length_y > 0._wp &
191+
& .and. ((.not. f_is_default(patch_ib(patch_id)%length_x)) &
192+
& .or. (.not. f_is_default(patch_ib(patch_id)%length_z)))) .or. (patch_ib(patch_id)%length_z > 0._wp &
193+
& .and. ((.not. f_is_default(patch_ib(patch_id)%length_x)) &
193194
& .or. (.not. f_is_default(patch_ib(patch_id)%length_y)))), 'in cylinder IB patch ' // trim(iStr))
194195

195196
end subroutine s_check_cylinder_ib_patch_geometry
@@ -204,8 +205,8 @@ contains
204205

205206
@:PROHIBIT(patch_ib(patch_id)%model_filepath == dflt_char, 'Empty model file path for patch '//trim(iStr))
206207

207-
@:PROHIBIT(patch_ib(patch_id)%model_scale(1) <= 0._wp .or. patch_ib(patch_id)%model_scale(2) &
208-
& <= 0._wp .or. patch_ib(patch_id)%model_scale(3) <= 0._wp, 'Negative scale in model IB patch ' // trim(iStr))
208+
@:PROHIBIT(patch_ib(patch_id)%model_scale(1) <= 0._wp .or. patch_ib(patch_id)%model_scale(2) <= 0._wp &
209+
& .or. patch_ib(patch_id)%model_scale(3) <= 0._wp, 'Negative scale in model IB patch ' // trim(iStr))
209210

210211
end subroutine s_check_model_ib_patch_geometry
211212

@@ -217,8 +218,8 @@ contains
217218
call s_int_to_str(patch_id, iStr)
218219

219220
@:PROHIBIT((.not. f_is_default(patch_ib(patch_id)%x_centroid)) .or. (.not. f_is_default(patch_ib(patch_id)%y_centroid)) &
220-
& .or. (.not. f_is_default(patch_ib(patch_id)%z_centroid)) .or. (.not. f_is_default(patch_ib(patch_id) &
221-
& %length_x)) .or. (.not. f_is_default(patch_ib(patch_id)%length_y)) &
221+
& .or. (.not. f_is_default(patch_ib(patch_id)%z_centroid)) &
222+
& .or. (.not. f_is_default(patch_ib(patch_id)%length_x)) .or. (.not. f_is_default(patch_ib(patch_id)%length_y)) &
222223
& .or. (.not. f_is_default(patch_ib(patch_id)%length_z)) .or. (.not. f_is_default(patch_ib(patch_id)%radius)), &
223224
& 'in inactive IB patch ' // trim(iStr))
224225

src/pre_process/m_check_patches.fpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ contains
104104

105105
! Constraints on smoothing initial condition patch parameters
106106
do i = 1, num_patches
107-
if (i > 1 .and. (patch_icpp(i)%geometry == 2 .or. patch_icpp(i)%geometry == 3 .or. patch_icpp(i) &
108-
& %geometry == 4 .or. patch_icpp(i)%geometry == 5 .or. patch_icpp(i)%geometry == 8 .or. patch_icpp(i) &
109-
& %geometry == 9 .or. patch_icpp(i)%geometry == 10 .or. patch_icpp(i)%geometry == 11 .or. patch_icpp(i) &
110-
& %geometry == 12 .or. patch_icpp(i)%geometry == 13 .or. patch_icpp(i)%geometry == 14)) then
107+
if (i > 1 .and. (patch_icpp(i)%geometry == 2 .or. patch_icpp(i)%geometry == 3 .or. patch_icpp(i)%geometry == 4 &
108+
& .or. patch_icpp(i)%geometry == 5 .or. patch_icpp(i)%geometry == 8 .or. patch_icpp(i)%geometry == 9 &
109+
& .or. patch_icpp(i)%geometry == 10 .or. patch_icpp(i)%geometry == 11 .or. patch_icpp(i)%geometry == 12 &
110+
& .or. patch_icpp(i)%geometry == 13 .or. patch_icpp(i)%geometry == 14)) then
111111
call s_check_supported_patch_smoothing(i)
112112
else
113113
call s_check_unsupported_patch_smoothing(i)
@@ -462,11 +462,13 @@ contains
462462
call s_int_to_str(patch_id, iStr)
463463
464464
@:PROHIBIT(f_is_default(patch_icpp(patch_id)%vel(1)), "Patch "//trim(iStr)//": vel(1) must be set")
465-
@:PROHIBIT(n == 0 .and. (.not. f_is_default(patch_icpp(patch_id)%vel(2))) .and. (.not. f_approx_equal(patch_icpp(patch_id) &
466-
& %vel(2), 0._wp)) .and. (.not. mhd), "Patch " // trim(iStr) // ": vel(2) must not be set when n = 0")
465+
@:PROHIBIT(n == 0 .and. (.not. f_is_default(patch_icpp(patch_id)%vel(2))) &
466+
& .and. (.not. f_approx_equal(patch_icpp(patch_id)%vel(2), 0._wp)) .and. (.not. mhd), &
467+
& "Patch " // trim(iStr) // ": vel(2) must not be set when n = 0")
467468
@:PROHIBIT(n > 0 .and. f_is_default(patch_icpp(patch_id)%vel(2)), "Patch "//trim(iStr)//": vel(2) must be set when n > 0")
468-
@:PROHIBIT(p == 0 .and. (.not. f_is_default(patch_icpp(patch_id)%vel(3))) .and. (.not. f_approx_equal(patch_icpp(patch_id) &
469-
& %vel(3), 0._wp)) .and. (.not. mhd), "Patch " // trim(iStr) // ": vel(3) must not be set when p = 0")
469+
@:PROHIBIT(p == 0 .and. (.not. f_is_default(patch_icpp(patch_id)%vel(3))) &
470+
& .and. (.not. f_approx_equal(patch_icpp(patch_id)%vel(3), 0._wp)) .and. (.not. mhd), &
471+
& "Patch " // trim(iStr) // ": vel(3) must not be set when p = 0")
470472
@:PROHIBIT(p > 0 .and. f_is_default(patch_icpp(patch_id)%vel(3)), "Patch "//trim(iStr)//": vel(3) must be set when p > 0")
471473
@:PROHIBIT(mhd .and. (f_is_default(patch_icpp(patch_id)%vel(2)) .or. f_is_default(patch_icpp(patch_id)%vel(3))), &
472474
& "Patch " // trim(iStr) // ": All velocities (vel(1:3)) must be set when mhd = true")

src/simulation/m_acoustic_src.fpp

Lines changed: 3 additions & 4 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
@@ -526,8 +525,8 @@ contains
526525
else if (support(ai) == 2 .or. support(ai) == 3) then ! 2D or 3D
527526
! If we let unit vector e = (cos(dir), sin(dir)),
528527
dist = r(1)*cos(dir(ai)) + r(2)*sin(dir(ai)) ! dot(r,e)
529-
if ((r(1) - dist*cos(dir(ai)))**2._wp + (r(2) - dist*sin(dir(ai)))**2._wp < 0.25_wp*length(ai)**2._wp) &
530-
& then ! |r - dist*e| < length/2
528+
! |r - dist*e| < length/2
529+
if ((r(1) - dist*cos(dir(ai)))**2._wp + (r(2) - dist*sin(dir(ai)))**2._wp < 0.25_wp*length(ai)**2._wp) then
531530
if (support(ai) /= 3 .or. abs(r(3)) < 0.25_wp*height(ai)) then ! additional height constraint for 3D
532531
source = 1._wp/(sqrt(2._wp*pi)*sig/2._wp)*exp(-0.5_wp*(dist/(sig/2._wp))**2._wp)
533532
end if

src/simulation/m_compute_levelset.fpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,8 @@ contains
378378
xy_local = matmul(inverse_rotation, xy_local)
379379

380380
normal_vector = xy_local
381-
normal_vector(2) = normal_vector(2)*(ellipse_coeffs(1)/ellipse_coeffs(2)) &
382-
& **2._wp ! get the normal direction via the coordinate transformation method
381+
! get the normal direction via the coordinate transformation method
382+
normal_vector(2) = normal_vector(2)*(ellipse_coeffs(1)/ellipse_coeffs(2))**2._wp
383383
normal_vector = normal_vector/sqrt(dot_product(normal_vector, normal_vector)) ! normalize the vector
384384
gp%levelset_norm = matmul(rotation, normal_vector) ! save after rotating the vector to the global frame
385385

src/simulation/m_qbmm.fpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -402,12 +402,11 @@ contains
402402
type(scalar_field), dimension(sys_size), intent(in) :: flux_n_vf
403403
real(stp), dimension(idwbuff(1)%beg:,idwbuff(2)%beg:,idwbuff(3)%beg:,1:,1:), intent(inout) :: pb
404404

405-
real(wp), dimension(idwbuff(1)%beg:,idwbuff(2)%beg:,idwbuff(3)%beg:,1:,1:), &
406-
& intent(inout) :: rhs_pb ! TODO :: I think that this should be stp as well.
407-
408-
integer :: i, j, k, l, q
405+
! TODO :: I think that this should be stp as well.
406+
real(wp), dimension(idwbuff(1)%beg:,idwbuff(2)%beg:,idwbuff(3)%beg:,1:,1:), intent(inout) :: rhs_pb
407+
integer :: i, j, k, l, q
409408
real(wp) :: nb_q, nb_dot, R, R2, nR, nR2, nR_dot, nR2_dot, var, AX
410-
logical :: is_axisym
409+
logical :: is_axisym
411410

412411
select case (idir)
413412
case (1)
@@ -842,8 +841,8 @@ contains
842841
& momrhs(:,i1, i2, j, q))
843842
end if
844843
case (2)
845-
if ((j >= 7 .and. j <= 9) .or. (j >= 22 .and. j <= 23) &
846-
& .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
847846
momsum = momsum + coeff(j, i1, i2)*(R0(q)**momrhs(3, i1, i2, j, &
848847
& q))*f_quad2D(abscX(:,q), abscY(:,q), wght_pb(:,q), &
849848
& momrhs(:,i1, i2, j, q))

src/simulation/m_rhs.fpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -517,9 +517,8 @@ contains
517517
type(scalar_field), dimension(sys_size), intent(inout) :: rhs_vf
518518
real(stp), dimension(idwbuff(1)%beg:,idwbuff(2)%beg:,idwbuff(3)%beg:,1:,1:), intent(inout) :: pb_in
519519

520-
real(wp), dimension(idwbuff(1)%beg:,idwbuff(2)%beg:,idwbuff(3)%beg:,1:,1:), &
521-
& intent(inout) &
522-
& :: rhs_pb ! TODO :: I think these other two variables need to be stp as well, but it doesn't compile like that right now
520+
! TODO :: I think these other two variables need to be stp as well, but it doesn't compile like that right now
521+
real(wp), dimension(idwbuff(1)%beg:,idwbuff(2)%beg:,idwbuff(3)%beg:,1:,1:), intent(inout) :: rhs_pb
523522
real(stp), dimension(idwbuff(1)%beg:,idwbuff(2)%beg:,idwbuff(3)%beg:,1:,1:), intent(inout) :: mv_in
524523
real(wp), dimension(idwbuff(1)%beg:,idwbuff(2)%beg:,idwbuff(3)%beg:,1:,1:), intent(inout) :: rhs_mv
525524
integer, intent(in) :: t_step
@@ -530,6 +529,7 @@ contains
530529
integer(kind=8) :: i, j, k, l, q !< Generic loop iterators
531530
532531
! RHS: halo exchange -> reconstruct -> Riemann solve -> flux difference -> source terms
532+
533533
call nvtxStartRange("COMPUTE-RHS")
534534
535535
call cpu_time(t_start)

0 commit comments

Comments
 (0)