Skip to content

Commit 9b1ed6a

Browse files
code_style fix
1 parent f3a451d commit 9b1ed6a

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

tests/maths/numerical_integration/gaussin_legendre.f90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ subroutine test_integral_x_squared_0_to_1()
3131
lower_bound = 0.0_dp
3232
upper_bound = 1.0_dp
3333
panels_number = 5 ! Adjust the number of quadrature points as needed from 1 to 5
34-
expected = 1.0_dp / 3.0_dp
34+
expected = 1.0_dp/3.0_dp
3535
call gauss_legendre_quadrature(integral_result, lower_bound, upper_bound, panels_number, f_x_squared)
3636
call assert_test(integral_result, expected, "Test 1: ∫ x^2 dx from 0 to 1")
3737
end subroutine test_integral_x_squared_0_to_1
@@ -67,7 +67,7 @@ subroutine test_integral_cos_0_to_pi_over_2()
6767
real(dp), parameter :: pi = 4.D0*DATAN(1.D0) ! Define Pi. Ensure maximum precision available on any architecture.
6868
integer :: panels_number
6969
lower_bound = 0.0_dp
70-
upper_bound = pi / 2.0_dp
70+
upper_bound = pi/2.0_dp
7171
panels_number = 5
7272
expected = 1.0_dp
7373
call gauss_legendre_quadrature(integral_result, lower_bound, upper_bound, panels_number, cos_function)
@@ -126,7 +126,7 @@ end function exp_function
126126
! Function for 1/x
127127
real(dp) function log_function(x)
128128
real(dp), intent(in) :: x
129-
log_function = 1.0_dp / x
129+
log_function = 1.0_dp/x
130130
end function log_function
131131

132132
! Function for cos(x)

tests/maths/numerical_integration/midpoint.f90

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ subroutine test_integral_x_squared_0_to_1()
3131
lower_bound = 0.0_dp
3232
upper_bound = 1.0_dp
3333
panels_number = 1000000 ! Must be a positive integer
34-
expected = 1.0_dp / 3.0_dp
34+
expected = 1.0_dp/3.0_dp
3535
call midpoint(integral_result, lower_bound, upper_bound, panels_number, f_x_squared)
3636
call assert_test(integral_result, expected, "Test 1: ∫ x^2 dx from 0 to 1")
3737
end subroutine test_integral_x_squared_0_to_1
@@ -43,7 +43,7 @@ subroutine test_integral_x_squared_0_to_2()
4343
lower_bound = 0.0_dp
4444
upper_bound = 2.0_dp
4545
panels_number = 1000000 ! Must be a positive integer
46-
expected = 8.0_dp / 3.0_dp
46+
expected = 8.0_dp/3.0_dp
4747
call midpoint(integral_result, lower_bound, upper_bound, panels_number, f_x_squared)
4848
call assert_test(integral_result, expected, "Test 2: ∫ x^2 dx from 0 to 2")
4949
end subroutine test_integral_x_squared_0_to_2
@@ -52,7 +52,7 @@ end subroutine test_integral_x_squared_0_to_2
5252
subroutine test_integral_sin_0_to_pi()
5353
real(dp) :: lower_bound, upper_bound, integral_result, expected
5454
integer :: panels_number
55-
real(dp), parameter :: pi = 4.D0 * DATAN(1.D0) ! Define Pi. Ensure maximum precision available on any architecture.
55+
real(dp), parameter :: pi = 4.D0*DATAN(1.D0) ! Define Pi. Ensure maximum precision available on any architecture.
5656
lower_bound = 0.0_dp
5757
upper_bound = pi
5858
panels_number = 1000000 ! Must be a positive integer
@@ -91,7 +91,7 @@ subroutine test_integral_cos_0_to_pi_over_2()
9191
real(dp), parameter :: pi = 4.D0*DATAN(1.D0) ! Define Pi. Ensure maximum precision available on any architecture.
9292
integer :: panels_number
9393
lower_bound = 0.0_dp
94-
upper_bound = pi / 2.0_dp
94+
upper_bound = pi/2.0_dp
9595
panels_number = 1000000 ! Must be a positive integer
9696
expected = 1.0_dp
9797
call midpoint(integral_result, lower_bound, upper_bound, panels_number, cos_function)
@@ -137,7 +137,7 @@ end function exp_function
137137
! Function for 1/x
138138
real(dp) function log_function(x)
139139
real(dp), intent(in) :: x
140-
log_function = 1.0_dp / x
140+
log_function = 1.0_dp/x
141141
end function log_function
142142

143143
! Function for cos(x)

tests/maths/numerical_integration/monte_carlo.f90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ subroutine test_integral_x_squared_0_to_1()
3333
a = 0.0_dp
3434
b = 1.0_dp
3535
n = 1000000
36-
expected = 1.0_dp / 3.0_dp
36+
expected = 1.0_dp/3.0_dp
3737

3838
call monte_carlo(integral_result, error_estimate, a, b, n, f_x_squared)
3939
call assert_test(integral_result, expected, error_estimate, "Test 1: ∫ x^2 dx from 0 to 1")
@@ -75,7 +75,7 @@ subroutine test_integral_cos_0_to_pi_over_2()
7575
real(dp), parameter :: pi = 4.D0*DATAN(1.D0) ! Define Pi. Ensure maximum precision available on any architecture.
7676
integer :: n
7777
a = 0.0_dp
78-
b = pi / 2.0_dp
78+
b = pi/2.0_dp
7979
n = 1000000
8080
expected = 1.0_dp
8181

@@ -174,7 +174,7 @@ subroutine assert_test(actual, expected, error_estimate, test_name)
174174
real(dp) :: tol
175175

176176
! Set the tolerance based on the error estimate
177-
tol = max(1.0e-5_dp, 10.0_dp * error_estimate) ! Adjust as needed
177+
tol = max(1.0e-5_dp, 10.0_dp*error_estimate) ! Adjust as needed
178178

179179
if (abs(actual - expected) < tol) then
180180
print *, test_name, " PASSED"

0 commit comments

Comments
 (0)