diff --git a/src/clib/calculate_cooling_time.c b/src/clib/calculate_cooling_time.c index 029fe898..4dbe9573 100644 --- a/src/clib/calculate_cooling_time.c +++ b/src/clib/calculate_cooling_time.c @@ -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, @@ -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, diff --git a/src/clib/calculate_dust_temperature.c b/src/clib/calculate_dust_temperature.c index 0030a5bf..d9029346 100644 --- a/src/clib/calculate_dust_temperature.c +++ b/src/clib/calculate_dust_temperature.c @@ -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, diff --git a/src/clib/calculate_temperature.c b/src/clib/calculate_temperature.c index 4466db60..c684f608 100644 --- a/src/clib/calculate_temperature.c +++ b/src/clib/calculate_temperature.c @@ -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, diff --git a/src/clib/cool_multi_time_g.F b/src/clib/cool_multi_time_g.F index a0338579..8b3ea0cf 100644 --- a/src/clib/cool_multi_time_g.F +++ b/src/clib/cool_multi_time_g.F @@ -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 @@ -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, diff --git a/src/clib/lookup_cool_rates0d.F b/src/clib/lookup_cool_rates0d.F index 4403da8e..d718dfff 100644 --- a/src/clib/lookup_cool_rates0d.F +++ b/src/clib/lookup_cool_rates0d.F @@ -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, @@ -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, diff --git a/src/clib/solve_chemistry.c b/src/clib/solve_chemistry.c index 9dcb4add..e5b305f8 100644 --- a/src/clib/solve_chemistry.c +++ b/src/clib/solve_chemistry.c @@ -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, @@ -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, diff --git a/src/clib/solve_rate_cool_g.F b/src/clib/solve_rate_cool_g.F index 0e859ee4..5bb92bf2 100644 --- a/src/clib/solve_rate_cool_g.F +++ b/src/clib/solve_rate_cool_g.F @@ -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, @@ -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, @@ -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)