MP-Gadget
5.0.1.dev1-76bc7d4726-dirty
|
Go to the source code of this file.
Classes | |
struct | density_params |
struct | sph_pred_data |
Functions | |
void | set_density_params (ParameterSet *ps) |
void | set_densitypar (struct density_params dp) |
void | density (const ActiveParticles *act, int update_hsml, int DoEgyDensity, int BlackHoleOn, double MinEgySpec, const DriftKickTimes times, Cosmology *CP, struct sph_pred_data *SPH_predicted, MyFloat *GradRho, const ForceTree *const tree) |
double | GetNumNgb (enum DensityKernelType KernelType) |
enum DensityKernelType | GetDensityKernelType (void) |
struct sph_pred_data | slots_allocate_sph_pred_data (int nsph) |
void | slots_free_sph_pred_data (struct sph_pred_data *sph_pred) |
MyFloat | SPH_EntVarPred (int PI, double MinEgySpec, double a3inv, double dloga) |
void | SPH_VelPred (int i, MyFloat *VelPred, const double FgravkickB, double gravkick, double hydrokick) |
void density | ( | const ActiveParticles * | act, |
int | update_hsml, | ||
int | DoEgyDensity, | ||
int | BlackHoleOn, | ||
double | MinEgySpec, | ||
const DriftKickTimes | times, | ||
Cosmology * | CP, | ||
struct sph_pred_data * | SPH_predicted, | ||
MyFloat * | GradRho, | ||
const ForceTree *const | tree | ||
) |
This function computes the local density for each active SPH particle, the number of neighbours in the current smoothing radius, and the divergence and rotation of the velocity field. The pressure is updated as well. If a particle with its smoothing region is fully inside the local domain, it is not exported to the other processors. The function also detects particles that have a number of neighbours outside the allowed tolerance range. For these particles, the smoothing length is adjusted accordingly, and the density() computation is called again. Note that the smoothing length is not allowed to fall below the lower bound set by MinGasHsml (this may mean that one has to deal with substantially more than normal number of neighbours.)
Definition at line 203 of file density.c.
References DensityPriv::a3inv, ActiveParticles::ActiveParticle, DensityPriv::BlackHoleOn, ForceTree::BoxSize, CP, density_copy(), DENSITY_GET_PRIV, density_haswork(), density_ngbiter(), density_postprocess(), density_reduce(), density_params::DensityKernelType, DensityParams, DensityPriv::DhsmlDensityFactor, dloga, dloga_from_dti(), DensityPriv::DoEgyDensity, sph_pred_data::EntVarPred, TreeWalk::ev_label, DensityPriv::FgravkickB, TreeWalk::fill, FORCE_SOFTENING(), get_exact_gravkick_factor(), get_exact_hydrokick_factor(), GetNumNgb(), DensityPriv::GradRho, DensityPriv::gravkicks, TreeWalk::haswork, DensityPriv::hydrokicks, slots_manager_type::info, DensityPriv::Left, loga_from_ti(), DensityPriv::MinEgySpec, density_params::MinGasHsmlFractional, DriftKickTimes::mintimebin, myfree, mymalloc, TreeWalk::ngbiter, TreeWalk::ngbiter_type_elsize, TreeWalk::NoNgblist, ActiveParticles::NumActiveParticle, DensityPriv::NumNgb, part_manager_type::NumPart, P, PartManager, DriftKickTimes::PM_kick, TreeWalk::postprocess, TreeWalk::priv, TreeWalk::query_type_elsize, TreeWalk::reduce, TreeWalk::result_type_elsize, DensityPriv::Right, DensityPriv::Rot, slot_info::size, SlotsManager, SPH_EntVarPred(), DensityPriv::SPH_predicted, SPH_VelPred(), DriftKickTimes::Ti_Current, DriftKickTimes::Ti_kick, TIMEBINS, TreeWalk::timecommsumm1, TreeWalk::timecommsumm2, TreeWalk::timecomp1, TreeWalk::timecomp2, TreeWalk::timecomp3, DensityPriv::times, TreeWalk::timewait1, TreeWalk::timewait2, TreeWalk::tree, treewalk_do_hsml_loop(), treewalk_visit_nolist_ngbiter(), DensityPriv::update_hsml, sph_pred_data::VelPred, TreeWalk::visit, walltime_add, WALLTIME_IGNORE, and walltime_measure.
Referenced by density_postprocess(), do_density_test(), get_compton_cooling(), get_equilib_ne(), get_heatingcooling_rate(), get_helium_ion_phys_cgs(), get_individual_cooling(), get_ne_by_nh(), get_neutral_fraction_phys_cgs(), get_temp(), run(), runfof(), setup_density_indep_entropy(), and setup_smoothinglengths().
enum DensityKernelType GetDensityKernelType | ( | void | ) |
Definition at line 55 of file density.c.
References density_kernel_desnumngb(), density_kernel_init(), DensityParams, density_params::DensityResolutionEta, and kernel().
Referenced by blackhole_accretion_ngbiter(), blackhole_dynfric_ngbiter(), blackhole_feedback_ngbiter(), do_density_test(), hydro_ngbiter(), metal_return_ngbiter(), petaio_write_header(), set_density_params(), set_init_hsml(), setup_smoothinglengths(), stellar_density(), and stellar_density_ngbiter().
double GetNumNgb | ( | enum DensityKernelType | KernelType | ) |
Definition at line 55 of file density.c.
Referenced by density(), do_density_test(), set_density_params(), set_init_hsml(), setup_smoothinglengths(), and stellar_density().
void set_density_params | ( | ParameterSet * | ps | ) |
Definition at line 32 of file density.c.
References density_params::BlackHoleMaxAccretionRadius, density_params::BlackHoleNgbFactor, density_kernel_init(), density_params::DensityKernelType, DensityParams, density_params::DensityResolutionEta, GetDensityKernelType(), GetNumNgb(), kernel(), density_params::MaxNumNgbDeviation, message(), density_params::MinGasHsmlFractional, param_get_double(), param_get_enum(), and ThisTask.
Referenced by read_parameter_file().
void set_densitypar | ( | struct density_params | dp | ) |
Definition at line 25 of file density.c.
References DensityParams.
Referenced by do_density_test(), and setup_density().
struct sph_pred_data slots_allocate_sph_pred_data | ( | int | nsph | ) |
Definition at line 554 of file density.c.
Referenced by run(), runfof(), setup_density(), and setup_smoothinglengths().
void slots_free_sph_pred_data | ( | struct sph_pred_data * | sph_pred | ) |
Definition at line 665 of file density.c.
References sph_pred_data::EntVarPred, myfree, and sph_pred_data::VelPred.
Referenced by run(), runfof(), and setup_smoothinglengths().
MyFloat SPH_EntVarPred | ( | int | PI, |
double | MinEgySpec, | ||
double | a3inv, | ||
double | dloga | ||
) |
Definition at line 71 of file density.c.
References dloga, GAMMA, GAMMA_MINUS1, and SphP.
Referenced by density(), density_ngbiter(), and hydro_ngbiter().
void SPH_VelPred | ( | int | i, |
MyFloat * | VelPred, | ||
const double | FgravkickB, | ||
double | gravkick, | ||
double | hydrokick | ||
) |
Definition at line 89 of file density.c.
Referenced by density(), density_ngbiter(), and hydro_ngbiter().