Skip to content

Commit

Permalink
Merge pull request #8 from mabruzzo/gen2024-misc
Browse files Browse the repository at this point in the history
Gen2024 misc
  • Loading branch information
brittonsmith authored Dec 16, 2024
2 parents 45fcf22 + 37838a4 commit 55d9519
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 36 deletions.
6 changes: 3 additions & 3 deletions src/clib/calculate_cooling_time.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ int local_calculate_cooling_time(chemistry_data *my_chemistry,
my_fields->HeII_density,
my_fields->HeIII_density,
cooling_time,
my_fields->grid_dimension,
my_fields->grid_dimension+0,
my_fields->grid_dimension+1,
my_fields->grid_dimension+2,
&my_chemistry->NumberOfTemperatureBins,
Expand All @@ -237,10 +237,10 @@ int local_calculate_cooling_time(chemistry_data *my_chemistry,
&my_chemistry->use_dust_density_field,
&my_chemistry->dust_recombination_cooling,
&(my_fields->grid_rank),
my_fields->grid_start,
my_fields->grid_start+0,
my_fields->grid_start+1,
my_fields->grid_start+2,
my_fields->grid_end,
my_fields->grid_end+0,
my_fields->grid_end+1,
my_fields->grid_end+2,
&my_chemistry->ih2co,
Expand Down
6 changes: 3 additions & 3 deletions src/clib/calculate_dust_temperature.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,17 @@ int local_calculate_dust_temperature(chemistry_data *my_chemistry,
my_fields->HM_density,
my_fields->H2I_density,
my_fields->H2II_density,
my_fields->grid_dimension,
my_fields->grid_dimension+0,
my_fields->grid_dimension+1,
my_fields->grid_dimension+2,
&my_chemistry->NumberOfTemperatureBins,
&my_units->comoving_coordinates,
&my_chemistry->primordial_chemistry,
&(my_fields->grid_rank),
my_fields->grid_start,
my_fields->grid_start+0,
my_fields->grid_start+1,
my_fields->grid_start+2,
my_fields->grid_end,
my_fields->grid_end+0,
my_fields->grid_end+1,
my_fields->grid_end+2,
&my_units->a_value,
Expand Down
6 changes: 3 additions & 3 deletions src/clib/calculate_temperature.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,15 @@ int local_calculate_temperature_table(chemistry_data *my_chemistry,
my_fields->internal_energy,
my_fields->metal_density,
temperature,
my_fields->grid_dimension,
my_fields->grid_dimension+0,
my_fields->grid_dimension+1,
my_fields->grid_dimension+2,
&my_units->comoving_coordinates,
&metal_field_present,
my_fields->grid_start,
my_fields->grid_start+0,
my_fields->grid_start+1,
my_fields->grid_start+2,
my_fields->grid_end,
my_fields->grid_end+0,
my_fields->grid_end+1,
my_fields->grid_end+2,
&my_units->a_value,
Expand Down
5 changes: 4 additions & 1 deletion src/clib/cool_multi_time_g.F
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ subroutine cool_multi_time_g(
& brem(in), cieco(in),
& hyd01k(in), h2k01(in), vibh(in), roth(in), rotl(in),
& gpldl(in), gphdl(in), hdlte(in), hdlow(in)
integer dummy_iter_arg

! Iteration mask for multi_cool

Expand Down Expand Up @@ -351,13 +352,15 @@ subroutine cool_multi_time_g(
end do

! Compute the cooling rate
dummy_iter_arg=1

call cool1d_multi_g(
& d, e, u, v, w, de, HI, HII, HeI, HeII, HeIII,
& in, jn, kn, nratec,
& iexpand, ispecies, imetal, imcool,
& idust, idustall, idustfield, idustrec,
& idim, is, ie, j, k, ih2co, ipiht, 1, igammah,
& idim, is, ie, j, k, ih2co, ipiht,
& dummy_iter_arg, igammah,
& aye, temstart, temend, z_solar, fgr,
& utem, uxyz, uaye, urho, utim,
& gamma, fh,
Expand Down
4 changes: 2 additions & 2 deletions src/clib/lookup_cool_rates0d.F
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

! calculate rates

subroutine lookup_cool_rates0d(output, dtit,
subroutine lookup_cool_rates0d(dtit,
& d, u, v, w,
& nsp, dsp, dspdot, nratec,
& iexpand, ispecies, imetal, imcool,
Expand Down Expand Up @@ -133,7 +133,7 @@ subroutine lookup_cool_rates0d(output, dtit,

! General Arguments

integer output, nratec, nsp,
integer nratec, nsp,
& iexpand, ih2co, ipiht, ispecies, imetal, idim,
& imcool, idust, idustall, idustfield, idustrec,
& igammah, ih2optical, iciecool, ih2cr, ihdcr, ithreebody,
Expand Down
6 changes: 3 additions & 3 deletions src/clib/solve_chemistry.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ int local_solve_chemistry(chemistry_data *my_chemistry,
my_fields->HeI_density,
my_fields->HeII_density,
my_fields->HeIII_density,
my_fields->grid_dimension,
my_fields->grid_dimension+0,
my_fields->grid_dimension+1,
my_fields->grid_dimension+2,
&my_chemistry->NumberOfTemperatureBins,
Expand All @@ -269,10 +269,10 @@ int local_solve_chemistry(chemistry_data *my_chemistry,
&my_chemistry->dust_chemistry,
&my_chemistry->use_dust_density_field,
&(my_fields->grid_rank),
my_fields->grid_start,
my_fields->grid_start+0,
my_fields->grid_start+1,
my_fields->grid_start+2,
my_fields->grid_end,
my_fields->grid_end+0,
my_fields->grid_end+1,
my_fields->grid_end+2,
&my_chemistry->ih2co,
Expand Down
61 changes: 40 additions & 21 deletions src/clib/solve_rate_cool_g.F
Original file line number Diff line number Diff line change
Expand Up @@ -1465,7 +1465,7 @@ subroutine solve_rate_cool_g(icool, d, e, u, v, w, de,
go to 9996
endif
call lookup_cool_rates0d(itr, dtit(i),
call lookup_cool_rates0d(dtit(i),
& d(i,j,k), u(i,j,k), v(i,j,k), w(i,j,k),
& nsp, dsp, dspdot, nratec,
& iexpand, ispecies, imetal, imcool,
Expand Down Expand Up @@ -1601,7 +1601,7 @@ subroutine solve_rate_cool_g(icool, d, e, u, v, w, de,
endif
enddo
call lookup_cool_rates0d(1, dtit(i),
call lookup_cool_rates0d(dtit(i),
& d(i,j,k), u(i,j,k), v(i,j,k), w(i,j,k),
& nsp, dsp1, dspdot1, nratec,
& iexpand, ispecies, imetal, imcool,
Expand Down Expand Up @@ -5769,27 +5769,46 @@ subroutine make_consistent_g(de, HI, HII, HeI, HeII, HeIII,
C enddo

nSN = 12
SN_i( 1) = 1; SN_metal(:, 1) = metal_loc(:,j,k)
SN_i( 2) = 2; SN_metal(:, 2) = metal_C13(:,j,k)
SN_i( 3) = 3; SN_metal(:, 3) = metal_C20(:,j,k)
SN_i( 4) = 4; SN_metal(:, 4) = metal_C25(:,j,k)
SN_i( 5) = 5; SN_metal(:, 5) = metal_C30(:,j,k)
SN_i( 6) = 6; SN_metal(:, 6) = metal_F13(:,j,k)
SN_i( 7) = 7; SN_metal(:, 7) = metal_F15(:,j,k)
SN_i( 8) = 8; SN_metal(:, 8) = metal_F50(:,j,k)
SN_i( 9) = 9; SN_metal(:, 9) = metal_F80(:,j,k)
SN_i(10) =10; SN_metal(:,10) = metal_P170(:,j,k)
SN_i(11) =11; SN_metal(:,11) = metal_P200(:,j,k)
SN_i(12) =12; SN_metal(:,12) = metal_Y19(:,j,k)
SN_i( 1) = 1
SN_metal(:, 1) = metal_loc(:,j,k)
SN_i( 2) = 2
SN_metal(:, 2) = metal_C13(:,j,k)
SN_i( 3) = 3
SN_metal(:, 3) = metal_C20(:,j,k)
SN_i( 4) = 4
SN_metal(:, 4) = metal_C25(:,j,k)
SN_i( 5) = 5
SN_metal(:, 5) = metal_C30(:,j,k)
SN_i( 6) = 6
SN_metal(:, 6) = metal_F13(:,j,k)
SN_i( 7) = 7
SN_metal(:, 7) = metal_F15(:,j,k)
SN_i( 8) = 8
SN_metal(:, 8) = metal_F50(:,j,k)
SN_i( 9) = 9
SN_metal(:, 9) = metal_F80(:,j,k)
SN_i(10) =10
SN_metal(:,10) = metal_P170(:,j,k)
SN_i(11) =11
SN_metal(:,11) = metal_P200(:,j,k)
SN_i(12) =12
SN_metal(:,12) = metal_Y19(:,j,k)

do i = is+1, ie+1
Ct(i) = 0._DKIND; Cg(i) = 0._DKIND
Ot(i) = 0._DKIND; Og(i) = 0._DKIND
Mgt(i) = 0._DKIND; Mgg(i) = 0._DKIND
Alt(i) = 0._DKIND; Alg(i) = 0._DKIND
Sit(i) = 0._DKIND; Sig(i) = 0._DKIND
St(i) = 0._DKIND; Sg(i) = 0._DKIND
Fet(i) = 0._DKIND; Feg(i) = 0._DKIND
Ct(i) = 0._DKIND
Cg(i) = 0._DKIND
Ot(i) = 0._DKIND
Og(i) = 0._DKIND
Mgt(i) = 0._DKIND
Mgg(i) = 0._DKIND
Alt(i) = 0._DKIND
Alg(i) = 0._DKIND
Sit(i) = 0._DKIND
Sig(i) = 0._DKIND
St(i) = 0._DKIND
Sg(i) = 0._DKIND
Fet(i) = 0._DKIND
Feg(i) = 0._DKIND
do iSN = 1, nSN
iSN0 = SN_i(iSN)

Expand Down

0 comments on commit 55d9519

Please sign in to comment.