17#include "../data/simparticles.h"
18#include "../mpi_utils/setcomm.h"
23 coolsfr(MPI_Comm comm) :
setcomm(comm) {}
25 double AbundanceRatios(
double u,
double rho,
double *ne_guess,
double *nH0_pointer,
double *nHeII_pointer);
28 void IonizeParams(
void);
35 void set_units_sfr(
void);
39 void init_clouds(
void);
48 double ne, necgs, nHcgs;
49 double bH0, bHep, bff, aHp, aHep, aHepp, ad, geH0, geHe0, geHep;
50 double gJH0ne, gJHe0ne, gJHepne;
51 double nH0, nHp, nHep, nHe0, nHepp;
60 double BetaH0, BetaHep, Betaff;
61 double AlphaHp, AlphaHep, Alphad, AlphaHepp;
62 double GammaeH0, GammaeHe0, GammaeHep;
77 double gJH0, gJHep, gJHe0, epsH0, epsHep, epsHe0;
83 double u_old_input, rho_input, dt_input, ne_guess_input;
87 do_cool_data DoCoolData;
90 photo_table *PhotoTUVB;
99 double DoCooling(
double u_old,
double rho,
double dt,
double *ne_guess, gas_state *gs, do_cool_data *DoCool);
100 double GetCoolingTime(
double u_old,
double rho,
double *ne_guess, gas_state *gs, do_cool_data *DoCool);
101 void cool_sph_particle(
simparticles *Sp,
int i, gas_state *gs, do_cool_data *DoCool);
103 void SetZeroIonization(
void);
106 void integrate_sfr(
void);
108 double CoolingRate(
double logT,
double rho,
double *nelec, gas_state *gs,
const do_cool_data *DoCool);
109 double CoolingRateFromU(
double u,
double rho,
double *ne_guess, gas_state *gs,
const do_cool_data *DoCool);
110 void find_abundances_and_rates(
double logT,
double rho,
double *ne_guess, gas_state *gs,
const do_cool_data *DoCool);
111 void IonizeParamsUVB(
void);
112 void ReadIonizeParams(
char *fname);
114 double convert_u_to_temp(
double u,
double rho,
double *ne_guess, gas_state *gs,
const do_cool_data *DoCool);
116 void MakeRateTable(
void);
119 const int WriteMiscFiles = 1;
121 void make_star(
simparticles *Sp,
int i,
double prob,
MyDouble mass_of_star,
double *sum_mass_stars);
122 void spawn_star_from_sph_particle(
simparticles *Sp,
int igas,
double birthtime,
int istar,
MyDouble mass_of_star);
123 void convert_sph_particle_into_star(
simparticles *Sp,
int i,
double birthtime);
126 int tot_stars_spawned;
128 int tot_stars_converted;
129 int altogether_spawned;
130 int tot_altogether_spawned;
131 double cum_mass_stars = 0.0;