MP-Gadget
5.0.1.dev1-76bc7d4726-dirty
|
#include "forcetree.h"
#include "utils/paramset.h"
#include "timestep.h"
#include "partmanager.h"
#include "slotsmanager.h"
#include "physconst.h"
Go to the source code of this file.
Macros | |
#define | METAL_YIELD 0.02 |
Enumerations | |
enum | StarformationCriterion { SFR_CRITERION_DENSITY = 1 , SFR_CRITERION_MOLECULAR_H2 = 3 , SFR_CRITERION_SELFGRAVITY = 5 , SFR_CRITERION_CONVERGENT_FLOW = 13 , SFR_CRITERION_CONTINUOUS_CUTOFF = 21 } |
Functions | |
void | set_sfr_params (ParameterSet *ps) |
void | init_cooling_and_star_formation (int CoolingOn, int StarformationOn, Cosmology *CP, const double avg_baryon_mass, const double BoxSize, const struct UnitSystem units) |
void | cooling_and_starformation (ActiveParticles *act, double Time, double dloga, ForceTree *tree, const Cosmology *CP, MyFloat *GradRho, FILE *FdSfr) |
double | get_neutral_fraction_sfreff (double redshift, double hubble, struct particle_data *partdata, struct sph_particle_data *sphdata) |
double | get_helium_neutral_fraction_sfreff (int ion, double redshift, double hubble, struct particle_data *partdata, struct sph_particle_data *sphdata) |
int | sfr_need_to_compute_sph_grad_rho (void) |
int | get_generations (void) |
int | sfreff_on_eeqos (const struct sph_particle_data *sph, const double a3inv) |
double | get_MinEgySpec (void) |
#define METAL_YIELD 0.02 |
void cooling_and_starformation | ( | ActiveParticles * | act, |
double | Time, | ||
double | dloga, | ||
ForceTree * | tree, | ||
const Cosmology * | CP, | ||
MyFloat * | GradRho, | ||
FILE * | FdSfr | ||
) |
Definition at line 167 of file sfr_eff.c.
References ActiveParticles::ActiveParticle, cooling_direct(), CP, dloga, endrun(), gadget_compact_thread_arrays(), gadget_setup_thread_arrays(), get_global_UVBG(), Cosmology::GravInternal, hubble_function(), slots_manager_type::info, make_particle_star(), slot_info::maxsize, message(), MPIU_Barrier, myfree, mymalloc, mymalloc2, myrealloc, ActiveParticles::NumActiveParticle, P, quicklyastarformation(), SFRParams::QuickLymanAlphaProbability, report_memory_usage, sfr_params, sfr_reserve_slots(), sfreff_on_eeqos(), slot_info::size, SlotsManager, SPHP, starformation(), SFRParams::StarformationOn, sumup_large_ints(), ta_free, ta_malloc, SFRParams::UnitSfr_in_solar_per_year, walltime_measure, SFRParams::WindOn, winds_and_feedback(), winds_are_subgrid(), winds_evolve(), and winds_subgrid().
Referenced by run(), and runfof().
int get_generations | ( | void | ) |
Definition at line 87 of file sfr_eff.c.
References SFRParams::Generations, and sfr_params.
Referenced by init(), and petaio_read_header_internal().
double get_helium_neutral_fraction_sfreff | ( | int | ion, |
double | redshift, | ||
double | hubble, | ||
struct particle_data * | partdata, | ||
struct sph_particle_data * | sphdata | ||
) |
Definition at line 548 of file sfr_eff.c.
References sfr_eeqos_data::cloudfrac, part_manager_type::CurrentParticleOffset, sph_particle_data::Density, dloga, sfr_eeqos_data::egyhot, SFRParams::EgySpecCold, sph_particle_data::Entropy, GAMMA_MINUS1, get_dloga_for_bin(), get_global_UVBG(), get_local_UVBG(), get_sfr_eeqos(), GetHeliumIonFraction(), sfr_eeqos_data::ne, sph_particle_data::Ne, PartManager, particle_data::Pos, SFRParams::QuickLymanAlphaProbability, sfr_params, sfreff_on_eeqos(), particle_data::Ti_drift, and particle_data::TimeBin.
Referenced by GTHeliumIFraction(), GTHeliumIIFraction(), and GTHeliumIIIFraction().
double get_MinEgySpec | ( | void | ) |
Definition at line 797 of file sfr_eff.c.
References HYDROGEN_MASSFRAC, SFRParams::MinGasTemp, sfr_params, and SFRParams::temp_to_u.
Referenced by begrun(), run(), and runfof().
double get_neutral_fraction_sfreff | ( | double | redshift, |
double | hubble, | ||
struct particle_data * | partdata, | ||
struct sph_particle_data * | sphdata | ||
) |
Definition at line 520 of file sfr_eff.c.
References sfr_eeqos_data::cloudfrac, part_manager_type::CurrentParticleOffset, sph_particle_data::Density, dloga, sfr_eeqos_data::egyhot, SFRParams::EgySpecCold, sph_particle_data::Entropy, GAMMA_MINUS1, get_dloga_for_bin(), get_global_UVBG(), get_local_UVBG(), get_sfr_eeqos(), GetNeutralFraction(), sfr_eeqos_data::ne, sph_particle_data::Ne, PartManager, particle_data::Pos, SFRParams::QuickLymanAlphaProbability, sfr_params, sfreff_on_eeqos(), particle_data::Ti_drift, and particle_data::TimeBin.
Referenced by blackhole_accretion_ngbiter(), and GTNeutralHydrogenFraction().
void init_cooling_and_star_formation | ( | int | CoolingOn, |
int | StarformationOn, | ||
Cosmology * | CP, | ||
const double | avg_baryon_mass, | ||
const double | BoxSize, | ||
const struct UnitSystem | units | ||
) |
Definition at line 805 of file sfr_eff.c.
References SFRParams::avg_baryon_mass, BOLTZMANN, cooling_units::CoolingOn, coolunits, CP, SFRParams::CritOverDensity, SFRParams::CritPhysDensity, cooling_units::density_in_phys_cgs, SFRParams::EgySpecCold, SFRParams::EgySpecSN, SFRParams::FactorEVP, SFRParams::FactorSN, GAMMA_MINUS1, get_egyeff(), GetCoolingTime(), Cosmology::GravInternal, GRAVITY, Cosmology::Hubble, HUBBLE, Cosmology::HubbleParam, HYDROGEN_MASSFRAC, init_cooling(), init_uvf_table(), init_winds(), SFRParams::MaxSfrTimescale, message(), SFRParams::MetalCoolFile, Cosmology::OmegaBaryon, SFRParams::OverDensThresh, SFRParams::PhysDensThresh, PROTONMASS, SFRParams::ReionHistFile, cooling_units::rho_crit_baryon, SEC_PER_YEAR, sfr_params, sigma, SOLAR_MASS, SFRParams::StarformationOn, SFRParams::tau_fmol_unit, SFRParams::temp_to_u, SFRParams::TempClouds, SFRParams::TempSupernova, SFRParams::TreeCoolFile, cooling_units::tt_in_s, UnitSystem::UnitDensity_in_cgs, UnitSystem::UnitInternalEnergy_in_cgs, UnitSystem::UnitLength_in_cm, UnitSystem::UnitMass_in_g, SFRParams::UnitSfr_in_solar_per_year, UnitSystem::UnitTime_in_s, cooling_units::uu_in_cgs, SFRParams::UVFluctuationFile, and SFRParams::WindOn.
Referenced by begrun().
void set_sfr_params | ( | ParameterSet * | ps | ) |
Definition at line 129 of file sfr_eff.c.
References SFRParams::BHFeedbackUseTcool, SFRParams::CritOverDensity, SFRParams::CritPhysDensity, endrun(), SFRParams::FactorEVP, SFRParams::FactorSN, SFRParams::Generations, SFRParams::HIReionTemp, SFRParams::MaxSfrTimescale, SFRParams::MetalCoolFile, SFRParams::MinGasTemp, param_get_double(), param_get_enum(), param_get_int(), param_get_string2(), SFRParams::QuickLymanAlphaProbability, SFRParams::QuickLymanAlphaTempThresh, SFRParams::ReionHistFile, sfr_params, SFRParams::StarformationCriterion, SFRParams::TempClouds, SFRParams::TempSupernova, ThisTask, SFRParams::TreeCoolFile, SFRParams::UVFluctuationFile, and SFRParams::WindOn.
Referenced by read_parameter_file().
int sfr_need_to_compute_sph_grad_rho | ( | void | ) |
Definition at line 952 of file sfr_eff.c.
References HAS, SFR_CRITERION_MOLECULAR_H2, sfr_params, and SFRParams::StarformationCriterion.
Referenced by run(), and runfof().
int sfreff_on_eeqos | ( | const struct sph_particle_data * | sph, |
const double | a3inv | ||
) |
Definition at line 486 of file sfr_eff.c.
References SFRParams::BHFeedbackUseTcool, sph_particle_data::DelayTime, sph_particle_data::Density, sph_particle_data::Entropy, GAMMA_MINUS1, get_egyeff(), get_global_UVBG(), SFRParams::OverDensThresh, SFRParams::PhysDensThresh, sfr_params, and SFRParams::StarformationOn.
Referenced by blackhole_feedback_ngbiter(), cooling_and_starformation(), get_helium_neutral_fraction_sfreff(), get_neutral_fraction_sfreff(), and get_starformation_rate_full().