Skip to content

Commit e08c93a

Browse files
committed
prettyify, lint, and fix test suite
1 parent 420d716 commit e08c93a

File tree

11 files changed

+617
-25
lines changed

11 files changed

+617
-25
lines changed

src/pre_process/m_checker.fpp

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -204,44 +204,43 @@ contains
204204

205205
@:PROHIBIT(num_bc_patches > num_bc_patches_max, "num_bc_patches must be <= 10")
206206

207-
208207
do i = 1, num_bc_patches
209208

210-
! Line Segment BC
209+
! Line Segment BC
211210
if (patch_bc(i)%geometry == 1) then
212211
@:PROHIBIT( .not. f_is_default(patch_bc(i)%radius), "Line Segment Patch can't have radius defined")
213212
#:for DIR in [('1'), ('2')]
214213
@:PROHIBIT(patch_bc(i)%dir == ${DIR}$ .and. (.not. f_is_default(patch_bc(i)%centroid(${DIR}$)) .or. .not. f_is_default(patch_bc(i)%centroid(3))), &
215-
"Line Segment Patch of Dir ${DIR}$ can't have a centroid in Dir ${DIR}$ or 3" )
216-
@:PROHIBIT(patch_bc(i)%dir == ${DIR}$ .and. (.not. f_is_default(patch_bc(i)%length(${DIR}$)) .or. .not. f_is_default(patch_bc(i)%length(3))), &
217-
"Line Segment Patch of Dir ${DIR}$ can't have a length in Dir ${DIR}$ or 3" )
214+
"Line Segment Patch of Dir ${DIR}$ can't have a centroid in Dir ${DIR}$ or 3" )
215+
@:PROHIBIT(patch_bc(i)%dir == ${DIR}$ .and. (.not. f_is_default(patch_bc(i)%length(${DIR}$)) .or. .not. f_is_default(patch_bc(i)%length(3))), &
216+
"Line Segment Patch of Dir ${DIR}$ can't have a length in Dir ${DIR}$ or 3" )
218217
#:endfor
219-
end if
220-
! Circle BC
218+
end if
219+
! Circle BC
221220
if (patch_bc(i)%geometry == 2) then
222221
@:PROHIBIT(f_is_default(patch_bc(i)%radius), "Circle Patch must have radius defined")
223-
@:PROHIBIT(.not. f_is_default(patch_bc(i)%length(1)) .or. .not. f_is_default(patch_bc(i)%length(2)) .or. .not. f_is_default(patch_bc(i)%length(3)), &
222+
@:PROHIBIT(.not. f_is_default(patch_bc(i)%length(1)) .or. .not. f_is_default(patch_bc(i)%length(2)) .or. .not. f_is_default(patch_bc(i)%length(3)), &
224223
"Circle Patch can't have lengths defined")
225224

226225
#:for DIR in [('1'), ('2'), ('3')]
227226
@:PROHIBIT(patch_bc(i)%dir == ${DIR}$ .and. .not. f_is_default(patch_bc(i)%centroid(${DIR}$)), &
228-
"Circle Patch of Dir ${DIR}$ can't have a centroid in Dir ${DIR}$")
227+
"Circle Patch of Dir ${DIR}$ can't have a centroid in Dir ${DIR}$")
229228
#:endfor
230229

231-
end if
230+
end if
232231
! Rectangle BC
233232
if (patch_bc(i)%geometry == 3) then
234233
@:PROHIBIT( .not. f_is_default(patch_bc(i)%radius), "Rectangle Patch can't have radius defined")
235234

236235
#:for DIR, VAR in [('1', '2', '3'), ('2', '3', '1'), ('3', '1', '2')]
237236
@:PROHIBIT(patch_bc(i)%dir == ${DIR}$ .and. .not. f_is_default(patch_bc(i)%centroid(${DIR}$)), &
238-
"Rectangle Patch of Dir ${DIR}$ can't have a centroid in Dir ${DIR}$")
237+
"Rectangle Patch of Dir ${DIR}$ can't have a centroid in Dir ${DIR}$")
239238
@:PROHIBIT(patch_bc(i)%dir == ${DIR}$ .and. .not. f_is_default(patch_bc(i)%length(${DIR}$)), &
240-
"Rectangle Patch of Dir ${DIR}$ can't have a length in Dir ${DIR}$")
239+
"Rectangle Patch of Dir ${DIR}$ can't have a length in Dir ${DIR}$")
241240
#:endfor
242241

243-
end if
244-
242+
end if
243+
245244
end do
246245

247246
end subroutine

src/pre_process/m_start_up.fpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ contains
178178

179179
if (cfl_adap_dt .or. cfl_const_dt .or. rkck_adap_dt) cfl_dt = .true.
180180

181-
182181
if (any((/bc_x%beg, bc_x%end, bc_y%beg, bc_y%end, bc_z%beg, bc_z%end/) == -17) .or. &
183182
num_bc_patches > 0) then
184183
save_bc = .true.

src/simulation/m_global_parameters.fpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,12 +1223,12 @@ contains
12231223
@:ALLOCATE(x_cc(-buff_size:m + buff_size))
12241224
@:ALLOCATE(dx(-buff_size:m + buff_size))
12251225
1226-
if (n == 0) return;
1226+
if (n == 0) return;
12271227
@:ALLOCATE(y_cb(-1 - buff_size:n + buff_size))
12281228
@:ALLOCATE(y_cc(-buff_size:n + buff_size))
12291229
@:ALLOCATE(dy(-buff_size:n + buff_size))
12301230
1231-
if (p == 0) return;
1231+
if (p == 0) return;
12321232
@:ALLOCATE(z_cb(-1 - buff_size:p + buff_size))
12331233
@:ALLOCATE(z_cc(-buff_size:p + buff_size))
12341234
@:ALLOCATE(dz(-buff_size:p + buff_size))
@@ -1307,10 +1307,10 @@ contains
13071307
! Deallocating grid variables for the x-, y- and z-directions
13081308
@:DEALLOCATE(x_cb, x_cc, dx)
13091309
1310-
if (n == 0) return;
1310+
if (n == 0) return;
13111311
@:DEALLOCATE(y_cb, y_cc, dy)
13121312
1313-
if (p == 0) return;
1313+
if (p == 0) return;
13141314
@:DEALLOCATE(z_cb, z_cc, dz)
13151315
13161316
end subroutine s_finalize_global_parameters_module

src/simulation/m_sim_helpers.f90

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -272,18 +272,18 @@ subroutine s_assign_default_bc_type(bc_type)
272272

273273
type(integer_field), dimension(1:num_dims, -1:1) :: bc_type
274274

275-
bc_type(1,-1)%sf(:,:,:) = bc_x%beg
276-
bc_type(1,1)%sf(:,:,:) = bc_x%end
275+
bc_type(1, -1)%sf(:, :, :) = bc_x%beg
276+
bc_type(1, 1)%sf(:, :, :) = bc_x%end
277277
!$acc update device(bc_type(1,-1)%sf, bc_type(1,1)%sf)
278278

279279
if (n > 0) then
280-
bc_type(2,-1)%sf(:,:,:) = bc_y%beg
281-
bc_type(2,1)%sf(:,:,:) = bc_y%end
280+
bc_type(2, -1)%sf(:, :, :) = bc_y%beg
281+
bc_type(2, 1)%sf(:, :, :) = bc_y%end
282282
!$acc update device(bc_type(2,-1)%sf, bc_type(2,1)%sf)
283283

284284
if (p > 0) then
285-
bc_type(3,-1)%sf(:,:,:) = bc_z%beg
286-
bc_type(3,1)%sf(:,:,:) = bc_z%end
285+
bc_type(3, -1)%sf(:, :, :) = bc_z%beg
286+
bc_type(3, 1)%sf(:, :, :) = bc_z%end
287287
!$acc update device(bc_type(3,-1)%sf, bc_type(3,1)%sf)
288288
end if
289289
end if

tests/10DBA76B/golden-metadata.txt

Lines changed: 185 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)