Skip to content

Commit 8fae6ad

Browse files
committed
Clean up some fortls issues
I think it was fortls giving some lint-like warnings...
1 parent b5b61ee commit 8fae6ad

5 files changed

+23
-22
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ swm_c/shallow_swap.acc
3232
swm_c/shallow_swap.acc.Tile
3333
swm_fortran/swm_fortran
3434
swm_fortran/swm_fortran_driver
35+
swm_fortran/swm_fortran_amrex_driver
3536

3637
# Output
3738
*.out

swm_fortran/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ endif
1515
LDLIBS = -lm
1616

1717
# Default target
18-
all: swm_fortran
18+
all: swm_fortran swm_fortran_driver
1919

2020
swm_fortran: swm_fortran.F90
2121
$(FC) $(FFLAGS) -o $@ swm_fortran.F90

swm_fortran/swm_fortran.F90

+7-7
Original file line numberDiff line numberDiff line change
@@ -309,23 +309,23 @@ Program SWM_Fortran
309309
contains
310310

311311
! This is a copy, not a pointer shuffle
312-
subroutine dswap(a, b)
312+
subroutine dswap(swp1, swp2)
313313

314-
real, dimension(:,:), pointer :: a, b
314+
real, dimension(:,:), pointer :: swp1, swp2
315315

316-
real, dimension(:,:), pointer :: c
316+
real, dimension(:,:), pointer :: swp_tmp
317317

318-
c => a
319-
a => b
320-
b => c
318+
swp_tmp => swp1
319+
swp1 => swp2
320+
swp2 => swp_tmp
321321

322322
end subroutine dswap
323323

324324
subroutine write_to_file(array, filename)
325325
real, dimension(M_LEN,N_LEN), intent(in) :: array
326326
character(len=*), intent(in) :: filename
327327

328-
integer :: i, j, id
328+
integer :: id
329329

330330
open(newunit=id, access='stream', status='replace', file=filename)
331331
! Write this out in C ordering of array

swm_fortran/swm_fortran_amrex_driver.F90

+7-7
Original file line numberDiff line numberDiff line change
@@ -300,23 +300,23 @@ Program SWM_Fortran_Driver
300300
contains
301301

302302
! This is a copy, not a pointer shuffle
303-
subroutine dswap(a, b)
303+
subroutine dswap(swp1, swp2)
304304

305-
real, dimension(:,:,:), pointer :: a, b
305+
real, dimension(:,:,:), pointer :: swp1, swp2
306306

307-
real, dimension(:,:,:), pointer :: c
307+
real, dimension(:,:,:), pointer :: swp_tmp
308308

309-
c => a
310-
a => b
311-
b => c
309+
swp_tmp => swp1
310+
swp1 => swp2
311+
swp2 => swp_tmp
312312

313313
end subroutine dswap
314314

315315
subroutine write_to_file(array, filename)
316316
real, dimension(M_LEN,N_LEN,1), intent(in) :: array
317317
character(len=*), intent(in) :: filename
318318

319-
integer :: i, j, id
319+
integer :: id
320320

321321
open(newunit=id, access='stream', status='replace', file=filename)
322322
! Write this out in C ordering of array

swm_fortran/swm_fortran_driver.F90

+7-7
Original file line numberDiff line numberDiff line change
@@ -288,23 +288,23 @@ Program SWM_Fortran_Driver
288288
contains
289289

290290
! This is a copy, not a pointer shuffle
291-
subroutine dswap(a, b)
291+
subroutine dswap(swp1, swp2)
292292

293-
real, dimension(:,:), pointer :: a, b
293+
real, dimension(:,:), pointer :: swp1, swp2
294294

295-
real, dimension(:,:), pointer :: c
295+
real, dimension(:,:), pointer :: swp_tmp
296296

297-
c => a
298-
a => b
299-
b => c
297+
swp_tmp => swp1
298+
swp1 => swp2
299+
swp2 => swp_tmp
300300

301301
end subroutine dswap
302302

303303
subroutine write_to_file(array, filename)
304304
real, dimension(M_LEN,N_LEN), intent(in) :: array
305305
character(len=*), intent(in) :: filename
306306

307-
integer :: i, j, id
307+
integer :: id
308308

309309
open(newunit=id, access='stream', status='replace', file=filename)
310310
! Write this out in C ordering of array

0 commit comments

Comments
 (0)