From a6a2f6e071c788d1a9f9ed64220f3bafca65e0e1 Mon Sep 17 00:00:00 2001 From: pmocz Date: Fri, 6 Sep 2024 09:07:59 -0400 Subject: [PATCH 1/5] adding missing parameter keywords --- kap/private/kap_aesopus.f90 | 6 +++--- kap/private/kap_eval.f90 | 2 +- kap/public/kap_def.f90 | 2 +- rates/private/reaclib_support.f90 | 4 ++-- rates/private/suzuki_tables.f90 | 2 +- rates/private/weaklib_tables.f90 | 2 +- rates/public/rates_def.f90 | 4 ++-- rates/public/rates_lib.f90 | 6 +++--- star/other/sample_pgstar_plot.f90 | 2 +- star/private/eps_mdot.f90 | 2 +- star/private/hydro_eqns.f90 | 2 +- star/private/relax.f90 | 2 +- star/private/remove_shells.f90 | 2 +- star/private/rsp_lina.f90 | 2 +- star/private/star_utils.f90 | 4 ++-- 15 files changed, 22 insertions(+), 22 deletions(-) diff --git a/kap/private/kap_aesopus.f90 b/kap/private/kap_aesopus.f90 index 7afbbc629..f1f81dea1 100644 --- a/kap/private/kap_aesopus.f90 +++ b/kap/private/kap_aesopus.f90 @@ -83,9 +83,9 @@ subroutine read_kap_aesopus_tables(rq, ierr) character(len=80) :: group_name ! output buffer - character(len=30) :: efmt = '(A14, 99ES12.3)' - character(len=30) :: ffmt = '(A14, 99F8.3)' - character(len=30) :: ifmt = '(A14, I4)' + character(len=30), parameter :: efmt = '(A14, 99ES12.3)' + character(len=30), parameter :: ffmt = '(A14, 99F8.3)' + character(len=30), parameter :: ifmt = '(A14, I4)' logical :: file_exists diff --git a/kap/private/kap_eval.f90 b/kap/private/kap_eval.f90 index 6bb8f7040..e826b0bb8 100644 --- a/kap/private/kap_eval.f90 +++ b/kap/private/kap_eval.f90 @@ -416,7 +416,7 @@ subroutine Get_kap_lowT_Results( & real(dp) :: logKap - logical :: dbg = .false. + logical, parameter :: dbg = .false. ierr = -1 ! should be set by each case, otherwise something is wrong frac_Type2 = 0d0 diff --git a/kap/public/kap_def.f90 b/kap/public/kap_def.f90 index 5ebe3978c..56c6fa2bf 100644 --- a/kap/public/kap_def.f90 +++ b/kap/public/kap_def.f90 @@ -393,7 +393,7 @@ end subroutine other_radiative_opacity_interface logical :: clip_to_kap_table_boundaries = .true. ! typically, this should be set true. ! if this is set true, then temperature and density args are ! clipped to the boundaries of the table. - real(dp) :: kap_min_logRho = -40d0 + real(dp), parameter :: kap_min_logRho = -40d0 ! below this, clip logRho and set partials wrt logRho to zero diff --git a/rates/private/reaclib_support.f90 b/rates/private/reaclib_support.f90 index 2917d7887..299642e99 100644 --- a/rates/private/reaclib_support.f90 +++ b/rates/private/reaclib_support.f90 @@ -385,7 +385,7 @@ subroutine reverse_reaction_handle(num_in, num_out, iso_ids, handle) integer, intent(in) :: iso_ids(:) character (len=*), intent(out) :: handle logical, parameter :: reverse = .true. - character (len=1) :: reaction_flag = '-' + character (len=1), parameter :: reaction_flag = '-' call get1_reaction_handle(num_in, num_out, iso_ids, chem_isos, reverse, reaction_flag, handle) end subroutine reverse_reaction_handle @@ -405,7 +405,7 @@ subroutine get_reverse_reaction_handle(num_in, num_out, pspecies, nuclides, hand type(nuclide_data), intent(in) :: nuclides character (len=*), intent(out) :: handle logical, parameter :: reverse = .true. - character (len=1) :: reaction_flag = '-' + character (len=1), parameter :: reaction_flag = '-' call get1_reaction_handle(num_in, num_out, pspecies, nuclides, reverse, reaction_flag, handle) end subroutine get_reverse_reaction_handle diff --git a/rates/private/suzuki_tables.f90 b/rates/private/suzuki_tables.f90 index 482c32f56..d063f883d 100644 --- a/rates/private/suzuki_tables.f90 +++ b/rates/private/suzuki_tables.f90 @@ -113,7 +113,7 @@ subroutine interpolate_suzuki_table(table, T9, lYeRho, & real(dp) :: decay, capture, nu, decay_nu, capture_nu - logical :: dbg = .false. + logical, parameter :: dbg = .false. logT = log10(T9) + 9d0 diff --git a/rates/private/weaklib_tables.f90 b/rates/private/weaklib_tables.f90 index eb763b4a4..030e93334 100644 --- a/rates/private/weaklib_tables.f90 +++ b/rates/private/weaklib_tables.f90 @@ -212,7 +212,7 @@ subroutine interpolate_weaklib_table(table, T9, lYeRho, & real(dp) :: decay, capture - logical :: dbg = .false. + logical, parameter :: dbg = .false. xget = T9 yget = lYeRho diff --git a/rates/public/rates_def.f90 b/rates/public/rates_def.f90 index 32f43a535..d9d7b54a1 100644 --- a/rates/public/rates_def.f90 +++ b/rates/public/rates_def.f90 @@ -73,8 +73,8 @@ module rates_def r_one_four = 11 - integer, dimension(nchapters) :: Nin = (/1, 1, 1, 2, 2, 2, 2, 3, 3, 4, 1/) - integer, dimension(nchapters) :: Nout = (/1, 2, 3, 1, 2, 3, 4, 1, 2, 2, 4/) + integer, dimension(nchapters), parameter :: Nin = (/1, 1, 1, 2, 2, 2, 2, 3, 3, 4, 1/) + integer, dimension(nchapters), parameter :: Nout = (/1, 2, 3, 1, 2, 3, 4, 1, 2, 2, 4/) type reaclib_data diff --git a/rates/public/rates_lib.f90 b/rates/public/rates_lib.f90 index 8cad1e0ae..86e0f01aa 100644 --- a/rates/public/rates_lib.f90 +++ b/rates/public/rates_lib.f90 @@ -519,7 +519,7 @@ subroutine reaclib_create_handle(num_in, num_out, iso_ids, handle) integer, intent(in) :: num_in, num_out integer, intent(in) :: iso_ids(:) ! holds chem_ids for input and output species character (len=*), intent(out) :: handle - character (len=1) :: reaction_flag = '-' + character (len=1), parameter :: reaction_flag = '-' call reaction_handle(num_in, num_out, iso_ids, reaction_flag, handle) end subroutine reaclib_create_handle @@ -528,7 +528,7 @@ subroutine reaclib_create_ec_handle(num_in, num_out, iso_ids, handle) integer, intent(in) :: num_in, num_out integer, intent(in) :: iso_ids(:) ! holds chem_ids for input and output species character (len=*), intent(out) :: handle - character (len=1) :: reaction_flag = 'e' + character (len=1), parameter :: reaction_flag = 'e' call reaction_handle(num_in, num_out, iso_ids, reaction_flag, handle) end subroutine reaclib_create_ec_handle @@ -537,7 +537,7 @@ subroutine reaclib_create_wk_handle(num_in, num_out, iso_ids, handle) integer, intent(in) :: num_in, num_out integer, intent(in) :: iso_ids(:) ! holds chem_ids for input and output species character (len=*), intent(out) :: handle - character (len=1) :: reaction_flag = 'w' + character (len=1), parameter :: reaction_flag = 'w' call reaction_handle(num_in, num_out, iso_ids, reaction_flag, handle) end subroutine reaclib_create_wk_handle diff --git a/star/other/sample_pgstar_plot.f90 b/star/other/sample_pgstar_plot.f90 index a8e5c8f98..d57ec11c7 100644 --- a/star/other/sample_pgstar_plot.f90 +++ b/star/other/sample_pgstar_plot.f90 @@ -212,7 +212,7 @@ subroutine do_my_plot(s, device_id, & integer :: grid_min, grid_max, npts, nz real, allocatable, dimension(:) :: xvec, yvec, yvec2, yvec3 - logical :: dbg = .false. + logical, parameter :: dbg = .false. include 'formats' ierr = 0 diff --git a/star/private/eps_mdot.f90 b/star/private/eps_mdot.f90 index a43fcedb4..b2b301f61 100644 --- a/star/private/eps_mdot.f90 +++ b/star/private/eps_mdot.f90 @@ -466,7 +466,7 @@ subroutine calculate_eps_mdot(s, dt, ierr) integer :: ierr ! Intermediates - logical :: dbg = .false. + logical, parameter :: dbg = .false. integer :: nz, j real(dp) delta_m, change_sum, leak_sum, err, abs_err, mdot_adiabatic_surface, gradT_mid real(dp), dimension(:), allocatable :: & diff --git a/star/private/hydro_eqns.f90 b/star/private/hydro_eqns.f90 index 931d48be5..575ac0cff 100644 --- a/star/private/hydro_eqns.f90 +++ b/star/private/hydro_eqns.f90 @@ -405,7 +405,7 @@ subroutine fix_d_eos_dxa_partials(s, k, ierr) integer :: i_var, i_var_sink - real(dp) :: dxa_threshold = 1d-4 + real(dp), parameter :: dxa_threshold = 1d-4 logical, parameter :: checking = .true. diff --git a/star/private/relax.f90 b/star/private/relax.f90 index 62ac99ea3..05f5d1b22 100644 --- a/star/private/relax.f90 +++ b/star/private/relax.f90 @@ -33,7 +33,7 @@ module relax real(dp), parameter :: min_dlnz = -12 - real(dp) :: min_z = 1d-12 + real(dp), parameter :: min_z = 1d-12 ! some relax routines depend on things such as other_energy and other_torque ! to which interpolation parameters cannot be passed directly. So for simplicity diff --git a/star/private/remove_shells.f90 b/star/private/remove_shells.f90 index 0562f79fa..b09c055a0 100644 --- a/star/private/remove_shells.f90 +++ b/star/private/remove_shells.f90 @@ -1159,7 +1159,7 @@ subroutine do_relax_to_star_cut( & real(dp) :: time integer :: num_pts, k0, species logical :: save_have_mlt_vc - logical :: dbg = .false. + logical, parameter :: dbg = .false. ierr = 0 call get_star_ptr(id, s, ierr) diff --git a/star/private/rsp_lina.f90 b/star/private/rsp_lina.f90 index f9a2f79ba..e578307f8 100644 --- a/star/private/rsp_lina.f90 +++ b/star/private/rsp_lina.f90 @@ -944,7 +944,7 @@ subroutine do_LINA(s, L0, NZN, NMODES, VEL, PERS, ETO, & WORKx,4*NZN3,INFO) if(INFO/=0)then write(*,*) 'FAILED!' - write(*,*) 'LAPACK/DGEEV error, ier= ',INFO + write(*,*) 'LAPACK/DGEEV error, ierr= ',INFO ierr = -1 return stop diff --git a/star/private/star_utils.f90 b/star/private/star_utils.f90 index 365b16f92..335e9cd79 100644 --- a/star/private/star_utils.f90 +++ b/star/private/star_utils.f90 @@ -2514,7 +2514,7 @@ logical function after_He_burn(s, he4_limit) type (star_info), pointer :: s real(dp), intent(in) :: he4_limit integer :: nz, h1, he4 - real(dp) :: small = 1d-4 + real(dp), parameter :: small = 1d-4 after_He_burn = .false. nz = s% nz h1 = s% net_iso(ih1) @@ -2530,7 +2530,7 @@ logical function after_C_burn(s, c12_limit) type (star_info), pointer :: s real(dp), intent(in) :: c12_limit integer :: nz, h1, he4, c12 - real(dp) :: small = 1d-4 + real(dp), parameter :: small = 1d-4 after_C_burn = .false. nz = s% nz h1 = s% net_iso(ih1) From cc29f7d81dfa1bb08bfbfa2c4a6bf82d543fe073 Mon Sep 17 00:00:00 2001 From: pmocz Date: Fri, 6 Sep 2024 09:23:54 -0400 Subject: [PATCH 2/5] 1_dp to 1.0_dp (no consequence here but better practice) --- math/private/math_pown.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/math/private/math_pown.f90 b/math/private/math_pown.f90 index 75a862973..d11c66992 100644 --- a/math/private/math_pown.f90 +++ b/math/private/math_pown.f90 @@ -89,7 +89,7 @@ elemental function powm1_ (x) result (powm1_x) real(dp), intent(in) :: x real(dp) :: powm1_x - powm1_x = 1_dp / x + powm1_x = 1.0_dp / x end function powm1_ From c63bd33d29f289f5abde2d6569c0682854880f5a Mon Sep 17 00:00:00 2001 From: pmocz Date: Fri, 6 Sep 2024 10:54:05 -0400 Subject: [PATCH 3/5] changing some 0_dp to 0.0_dp (should not impact code) --- .../auto_diff_real_15var_order1_module.f90 | 4 +- .../auto_diff_real_1var_order1_module.f90 | 6 +-- .../auto_diff_real_2var_order1_module.f90 | 16 +++--- .../auto_diff_real_2var_order2_module.f90 | 32 ++++++------ .../auto_diff_real_2var_order3_module.f90 | 52 +++++++++---------- .../auto_diff_real_4var_order1_module.f90 | 48 ++++++++--------- .../auto_diff_real_star_order1_module.f90 | 4 +- .../private/auto_diff_real_tdc_module.f90 | 16 +++--- 8 files changed, 89 insertions(+), 89 deletions(-) diff --git a/auto_diff/private/auto_diff_real_15var_order1_module.f90 b/auto_diff/private/auto_diff_real_15var_order1_module.f90 index abd3a253a..06da648a3 100644 --- a/auto_diff/private/auto_diff_real_15var_order1_module.f90 +++ b/auto_diff/private/auto_diff_real_15var_order1_module.f90 @@ -306,14 +306,14 @@ subroutine assign_from_real_dp(this, other) type(auto_diff_real_15var_order1), intent(out) :: this real(dp), intent(in) :: other this%val = other - this%d1Array = 0_dp + this%d1Array = 0.0_dp end subroutine assign_from_real_dp subroutine assign_from_int(this, other) type(auto_diff_real_15var_order1), intent(out) :: this integer, intent(in) :: other this%val = other - this%d1Array = 0_dp + this%d1Array = 0.0_dp end subroutine assign_from_int function equal_self(this, other) result(z) diff --git a/auto_diff/private/auto_diff_real_1var_order1_module.f90 b/auto_diff/private/auto_diff_real_1var_order1_module.f90 index 57b87a844..9b86f2efe 100644 --- a/auto_diff/private/auto_diff_real_1var_order1_module.f90 +++ b/auto_diff/private/auto_diff_real_1var_order1_module.f90 @@ -372,14 +372,14 @@ subroutine assign_from_real_dp(this, other) type(auto_diff_real_1var_order1), intent(out) :: this real(dp), intent(in) :: other this%val = other - this%d1val1 = 0_dp + this%d1val1 = 0.0_dp end subroutine assign_from_real_dp subroutine assign_from_int(this, other) type(auto_diff_real_1var_order1), intent(out) :: this integer, intent(in) :: other this%val = other - this%d1val1 = 0_dp + this%d1val1 = 0.0_dp end subroutine assign_from_int function equal_self(this, other) result(z) @@ -1294,7 +1294,7 @@ function differentiate_auto_diff_real_1var_order1_1(this) result(derivative) type(auto_diff_real_1var_order1), intent(in) :: this type(auto_diff_real_1var_order1) :: derivative derivative%val = this%d1val1 - derivative%d1val1 = 0_dp + derivative%d1val1 = 0.0_dp end function differentiate_auto_diff_real_1var_order1_1 end module auto_diff_real_1var_order1_module \ No newline at end of file diff --git a/auto_diff/private/auto_diff_real_2var_order1_module.f90 b/auto_diff/private/auto_diff_real_2var_order1_module.f90 index f83f2a920..257939d9f 100644 --- a/auto_diff/private/auto_diff_real_2var_order1_module.f90 +++ b/auto_diff/private/auto_diff_real_2var_order1_module.f90 @@ -379,16 +379,16 @@ subroutine assign_from_real_dp(this, other) type(auto_diff_real_2var_order1), intent(out) :: this real(dp), intent(in) :: other this%val = other - this%d1val1 = 0_dp - this%d1val2 = 0_dp + this%d1val1 = 0.0_dp + this%d1val2 = 0.0_dp end subroutine assign_from_real_dp subroutine assign_from_int(this, other) type(auto_diff_real_2var_order1), intent(out) :: this integer, intent(in) :: other this%val = other - this%d1val1 = 0_dp - this%d1val2 = 0_dp + this%d1val1 = 0.0_dp + this%d1val2 = 0.0_dp end subroutine assign_from_int function equal_self(this, other) result(z) @@ -1511,16 +1511,16 @@ function differentiate_auto_diff_real_2var_order1_1(this) result(derivative) type(auto_diff_real_2var_order1), intent(in) :: this type(auto_diff_real_2var_order1) :: derivative derivative%val = this%d1val1 - derivative%d1val1 = 0_dp - derivative%d1val2 = 0_dp + derivative%d1val1 = 0.0_dp + derivative%d1val2 = 0.0_dp end function differentiate_auto_diff_real_2var_order1_1 function differentiate_auto_diff_real_2var_order1_2(this) result(derivative) type(auto_diff_real_2var_order1), intent(in) :: this type(auto_diff_real_2var_order1) :: derivative derivative%val = this%d1val2 - derivative%d1val1 = 0_dp - derivative%d1val2 = 0_dp + derivative%d1val1 = 0.0_dp + derivative%d1val2 = 0.0_dp end function differentiate_auto_diff_real_2var_order1_2 end module auto_diff_real_2var_order1_module \ No newline at end of file diff --git a/auto_diff/private/auto_diff_real_2var_order2_module.f90 b/auto_diff/private/auto_diff_real_2var_order2_module.f90 index 58534f842..ebd151bf3 100644 --- a/auto_diff/private/auto_diff_real_2var_order2_module.f90 +++ b/auto_diff/private/auto_diff_real_2var_order2_module.f90 @@ -385,22 +385,22 @@ subroutine assign_from_real_dp(this, other) type(auto_diff_real_2var_order2), intent(out) :: this real(dp), intent(in) :: other this%val = other - this%d1val1 = 0_dp - this%d1val2 = 0_dp - this%d2val1 = 0_dp - this%d1val1_d1val2 = 0_dp - this%d2val2 = 0_dp + this%d1val1 = 0.0_dp + this%d1val2 = 0.0_dp + this%d2val1 = 0.0_dp + this%d1val1_d1val2 = 0.0_dp + this%d2val2 = 0.0_dp end subroutine assign_from_real_dp subroutine assign_from_int(this, other) type(auto_diff_real_2var_order2), intent(out) :: this integer, intent(in) :: other this%val = other - this%d1val1 = 0_dp - this%d1val2 = 0_dp - this%d2val1 = 0_dp - this%d1val1_d1val2 = 0_dp - this%d2val2 = 0_dp + this%d1val1 = 0.0_dp + this%d1val2 = 0.0_dp + this%d2val1 = 0.0_dp + this%d1val1_d1val2 = 0.0_dp + this%d2val2 = 0.0_dp end subroutine assign_from_int function equal_self(this, other) result(z) @@ -1969,9 +1969,9 @@ function differentiate_auto_diff_real_2var_order2_1(this) result(derivative) derivative%val = this%d1val1 derivative%d1val1 = this%d2val1 derivative%d1val2 = this%d1val1_d1val2 - derivative%d2val1 = 0_dp - derivative%d1val1_d1val2 = 0_dp - derivative%d2val2 = 0_dp + derivative%d2val1 = 0.0_dp + derivative%d1val1_d1val2 = 0.0_dp + derivative%d2val2 = 0.0_dp end function differentiate_auto_diff_real_2var_order2_1 function differentiate_auto_diff_real_2var_order2_2(this) result(derivative) @@ -1980,9 +1980,9 @@ function differentiate_auto_diff_real_2var_order2_2(this) result(derivative) derivative%val = this%d1val2 derivative%d1val1 = this%d1val1_d1val2 derivative%d1val2 = this%d2val2 - derivative%d2val1 = 0_dp - derivative%d1val1_d1val2 = 0_dp - derivative%d2val2 = 0_dp + derivative%d2val1 = 0.0_dp + derivative%d1val1_d1val2 = 0.0_dp + derivative%d2val2 = 0.0_dp end function differentiate_auto_diff_real_2var_order2_2 end module auto_diff_real_2var_order2_module \ No newline at end of file diff --git a/auto_diff/private/auto_diff_real_2var_order3_module.f90 b/auto_diff/private/auto_diff_real_2var_order3_module.f90 index 92a7d7ef0..1cc5ff8e2 100644 --- a/auto_diff/private/auto_diff_real_2var_order3_module.f90 +++ b/auto_diff/private/auto_diff_real_2var_order3_module.f90 @@ -393,30 +393,30 @@ subroutine assign_from_real_dp(this, other) type(auto_diff_real_2var_order3), intent(out) :: this real(dp), intent(in) :: other this%val = other - this%d1val1 = 0_dp - this%d1val2 = 0_dp - this%d2val1 = 0_dp - this%d1val1_d1val2 = 0_dp - this%d2val2 = 0_dp - this%d3val1 = 0_dp - this%d2val1_d1val2 = 0_dp - this%d1val1_d2val2 = 0_dp - this%d3val2 = 0_dp + this%d1val1 = 0.0_dp + this%d1val2 = 0.0_dp + this%d2val1 = 0.0_dp + this%d1val1_d1val2 = 0.0_dp + this%d2val2 = 0.0_dp + this%d3val1 = 0.0_dp + this%d2val1_d1val2 = 0.0_dp + this%d1val1_d2val2 = 0.0_dp + this%d3val2 = 0.0_dp end subroutine assign_from_real_dp subroutine assign_from_int(this, other) type(auto_diff_real_2var_order3), intent(out) :: this integer, intent(in) :: other this%val = other - this%d1val1 = 0_dp - this%d1val2 = 0_dp - this%d2val1 = 0_dp - this%d1val1_d1val2 = 0_dp - this%d2val2 = 0_dp - this%d3val1 = 0_dp - this%d2val1_d1val2 = 0_dp - this%d1val1_d2val2 = 0_dp - this%d3val2 = 0_dp + this%d1val1 = 0.0_dp + this%d1val2 = 0.0_dp + this%d2val1 = 0.0_dp + this%d1val1_d1val2 = 0.0_dp + this%d2val2 = 0.0_dp + this%d3val1 = 0.0_dp + this%d2val1_d1val2 = 0.0_dp + this%d1val1_d2val2 = 0.0_dp + this%d3val2 = 0.0_dp end subroutine assign_from_int function equal_self(this, other) result(z) @@ -3317,10 +3317,10 @@ function differentiate_auto_diff_real_2var_order3_1(this) result(derivative) derivative%d2val1 = this%d3val1 derivative%d1val1_d1val2 = this%d2val1_d1val2 derivative%d2val2 = this%d1val1_d2val2 - derivative%d3val1 = 0_dp - derivative%d2val1_d1val2 = 0_dp - derivative%d1val1_d2val2 = 0_dp - derivative%d3val2 = 0_dp + derivative%d3val1 = 0.0_dp + derivative%d2val1_d1val2 = 0.0_dp + derivative%d1val1_d2val2 = 0.0_dp + derivative%d3val2 = 0.0_dp end function differentiate_auto_diff_real_2var_order3_1 function differentiate_auto_diff_real_2var_order3_2(this) result(derivative) @@ -3332,10 +3332,10 @@ function differentiate_auto_diff_real_2var_order3_2(this) result(derivative) derivative%d2val1 = this%d2val1_d1val2 derivative%d1val1_d1val2 = this%d1val1_d2val2 derivative%d2val2 = this%d3val2 - derivative%d3val1 = 0_dp - derivative%d2val1_d1val2 = 0_dp - derivative%d1val1_d2val2 = 0_dp - derivative%d3val2 = 0_dp + derivative%d3val1 = 0.0_dp + derivative%d2val1_d1val2 = 0.0_dp + derivative%d1val1_d2val2 = 0.0_dp + derivative%d3val2 = 0.0_dp end function differentiate_auto_diff_real_2var_order3_2 end module auto_diff_real_2var_order3_module \ No newline at end of file diff --git a/auto_diff/private/auto_diff_real_4var_order1_module.f90 b/auto_diff/private/auto_diff_real_4var_order1_module.f90 index 1c8c97be2..78001364f 100644 --- a/auto_diff/private/auto_diff_real_4var_order1_module.f90 +++ b/auto_diff/private/auto_diff_real_4var_order1_module.f90 @@ -393,20 +393,20 @@ subroutine assign_from_real_dp(this, other) type(auto_diff_real_4var_order1), intent(out) :: this real(dp), intent(in) :: other this%val = other - this%d1val1 = 0_dp - this%d1val2 = 0_dp - this%d1val3 = 0_dp - this%d1val4 = 0_dp + this%d1val1 = 0.0_dp + this%d1val2 = 0.0_dp + this%d1val3 = 0.0_dp + this%d1val4 = 0.0_dp end subroutine assign_from_real_dp subroutine assign_from_int(this, other) type(auto_diff_real_4var_order1), intent(out) :: this integer, intent(in) :: other this%val = other - this%d1val1 = 0_dp - this%d1val2 = 0_dp - this%d1val3 = 0_dp - this%d1val4 = 0_dp + this%d1val1 = 0.0_dp + this%d1val2 = 0.0_dp + this%d1val3 = 0.0_dp + this%d1val4 = 0.0_dp end subroutine assign_from_int function equal_self(this, other) result(z) @@ -1693,40 +1693,40 @@ function differentiate_auto_diff_real_4var_order1_1(this) result(derivative) type(auto_diff_real_4var_order1), intent(in) :: this type(auto_diff_real_4var_order1) :: derivative derivative%val = this%d1val1 - derivative%d1val1 = 0_dp - derivative%d1val2 = 0_dp - derivative%d1val3 = 0_dp - derivative%d1val4 = 0_dp + derivative%d1val1 = 0.0_dp + derivative%d1val2 = 0.0_dp + derivative%d1val3 = 0.0_dp + derivative%d1val4 = 0.0_dp end function differentiate_auto_diff_real_4var_order1_1 function differentiate_auto_diff_real_4var_order1_2(this) result(derivative) type(auto_diff_real_4var_order1), intent(in) :: this type(auto_diff_real_4var_order1) :: derivative derivative%val = this%d1val2 - derivative%d1val1 = 0_dp - derivative%d1val2 = 0_dp - derivative%d1val3 = 0_dp - derivative%d1val4 = 0_dp + derivative%d1val1 = 0.0_dp + derivative%d1val2 = 0.0_dp + derivative%d1val3 = 0.0_dp + derivative%d1val4 = 0.0_dp end function differentiate_auto_diff_real_4var_order1_2 function differentiate_auto_diff_real_4var_order1_3(this) result(derivative) type(auto_diff_real_4var_order1), intent(in) :: this type(auto_diff_real_4var_order1) :: derivative derivative%val = this%d1val3 - derivative%d1val1 = 0_dp - derivative%d1val2 = 0_dp - derivative%d1val3 = 0_dp - derivative%d1val4 = 0_dp + derivative%d1val1 = 0.0_dp + derivative%d1val2 = 0.0_dp + derivative%d1val3 = 0.0_dp + derivative%d1val4 = 0.0_dp end function differentiate_auto_diff_real_4var_order1_3 function differentiate_auto_diff_real_4var_order1_4(this) result(derivative) type(auto_diff_real_4var_order1), intent(in) :: this type(auto_diff_real_4var_order1) :: derivative derivative%val = this%d1val4 - derivative%d1val1 = 0_dp - derivative%d1val2 = 0_dp - derivative%d1val3 = 0_dp - derivative%d1val4 = 0_dp + derivative%d1val1 = 0.0_dp + derivative%d1val2 = 0.0_dp + derivative%d1val3 = 0.0_dp + derivative%d1val4 = 0.0_dp end function differentiate_auto_diff_real_4var_order1_4 end module auto_diff_real_4var_order1_module \ No newline at end of file diff --git a/auto_diff/private/auto_diff_real_star_order1_module.f90 b/auto_diff/private/auto_diff_real_star_order1_module.f90 index dad0e88c0..cc9df242d 100644 --- a/auto_diff/private/auto_diff_real_star_order1_module.f90 +++ b/auto_diff/private/auto_diff_real_star_order1_module.f90 @@ -367,14 +367,14 @@ subroutine assign_from_real_dp(this, other) type(auto_diff_real_star_order1), intent(out) :: this real(dp), intent(in) :: other this%val = other - this%d1Array = 0_dp + this%d1Array = 0.0_dp end subroutine assign_from_real_dp subroutine assign_from_int(this, other) type(auto_diff_real_star_order1), intent(out) :: this integer, intent(in) :: other this%val = other - this%d1Array = 0_dp + this%d1Array = 0.0_dp end subroutine assign_from_int function equal_self(this, other) result(z) diff --git a/auto_diff/private/auto_diff_real_tdc_module.f90 b/auto_diff/private/auto_diff_real_tdc_module.f90 index 6995f681f..39a11feae 100644 --- a/auto_diff/private/auto_diff_real_tdc_module.f90 +++ b/auto_diff/private/auto_diff_real_tdc_module.f90 @@ -376,18 +376,18 @@ subroutine assign_from_real_dp(this, other) type(auto_diff_real_tdc), intent(out) :: this real(dp), intent(in) :: other this%val = other - this%d1val1 = 0_dp - this%d1Array = 0_dp - this%d1val1_d1Array = 0_dp + this%d1val1 = 0.0_dp + this%d1Array = 0.0_dp + this%d1val1_d1Array = 0.0_dp end subroutine assign_from_real_dp subroutine assign_from_int(this, other) type(auto_diff_real_tdc), intent(out) :: this integer, intent(in) :: other this%val = other - this%d1val1 = 0_dp - this%d1Array = 0_dp - this%d1val1_d1Array = 0_dp + this%d1val1 = 0.0_dp + this%d1Array = 0.0_dp + this%d1val1_d1Array = 0.0_dp end subroutine assign_from_int function equal_self(this, other) result(z) @@ -1678,9 +1678,9 @@ function differentiate_auto_diff_real_tdc_1(this) result(derivative) type(auto_diff_real_tdc), intent(in) :: this type(auto_diff_real_tdc) :: derivative derivative%val = this%d1val1 - derivative%d1val1 = 0_dp + derivative%d1val1 = 0.0_dp derivative%d1Array = this%d1val1_d1Array - derivative%d1val1_d1Array = 0_dp + derivative%d1val1_d1Array = 0.0_dp end function differentiate_auto_diff_real_tdc_1 end module auto_diff_real_tdc_module From 079f2d79ebac5b77329f55a139500ec544298fae Mon Sep 17 00:00:00 2001 From: pmocz Date: Fri, 6 Sep 2024 11:16:29 -0400 Subject: [PATCH 4/5] 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 From 08b31d7289d39798c8d3b9b19acf6b1507cdc940 Mon Sep 17 00:00:00 2001 From: pmocz Date: Fri, 6 Sep 2024 12:58:47 -0400 Subject: [PATCH 5/5] change debug param name all to dbg for more consistency --- atm/private/atm_table.f90 | 10 +++---- star/private/overshoot.f90 | 16 +++++------ star/private/predictive_mix.f90 | 50 ++++++++++++++++----------------- star/private/pulse_utils.f90 | 8 +++--- 4 files changed, 42 insertions(+), 42 deletions(-) diff --git a/atm/private/atm_table.f90 b/atm/private/atm_table.f90 index 1b6f976f8..68b985405 100644 --- a/atm/private/atm_table.f90 +++ b/atm/private/atm_table.f90 @@ -80,7 +80,7 @@ subroutine eval_table( & real(dp), intent(out) :: dlnP_dlnkap integer, intent(out) :: ierr - logical, parameter :: DBG = .FALSE. + logical, parameter :: dbg = .false. real(dp) :: g real(dp) :: logg @@ -125,14 +125,14 @@ subroutine eval_table( & ! Perform the table lookup - if (DBG) write(*,*) 'call get_table_values', id + if (dbg) write(*,*) 'call get_table_values', id call get_table_values( & id, Z, logg, Teff, & Pgas, dPgas_dTeff, dPgas_dlogg, & T, dT_dTeff, dT_dlogg, & ierr) if (ierr /= 0) then - if (DBG) write(*,*) 'get_table_values(_at_fixed_Z) ierr', ierr + if (dbg) write(*,*) 'get_table_values(_at_fixed_Z) ierr', ierr return end if @@ -191,7 +191,7 @@ subroutine eval_table( & endif - if (DBG .or. is_bad(lnP) .or. is_bad(lnT)) then + if (dbg .or. is_bad(lnP) .or. is_bad(lnT)) then write(*,*) 'eval_table' write(*,1) 'Teff', Teff write(*,1) 'T', T @@ -234,7 +234,7 @@ subroutine get_table_alfa_beta( & integer, parameter :: BLEND_IN_Y = 4 integer, parameter :: BLEND_CORNER_OUT = 5 - logical, parameter :: DBG = .FALSE. + logical, parameter :: dbg = .false. real(dp) :: g real(dp) :: logTeff diff --git a/star/private/overshoot.f90 b/star/private/overshoot.f90 index b0da9a261..3b4c645df 100644 --- a/star/private/overshoot.f90 +++ b/star/private/overshoot.f90 @@ -54,7 +54,7 @@ subroutine add_overshooting (s, ierr) type(star_info), pointer :: s integer, intent(out) :: ierr - logical, parameter :: DEBUG = .FALSE. + logical, parameter :: dbg = .false. integer :: i integer :: j @@ -79,7 +79,7 @@ subroutine add_overshooting (s, ierr) ierr = 0 - if (DEBUG) then + if (dbg) then write(*, 3) 'add_overshooting; model, n_conv_bdy=', s%model_number, s%num_conv_boundaries end if @@ -90,7 +90,7 @@ subroutine add_overshooting (s, ierr) ! Skip this boundary if it's too close to the center if (s%conv_bdy_q(i) < s%min_overshoot_q) then - if (DEBUG) then + if (dbg) then write(*,*) 'skip since s%conv_bdy_q(i) < min_overshoot_q', i endif cycle conv_bdy_loop @@ -100,7 +100,7 @@ subroutine add_overshooting (s, ierr) ! overshoot there if (s%conv_bdy_loc(i) == 1) then - if (DEBUG) then + if (dbg) then write(*,*) 'skip since s%conv_bdy_loc(i) == 1', i endif cycle conv_bdy_loop @@ -127,7 +127,7 @@ subroutine add_overshooting (s, ierr) s%burn_he_conv_region(i) .OR. & s%burn_z_conv_region(i) ) case ('any') - match_zone_type = .TRUE. + match_zone_type = .true. case default write(*,*) 'Invalid overshoot_zone_type: j, s%overshoot_zone_type(j)=', j, s%overshoot_zone_type(j) ierr = -1 @@ -142,7 +142,7 @@ subroutine add_overshooting (s, ierr) case ('shell') match_zone_loc = .NOT. is_core case ('any') - match_zone_loc = .TRUE. + match_zone_loc = .true. case default write(*,*) 'Invalid overshoot_zone_loc: j, s%overshoot_zone_loc(j)=', j, s%overshoot_zone_loc(j) ierr = -1 @@ -155,7 +155,7 @@ subroutine add_overshooting (s, ierr) case ('top') match_bdy_loc = s%top_conv_bdy(i) case ('any') - match_bdy_loc = .TRUE. + match_bdy_loc = .true. case default write(*,*) 'Invalid overshoot_bdy_loc: j, s%overshoot_bdy_loc(j)=', j, s%overshoot_bdy_loc(j) ierr = -1 @@ -164,7 +164,7 @@ subroutine add_overshooting (s, ierr) if (.NOT. (match_zone_type .AND. match_zone_loc .AND. match_bdy_loc)) cycle criteria_loop - if (DEBUG) then + if (dbg) then write(*,*) 'Overshooting at convective boundary: i, j=', i, j write(*,*) ' s%overshoot_scheme=', TRIM(s%overshoot_scheme(j)) write(*,*) ' s%overshoot_zone_type=', TRIM(s%overshoot_zone_type(j)) diff --git a/star/private/predictive_mix.f90 b/star/private/predictive_mix.f90 index 08e0ef06e..f823c43c8 100644 --- a/star/private/predictive_mix.f90 +++ b/star/private/predictive_mix.f90 @@ -52,7 +52,7 @@ subroutine add_predictive_mixing (s, ierr) type(star_info), pointer :: s integer, intent(out) :: ierr - logical, parameter :: DEBUG = .FALSE. + logical, parameter :: dbg = .false. integer :: i integer :: j @@ -71,14 +71,14 @@ subroutine add_predictive_mixing (s, ierr) ierr = 0 - if (DEBUG) then + if (dbg) then write(*, *) 'add_predictive_mixing; model, n_conv_bdy=', & s%model_number, s%num_conv_boundaries end if ! Loop over convective boundaries, from center to surface - mix_mask = .FALSE. + mix_mask = .false. conv_bdy_loop : do i = 1, s%num_conv_boundaries @@ -86,7 +86,7 @@ subroutine add_predictive_mixing (s, ierr) ! predictively mix there if (s%conv_bdy_loc(i) == 1) then - if (DEBUG) then + if (dbg) then write(*,*) 'skip since s%conv_bdy_loc(i) == 1', i endif cycle conv_bdy_loop @@ -113,7 +113,7 @@ subroutine add_predictive_mixing (s, ierr) s%burn_he_conv_region(i) .OR. & s%burn_z_conv_region(i) ) case ('any') - match_zone_type = .TRUE. + match_zone_type = .true. case default write(*,*) 'Invalid predictive_zone_type: j, s%predictive_zone_type(j)=', j, s%predictive_zone_type(j) ierr = -1 @@ -136,7 +136,7 @@ subroutine add_predictive_mixing (s, ierr) case ('surf') match_zone_loc = is_surf_zone case ('any') - match_zone_loc = .TRUE. + match_zone_loc = .true. case default write(*,*) 'Invalid predictive_zone_loc: j, s%predictive_zone_loc(j)=', j, s%predictive_zone_loc(j) ierr = -1 @@ -149,7 +149,7 @@ subroutine add_predictive_mixing (s, ierr) case ('top') match_bdy_loc = s%top_conv_bdy(i) case ('any') - match_bdy_loc = .TRUE. + match_bdy_loc = .true. case default write(*,*) 'Invalid predictive_bdy_loc: j, s%predictive_bdy_loc(j)=', j, s%predictive_bdy_loc(j) ierr = -1 @@ -161,7 +161,7 @@ subroutine add_predictive_mixing (s, ierr) if (s%conv_bdy_q(i) < s%predictive_bdy_q_min(j) .OR. & s%conv_bdy_q(i) > s%predictive_bdy_q_max(j)) cycle criteria_loop - if (DEBUG) then + if (dbg) then write(*,*) 'Predictive mixing at convective boundary: i, j=', i, j write(*,*) ' s%predictive_zone_type=', TRIM(s%predictive_zone_type(j)) write(*,*) ' s%predictive_zone_loc=', TRIM(s%predictive_zone_loc(j)) @@ -219,8 +219,8 @@ subroutine do_predictive_mixing (s, i, j, ierr, mix_mask) integer, intent(out) :: ierr logical, intent(inout) :: mix_mask(:) - logical, parameter :: DEBUG = .FALSE. - logical, parameter :: DUMP_PREDICTIONS = .FALSE. + logical, parameter :: dbg = .false. + logical, parameter :: DUMP_PREDICTIONS = .false. real(dp) :: superad_thresh real(dp) :: ingest_factor @@ -330,7 +330,7 @@ subroutine do_predictive_mixing (s, i, j, ierr, mix_mask) end if - if (DEBUG) then + if (dbg) then if (k_bot_cz < s%nz) then write(*,*) 'Predictive mixing: i, j, q_top, q_bot:', i, j, s%q(k_top_cz), s%q(k_bot_cz+1) else @@ -401,7 +401,7 @@ subroutine do_predictive_mixing (s, i, j, ierr, mix_mask) if (.NOT. ALL(s%gradr(k_a:k_b) > s%grada_face(k_a:k_b))) then - ledoux_extension = .FALSE. + ledoux_extension = .false. else @@ -428,7 +428,7 @@ subroutine do_predictive_mixing (s, i, j, ierr, mix_mask) if (iso_r /= 0) then if (SIGN(1._dp, xa_mz_burn(iso_r)-xa_ez(iso_r)) /= SIGN(1._dp, xa_ez_burn(iso_r)-xa_ez(iso_r))) then - if (DEBUG) then + if (dbg) then write(*,*) 'Exiting predictive search due to abundance reversal' end if exit search_loop @@ -457,7 +457,7 @@ subroutine do_predictive_mixing (s, i, j, ierr, mix_mask) ! If the mass ingested exceeds the limit, finish the search if (m_ingest > m_ingest_limit) then - if (DEBUG) then + if (dbg) then write(*,*) 'Exiting predictive search due to ingestion limit exceeded' end if exit search_loop @@ -473,7 +473,7 @@ subroutine do_predictive_mixing (s, i, j, ierr, mix_mask) if (( outward .AND. gradr(k_a) < grada(k_a)) .OR. & (.NOT. outward .AND. gradr(k_b) < grada(k_b))) then - if (DEBUG) then + if (dbg) then write(*,*) 'Exiting predictive search due to non-convective growing boundary' endif exit search_loop @@ -491,7 +491,7 @@ subroutine do_predictive_mixing (s, i, j, ierr, mix_mask) endif if (superad_min <= superad_thresh) then - if (DEBUG) then + if (dbg) then write(*,*) 'Exiting predictive search due to convection-zone split' endif exit search_loop @@ -528,18 +528,18 @@ subroutine do_predictive_mixing (s, i, j, ierr, mix_mask) end do call mesa_error(__FILE__,__LINE__,'Double predictive') else - mix_mask(k_top_mz:k_bot_mz) = .FALSE. + mix_mask(k_top_mz:k_bot_mz) = .false. endif ! Return now if no additional mixing should occur if (outward .AND. k_top_mz == k_top_cz) then - if (DEBUG) then + if (dbg) then write(*,*) 'No predictive mixing at top of zone; boundary i=', i endif return elseif (.NOT. outward .AND. k_bot_mz == k_bot_cz) then - if (DEBUG) then + if (dbg) then write(*,*) 'No predictive mixing at bottom of zone; boundary i=', i endif return @@ -553,7 +553,7 @@ subroutine do_predictive_mixing (s, i, j, ierr, mix_mask) call eval_mixing_coeffs(s, k_bot_mz, k_top_mz, xa_mz_burn, & k_a, k_b, D, vc, grada, gradr, ierr) if (ierr /= 0) then - if (DEBUG) write(*,*) 'Non-zero return from eval_mixing_coeffs in do_predictive_mixing/predictive_mix' + if (dbg) write(*,*) 'Non-zero return from eval_mixing_coeffs in do_predictive_mixing/predictive_mix' return endif @@ -638,7 +638,7 @@ subroutine do_predictive_mixing (s, i, j, ierr, mix_mask) end if - if (DEBUG) then + if (dbg) then write(*,*) 'Predictive mixing: i, k_a, k_b, q_a, q_b, superad_min=', i, k_a, k_b, s%q(k_a), s%q(k_b), & superad_min endif @@ -709,7 +709,7 @@ subroutine eval_mixing_coeffs (s, k_bot_mz, k_top_mz, xa_mx, k_a, k_b, D, vc, gr real(dp), intent(out) :: gradr(:) integer, intent(out) :: ierr - logical, parameter :: DEBUG = .FALSE. + logical, parameter :: dbg = .false. real(dp) :: xh real(dp) :: xhe @@ -912,7 +912,7 @@ subroutine eval_eos (s, k, z, x, abar, zbar, xa, & real(dp), intent(out) :: d_dlnT(:) integer, intent(out) :: ierr - logical, parameter :: DEBUG = .FALSE. + logical, parameter :: dbg = .false. real(dp), parameter :: LOGRHO_TOL = 1E-8_dp real(dp), parameter :: LOGPGAS_TOL = 1E-8_dp @@ -924,7 +924,7 @@ subroutine eval_eos (s, k, z, x, abar, zbar, xa, & ! pressure are as specified in the model, but with abundances ! given by xa and other input abundance parameters - ! (NEEDS FIXING TO HANDLE CASE WHEN LNPGAS_FLAG = .TRUE.) + ! (NEEDS FIXING TO HANDLE CASE WHEN LNPGAS_FLAG = .true.) call solve_eos_given_PgasT( & s, k, xa, & @@ -932,7 +932,7 @@ subroutine eval_eos (s, k, z, x, abar, zbar, xa, & logRho, res, d_dlnd, d_dlnT, d_dxa, & ierr) if (ierr /= 0) then - if (DEBUG) write(*,*) 'Non-zero return from solve_eos_given_PgasT in eval_eos/predictive_mix' + if (dbg) write(*,*) 'Non-zero return from solve_eos_given_PgasT in eval_eos/predictive_mix' return endif diff --git a/star/private/pulse_utils.f90 b/star/private/pulse_utils.f90 index ab65d46d9..0cf357c21 100644 --- a/star/private/pulse_utils.f90 +++ b/star/private/pulse_utils.f90 @@ -61,7 +61,7 @@ subroutine set_segment_indices (s, k_a, k_b, include_last_face) integer, allocatable, intent(out) :: k_b(:) logical, intent(in) :: include_last_face - logical, parameter :: DEBUG = .FALSE. + logical, parameter :: dbg = .false. real(dp) :: grad_mu(s%nz) logical :: mask(s%nz) @@ -102,13 +102,13 @@ subroutine set_segment_indices (s, k_a, k_b, include_last_face) call qsort(i, s%nz, -ABS(grad_mu)) - mask(i(n_mk+1:)) = .FALSE. + mask(i(n_mk+1:)) = .false. endif else - mask = .FALSE. + mask = .false. endif @@ -131,7 +131,7 @@ subroutine set_segment_indices (s, k_a, k_b, include_last_face) sg = sg + 1 k_a(sg) = k - if (DEBUG) then + if (dbg) then write(*, 100) k, grad_mu(k) 100 format('placing double point at k=', I6, 1X, '(grad_mu=', 1PE10.3, ')') endif