From 079f2d79ebac5b77329f55a139500ec544298fae Mon Sep 17 00:00:00 2001 From: pmocz Date: Fri, 6 Sep 2024 11:16:29 -0400 Subject: [PATCH] adding more parameter --- colors/test/src/test_colors.f90 | 2 +- net/test/src/mod_one_zone_burn.f90 | 2 +- num/test/src/test_integrate.f90 | 2 +- num/test/src/test_support.f90 | 2 +- stella/src/stl/math_constants.f90 | 4 ++-- stella/src/util/epsilon.f90 | 4 ++-- turb/test/src/test_turb.f90 | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/colors/test/src/test_colors.f90 b/colors/test/src/test_colors.f90 index 835c0d586..2bdbc0ea3 100644 --- a/colors/test/src/test_colors.f90 +++ b/colors/test/src/test_colors.f90 @@ -61,7 +61,7 @@ subroutine do_one_colors character (len=8) :: vname character(len=strlen),dimension(num_results):: colors_name logical, parameter :: doing_solar = .true. - real(dp), dimension(num_results) :: solar_expected_results = (/ & + real(dp), dimension(num_results), parameter :: solar_expected_results = (/ & 4.75d0, -0.11510d0, -0.14211d0, -0.61768d0, -0.36199d0, -0.68894d0, -1.46926d0, -0.32695d0, -0.78032d0, -0.39024d0, & 0.05223d0, -0.10512d0, -0.33801d0, -0.44312d0, -0.44123d0, -0.43080d0 /) diff --git a/net/test/src/mod_one_zone_burn.f90 b/net/test/src/mod_one_zone_burn.f90 index e0c4311bc..37315bf36 100644 --- a/net/test/src/mod_one_zone_burn.f90 +++ b/net/test/src/mod_one_zone_burn.f90 @@ -144,7 +144,7 @@ module mod_one_zone_support real(dp) :: starting_logT - logical :: dbg = .false. + logical, parameter :: dbg = .false. contains diff --git a/num/test/src/test_integrate.f90 b/num/test/src/test_integrate.f90 index f8d52c888..e64d0c477 100644 --- a/num/test/src/test_integrate.f90 +++ b/num/test/src/test_integrate.f90 @@ -23,7 +23,7 @@ end subroutine run_test_integrate subroutine test_basic real(dp) :: xlow=0, xhigh=1 - real(dp) :: expected = 0.5d0 + real(dp), parameter :: expected = 0.5d0 real(dp) :: res integer :: ierr diff --git a/num/test/src/test_support.f90 b/num/test/src/test_support.f90 index bbfc23f6c..e78727841 100644 --- a/num/test/src/test_support.f90 +++ b/num/test/src/test_support.f90 @@ -106,7 +106,7 @@ subroutine test_root_with_brackets ! stop seaching when x is determined to within epsx ! or when abs(f(x)) is less than epsy integer :: ierr - real(dp) :: expected_root = 0.74800611d0 + real(dp), parameter :: expected_root = 0.74800611d0 real(dp), target :: rpar_ary(lrpar) integer, target :: ipar_ary(lipar) integer, pointer :: ipar(:) ! (lipar) diff --git a/stella/src/stl/math_constants.f90 b/stella/src/stl/math_constants.f90 index e75062533..8678df1a3 100644 --- a/stella/src/stl/math_constants.f90 +++ b/stella/src/stl/math_constants.f90 @@ -23,7 +23,7 @@ module math_constants - use kinds, only: dp + use kinds, only: dp implicit none @@ -33,7 +33,7 @@ module math_constants public :: deq,dgt,dne,dle,dlt,dge public :: dNeqZero, dEqZero, dLtZero, dGtZero - real(kind=dp), public :: one=1.0_dp, eps=2*epsilon(one) + real(kind=dp), parameter, public :: one=1.0_dp, eps=2*epsilon(one) real (kind=dp), parameter :: p_pi = 3.14159265358979323846264338_dp real (kind=dp), parameter :: p_pio2 = 1.57079632679489661923132169_dp diff --git a/stella/src/util/epsilon.f90 b/stella/src/util/epsilon.f90 index 0336efd8f..81d52a919 100644 --- a/stella/src/util/epsilon.f90 +++ b/stella/src/util/epsilon.f90 @@ -1,7 +1,7 @@ program test_epsilon - real :: x = 3.143 - real(8) :: y = 2.33 + real, parameter :: x = 3.143 + real(8), parameter :: y = 2.33 print *, EPSILON(x) print *, EPSILON(y) end program test_epsilon diff --git a/turb/test/src/test_turb.f90 b/turb/test/src/test_turb.f90 index ef9b77c15..f6a0f5a42 100644 --- a/turb/test/src/test_turb.f90 +++ b/turb/test/src/test_turb.f90 @@ -24,7 +24,7 @@ end subroutine header subroutine check_efficient_MLT_scaling() type(auto_diff_real_star_order1) :: chiT, chiRho, Cp, grav, Lambda, rho, P, T, opacity, gradr, grada, gradL - character(len=3) :: MLT_option = 'Cox' + character(len=3) :: MLT_option real(dp) :: mixing_length_alpha, Henyey_MLT_nu_param, Henyey_MLT_y_param type(auto_diff_real_star_order1) :: Gamma, gradT, Y_face, conv_vel, conv_vel2, D, r, L integer :: mixing_type, ierr