Skip to content

Commit ad0bf3a

Browse files
committed
fix comment signs
1 parent ff7be4a commit ad0bf3a

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

src/fftpack_utils.f90

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,20 @@ pure module function fftfreq(n) result(out)
1313
out(1) = 0
1414
if (n == 1) return
1515

16-
if (mod(n, 2) == 0) then !> n even, smallest n = 2
16+
if (mod(n, 2) == 0) then ! n even, smallest n = 2
1717
do i = 2, n/2
1818
out(i) = i-1
1919
end do
2020
out(n/2+1) = -n/2
21-
do i = n/2+2, n !> only enters if n/2+2 <= n
21+
do i = n/2+2, n ! only enters if n/2+2 <= n
2222
out(i) = out(i-1) + 1
2323
end do
24-
else !> n odd, smallest n = 3
24+
else ! n odd, smallest n = 3
2525
do i = 2, n/2+1
2626
out(i) = i-1
2727
end do
2828
out(n/2+2) = -out(n/2+1)
29-
do i = n/2+3, n !> only enters if n/2+3 <= n
29+
do i = n/2+3, n ! only enters if n/2+3 <= n
3030
out(i) = out(i-1) + 1
3131
end do
3232
end if
@@ -43,13 +43,13 @@ pure module function rfftfreq(n) result(out)
4343
out(1) = 0
4444
if (n == 1) return
4545

46-
if (mod(n,2) == 0) then !> n even, smallest n = 2
46+
if (mod(n,2) == 0) then ! n even, smallest n = 2
4747
do i = 2, n-2, 2
4848
out(i) = out(i-1) + 1
4949
out(i+1) = out(i)
5050
end do
5151
out(n) = -n/2
52-
else !> n odd, smallest n = 3
52+
else ! n odd, smallest n = 3
5353
do i = 2, n-1, 2
5454
out(i) = out(i-1) + 1
5555
out(i+1) = out(i)

test/test_fftpack_utils.f90

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ subroutine test_fftfreq_2(error)
100100
type(error_type), allocatable, intent(out) :: error
101101

102102
real(rk), parameter :: tol = 1.0e-12_rk
103-
real(rk), parameter :: twopi = 8*atan(1.0_rk) !> 2*pi
104-
complex(rk), parameter :: imu = (0,1) !> imaginary unit
103+
real(rk), parameter :: twopi = 8*atan(1.0_rk) ! 2*pi
104+
complex(rk), parameter :: imu = (0,1) ! imaginary unit
105105

106106
integer, parameter :: n = 128
107107
integer :: i
@@ -110,11 +110,11 @@ subroutine test_fftfreq_2(error)
110110

111111
do i = 1, n
112112
xvec(i) = cos(twopi*(i-1)/n)
113-
xtrue(i) = -sin(twopi*(i-1)/n) !> derivative in physical space
113+
xtrue(i) = -sin(twopi*(i-1)/n) ! derivative in physical space
114114
end do
115115

116116
xfou = fft(xvec)/n
117-
xfou = imu*fftfreq(n)*xfou !> derivative in Fourier space
117+
xfou = imu*fftfreq(n)*xfou ! derivative in Fourier space
118118
xvec = ifft(xfou)
119119
call check(error, maxval(abs(xvec-xtrue)) < tol, &
120120
"maxval(abs(xvec-xtrue)) < tol failed.")
@@ -125,8 +125,8 @@ subroutine test_fftfreq_3(error)
125125
type(error_type), allocatable, intent(out) :: error
126126

127127
real(rk), parameter :: tol = 1.0e-12_rk
128-
real(rk), parameter :: twopi = 8*atan(1.0_rk) !> 2*pi
129-
complex(rk), parameter :: imu = (0,1) !> imaginary unit
128+
real(rk), parameter :: twopi = 8*atan(1.0_rk) ! 2*pi
129+
complex(rk), parameter :: imu = (0,1) ! imaginary unit
130130

131131
integer, parameter :: n = 135
132132
integer :: i
@@ -135,11 +135,11 @@ subroutine test_fftfreq_3(error)
135135

136136
do i = 1, n
137137
xvec(i) = cos(twopi*(i-1)/n)
138-
xtrue(i) = -sin(twopi*(i-1)/n) !> derivative in physical space
138+
xtrue(i) = -sin(twopi*(i-1)/n) ! derivative in physical space
139139
end do
140140

141141
xfou = fft(xvec)/n
142-
xfou = imu*fftfreq(n)*xfou !> derivative in Fourier space
142+
xfou = imu*fftfreq(n)*xfou ! derivative in Fourier space
143143
xvec = ifft(xfou)
144144
call check(error, maxval(abs(xvec-xtrue)) < tol, &
145145
"maxval(abs(xvec-xtrue)) < tol failed.")

0 commit comments

Comments
 (0)