Skip to content

Commit b7d6a92

Browse files
committed
address warricks comments
1 parent a96e1f0 commit b7d6a92

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

kap/private/op_eval_mombarg.f90

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ module op_eval_mombarg
99
real(dp), parameter :: log10_bohr_radius_sqr = -16.55280d0
1010
real(dp), parameter :: logNa = 23.779750912481397d0 !log10_cr(6.0221409d23) Avogadro's number
1111

12+
real(dp), parameter :: diff_v = (1.0552976117319748d0 - 0.00010565516589892675d0) !v(u(1)) - v(u(nptot))
13+
1214
contains
1315

1416

@@ -44,7 +46,7 @@ subroutine compute_grad(k, fk, logT_face, logRho_face,l, r,lkap_ross_cell, lgrad
4446
real(dp):: epa_mix_cell(1648), amu_mix_cell, logRho(1648),logT(1648) ! Number of electrons per atom, mean molecular weight, density and temperature as a function of ite (temp index) and jne (density index) from the OP mono data.
4547
real(dp) :: delta(1648)
4648
real(dp) :: lgamm_cell(nel) !interpolated log kappa Rossland and log gamma_k in each cell (k = element index).
47-
real(dp), parameter :: dv = (1.0552976117319748d0 - 0.00010565516589892675d0)/nptot !v(u(1)) - v(u(nptot))/nptot
49+
real(dp), parameter :: dv = diff_v/nptot !v(u(1)) - v(u(nptot))/nptot
4850
real(dp) :: mH
4951

5052
integer :: delta_min_idx
@@ -294,7 +296,7 @@ subroutine compute_gamma_grid(ngp, fk_all,lgamm_pcg, lkap_face_pcg, logT_pcg, lo
294296
!real(dp) :: fk_norm_fac !Local fractional abudance per element and normalization factor.
295297
real(dp):: epa_mix_cell(1648), amu_mix_cell, fk(nel) ! Number of electrons per atom, mean molecular weight, density and temperature as a function of ite (temp index) and jne (density index) from the OP mono data.
296298
!integer :: eid(nel)
297-
real(dp), parameter :: dv = (1.0552976117319748d0 - 0.00010565516589892675d0)/nptot !v(u(1)) - v(u(nptot))/nptot
299+
real(dp), parameter :: dv = diff_v/nptot !v(u(1)) - v(u(nptot))/nptot
298300
real(dp) :: mH
299301

300302
!!!! For interpolator.
@@ -398,7 +400,7 @@ subroutine compute_grad_fast(k,fk, logT_face, logRho_face, l, r,lgrad_cell, ierr
398400
real(dp) :: delta(1648)
399401
integer :: eid(nel)
400402
real(dp) :: lgamm_cell(nel) !interpolated log kappa Rossland and log gamma_k in each cell (k = element index).
401-
real(dp), parameter :: dv = (1.0552976117319748d0 - 0.00010565516589892675d0)/nptot !v(u(1)) - v(u(nptot))/nptot
403+
real(dp), parameter :: dv = diff_v/nptot !v(u(1)) - v(u(nptot))/nptot
402404
real(dp) :: mH
403405

404406
!!!! For interpolator.
@@ -617,7 +619,7 @@ subroutine compute_kappa(k,fk, logT_cntr, logRho_cntr, lkap_ross_cell, dlnkap_ra
617619
real(dp):: epa_mix_cell(1648), amu_mix_cell, logRho(1648),logT(1648) ! Number of electrons per atom, mean molecular weight, density and temperature as a function of ite (temp index) and jne (density index) from the OP mono data.
618620
real(dp) :: delta(1648)
619621
real(dp) :: lgamm_cell(nel) !interpolated log kappa Rossland and log gamma_k in each cell (k = element index).
620-
real(dp), parameter :: dv = (1.0552976117319748d0 - 0.00010565516589892675d0)/nptot !v(u(1)) - v(u(nptot))/nptot
622+
real(dp), parameter :: dv = diff_v/nptot !v(u(1)) - v(u(nptot))/nptot
621623
real(dp) :: mH
622624

623625

@@ -824,7 +826,7 @@ subroutine compute_kappa_grid(fk,lkap_ross_pcg, ierr,ite,jne,epatom,amamu,sig)
824826

825827
real(dp):: epa_mix_cell(1648), amu_mix_cell ! Number of electrons per atom, mean molecular weight, density and temperature as a function of ite (temp index) and jne (density index) from the OP mono data.
826828
real(dp) :: lgamm_cell(nel) !interpolated log kappa Rossland and log gamma_k in each cell (k = element index).
827-
real(dp), parameter :: dv = (1.0552976117319748d0 - 0.00010565516589892675d0)/nptot !v(u(1)) - v(u(nptot))/nptot
829+
real(dp), parameter :: dv = diff_v/nptot !v(u(1)) - v(u(nptot))/nptot
828830
real(dp) :: mH
829831

830832
!!!! For interpolator.
@@ -909,7 +911,7 @@ subroutine compute_kappa_fast(k,fk, logT_cntr, logRho_cntr,lkap_ross_cell, dlnka
909911
real(dp):: epa_mix_cell(1648), amu_mix_cell ! Number of electrons per atom, mean molecular weight, density and temperature as a function of ite (temp index) and jne (density index) from the OP mono data.
910912
real(dp) :: delta(1648)
911913
real(dp) :: lgamm_cell(nel) !interpolated log kappa Rossland and log gamma_k in each cell (k = element index).
912-
real(dp), parameter :: dv = (1.0552976117319748d0 - 0.00010565516589892675d0)/nptot !v(u(1)) - v(u(nptot))/nptot
914+
real(dp), parameter :: dv = diff_v/nptot !v(u(1)) - v(u(nptot))/nptot
913915
real(dp) :: mH
914916

915917
!!!! For interpolator.

star/private/pgstar_kipp.f90

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,11 @@ subroutine do_Kipp_Plot(s, id, device_id, &
107107

108108
integer :: ix,k
109109
real :: xleft,xright,now
110-
real :: dxmin
110+
real, save :: dxmin = -1.d0
111111

112112
include 'formats'
113113

114114
ierr = 0
115-
dxmin=-1.d0
116115

117116
mix_clr(convective_mixing) = clr_convection
118117
mix_clr(overshoot_mixing) = clr_overshoot

star/private/pgstar_rti.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ subroutine do_rti_Plot(s, id, device_id, &
9393

9494
integer :: ix,k
9595
real :: xleft,xright,now
96-
real, parameter :: dxmin = -1.d0
96+
real, save :: dxmin = -1.d0
9797

9898
include 'formats'
9999

0 commit comments

Comments
 (0)