MP-Gadget
5.0.1.dev1-76bc7d4726-dirty
|
#include "forcetree.h"
#include "timestep.h"
#include "utils/paramset.h"
#include <gsl/gsl_interp2d.h>
#include <gsl/gsl_integration.h>
#include "slotsmanager.h"
Go to the source code of this file.
Classes | |
struct | interps |
struct | MetalReturnPriv |
Functions | |
void | setup_metal_table_interp (struct interps *interp) |
void | metal_return (const ActiveParticles *act, DomainDecomp *const ddecomp, Cosmology *CP, const double atime, const double AvgGasMass) |
void | set_metal_return_params (ParameterSet *ps) |
int64_t | metal_return_init (const ActiveParticles *act, Cosmology *CP, struct MetalReturnPriv *priv, const double atime) |
void | metal_return_priv_free (struct MetalReturnPriv *priv) |
void | stellar_density (const ActiveParticles *act, MyFloat *StarVolumeSPH, MyFloat *MassReturn, const ForceTree *const tree) |
int | metals_haswork (int i, MyFloat *MassReturn) |
void metal_return | ( | const ActiveParticles * | act, |
DomainDecomp *const | ddecomp, | ||
Cosmology * | CP, | ||
const double | atime, | ||
const double | AvgGasMass | ||
) |
This function is the driver routine for the calculation of metal return.
Definition at line 517 of file metal_return.c.
References ActiveParticles::ActiveParticle, CP, TreeWalk::ev_label, TreeWalk::fill, force_tree_free(), force_tree_rebuild_mask(), free_spinlocks(), GASMASK, TreeWalk::haswork, slots_manager_type::info, init_spinlocks(), MetalReturnPriv::MassReturn, MetalReturnPriv::MaxGasMass, metal_return_copy(), metal_return_haswork(), metal_return_init(), metal_return_ngbiter(), metal_return_postprocess(), metal_return_priv_free(), MPI_INT64, TreeWalk::ngbiter, TreeWalk::ngbiter_type_elsize, ActiveParticles::NumActiveParticle, TreeWalk::postprocess, TreeWalk::priv, TreeWalk::query_type_elsize, TreeWalk::reduce, TreeWalk::repeatdisallowed, TreeWalk::result_type_elsize, slot_info::size, SlotsManager, MetalReturnPriv::spin, MetalReturnPriv::StarVolumeSPH, stellar_density(), TreeWalk::tree, treewalk_run(), treewalk_visit_ngbiter(), TreeWalk::visit, and walltime_measure.
Referenced by run().
int64_t metal_return_init | ( | const ActiveParticles * | act, |
Cosmology * | CP, | ||
struct MetalReturnPriv * | priv, | ||
const double | atime | ||
) |
Definition at line 437 of file metal_return.c.
References ActiveParticles::ActiveParticle, agb_masses, atime_to_myr(), compute_imf_norm(), CP, find_mass_bin_limits(), MetalReturnPriv::gsl_work, GSL_WORKSPACE, MetalReturnPriv::HighDyingMass, MetalReturnPriv::hub, HUBBLE, Cosmology::HubbleParam, MetalReturnPriv::imf_norm, slots_manager_type::info, MetalReturnPriv::interp, interps::lifetime_interp, MetalReturnPriv::LowDyingMass, mass_yield(), MetalReturnPriv::MassReturn, MAXMASS, message(), metals_haswork(), mymalloc, ActiveParticles::NumActiveParticle, P, SEC_PER_MEGAYEAR, setup_metal_table_interp(), slot_info::size, SlotsManager, snii_metallicities, SNII_NMET, STARP, MetalReturnPriv::StarVolumeSPH, MetalReturnPriv::StellarAges, and ta_malloc.
Referenced by metal_return().
void metal_return_priv_free | ( | struct MetalReturnPriv * | priv | ) |
Definition at line 500 of file metal_return.c.
References MetalReturnPriv::gsl_work, MetalReturnPriv::HighDyingMass, MetalReturnPriv::LowDyingMass, MetalReturnPriv::MassReturn, myfree, MetalReturnPriv::StarVolumeSPH, MetalReturnPriv::StellarAges, and ta_free.
Referenced by metal_return().
int metals_haswork | ( | int | i, |
MyFloat * | MassReturn | ||
) |
Definition at line 708 of file metal_return.c.
References MetalReturnPriv::MassReturn, P, and STARP.
Referenced by metal_return_haswork(), metal_return_init(), and stellar_density_haswork().
void set_metal_return_params | ( | ParameterSet * | ps | ) |
Definition at line 62 of file metal_return.c.
References metal_return_params::MaxNgbDeviation, MetalParams, param_get_double(), param_get_int(), metal_return_params::Sn1aN0, metal_return_params::SPHWeighting, and ThisTask.
Referenced by read_parameter_file().
void setup_metal_table_interp | ( | struct interps * | interp | ) |
Definition at line 76 of file metal_return.c.
References agb_masses, agb_metallicities, AGB_NMASS, AGB_NMET, agb_total_mass, agb_total_metals, agb_yield, interp, LIFE_NMASS, LIFE_NMET, lifetime, lifetime_masses, lifetime_metallicity, NMETALS, snii_masses, snii_metallicities, SNII_NMASS, SNII_NMET, snii_total_mass, snii_total_metals, and snii_yield.
Referenced by metal_return_init(), and test_yields().
void stellar_density | ( | const ActiveParticles * | act, |
MyFloat * | StarVolumeSPH, | ||
MyFloat * | MassReturn, | ||
const ForceTree *const | tree | ||
) |
Definition at line 923 of file metal_return.c.
References ActiveParticles::ActiveParticle, ForceTree::BoxSize, StellarDensityPriv::DesNumNgb, endrun(), TreeWalk::ev_label, TreeWalk::fill, GetDensityKernelType(), GetNumNgb(), TreeWalk::haswork, slots_manager_type::info, StellarDensityPriv::Left, StellarDensityPriv::MassReturn, StellarDensityPriv::maxcmpte, myfree, mymalloc, TreeWalk::ngbiter, TreeWalk::ngbiter_type_elsize, NHSML, TreeWalk::NoNgblist, ActiveParticles::NumActiveParticle, StellarDensityPriv::NumNgb, P, TreeWalk::postprocess, TreeWalk::priv, TreeWalk::query_type_elsize, TreeWalk::reduce, TreeWalk::result_type_elsize, StellarDensityPriv::Right, slot_info::size, SlotsManager, stellar_density_check_neighbours(), stellar_density_copy(), stellar_density_haswork(), stellar_density_ngbiter(), stellar_density_reduce(), TreeWalk::timecommsumm1, TreeWalk::timecommsumm2, TreeWalk::timecomp1, TreeWalk::timecomp2, TreeWalk::timecomp3, TreeWalk::timewait1, TreeWalk::timewait2, TreeWalk::tree, treewalk_do_hsml_loop(), treewalk_visit_nolist_ngbiter(), TreeWalk::visit, StellarDensityPriv::VolumeSPH, walltime_add, WALLTIME_IGNORE, and walltime_measure.
Referenced by metal_return().