MP-Gadget
5.0.1.dev1-76bc7d4726-dirty
|
Go to the source code of this file.
Classes | |
struct | gravshort_tree_params |
Enumerations | |
enum | ShortRangeForceWindowType { SHORTRANGE_FORCE_WINDOW_TYPE_EXACT = 0 , SHORTRANGE_FORCE_WINDOW_TYPE_ERFC = 1 } |
Functions | |
void | gravshort_fill_ntab (const enum ShortRangeForceWindowType ShortRangeForceWindowType, const double Asmth) |
void | gravshort_set_softenings (double MeanDMSeparation) |
double | FORCE_SOFTENING (int i, int type) |
void | gravpm_init_periodic (PetaPM *pm, double BoxSize, double Asmth, int Nmesh, double G) |
int | grav_apply_short_range_window (double r, double *fac, double *pot, const double cellsize) |
void | set_gravshort_tree_params (ParameterSet *ps) |
void | set_gravshort_treepar (struct gravshort_tree_params tree_params) |
struct gravshort_tree_params | get_gravshort_treepar (void) |
void | gravpm_force (PetaPM *pm, ForceTree *tree, Cosmology *CP, double Time, double UnitLength_in_cm, const char *PowerOutputDir, double TimeIC, int FastParticleType) |
void | grav_short_pair (const ActiveParticles *act, PetaPM *pm, ForceTree *tree, double Rcut, double rho0, int NeutrinoTracer, int FastParticleType) |
void | grav_short_tree (const ActiveParticles *act, PetaPM *pm, ForceTree *tree, double rho0, int NeutrinoTracer, int FastParticleType) |
void | measure_power_spectrum (PetaPM *pm, int64_t k2, int kpos[3], pfft_complex *value) |
void | powerspectrum_add_mode (Power *PowerSpectrum, const int64_t k2, const int kpos[3], pfft_complex *const value, const double invwindow, double Nmesh) |
double FORCE_SOFTENING | ( | int | i, |
int | type | ||
) |
Definition at line 36 of file gravshort-tree.c.
References gravshort_tree_params::AdaptiveSoftening, GravitySoftening, P, and TreeParams.
Referenced by blackhole_accretion_ngbiter(), density(), force_treeev_shortrange(), get_timestep_dloga(), grav_force(), grav_short_copy(), grav_short_pair_ngbiter(), and grav_short_postprocess().
struct gravshort_tree_params get_gravshort_treepar | ( | void | ) |
Definition at line 55 of file gravshort-tree.c.
References TreeParams.
Referenced by run(), and run_gravity_test().
int grav_apply_short_range_window | ( | double | r, |
double * | fac, | ||
double * | pot, | ||
const double | cellsize | ||
) |
Definition at line 55 of file gravity.c.
References NTAB, shortrange_force_kernels, shortrange_table, and shortrange_table_potential.
Referenced by apply_accn_to_output(), and grav_short_pair_ngbiter().
void grav_short_pair | ( | const ActiveParticles * | act, |
PetaPM * | pm, | ||
ForceTree * | tree, | ||
double | Rcut, | ||
double | rho0, | ||
int | NeutrinoTracer, | ||
int | FastParticleType | ||
) |
Definition at line 24 of file gravshort-pair.c.
References ActiveParticles::ActiveParticle, PetaPM::Asmth, ForceTree::BoxSize, GravShortPriv::cbrtrho0, GravShortPriv::cellsize, TreeWalk::ev_label, GravShortPriv::FastParticleType, TreeWalk::fill, GravShortPriv::G, PetaPM::G, grav_short_copy(), grav_short_pair_ngbiter(), grav_short_postprocess(), grav_short_reduce(), TreeWalk::haswork, message(), GravShortPriv::NeutrinoTracer, TreeWalk::ngbiter, TreeWalk::ngbiter_type_elsize, PetaPM::Nmesh, ActiveParticles::NumActiveParticle, TreeWalk::postprocess, TreeWalk::priv, TreeWalk::query_type_elsize, GravShortPriv::Rcut, TreeWalk::reduce, TreeWalk::result_type_elsize, TreeWalk::tree, treewalk_run(), treewalk_visit_ngbiter(), TreeWalk::visit, and walltime_measure.
Referenced by run(), and run_gravity_test().
void grav_short_tree | ( | const ActiveParticles * | act, |
PetaPM * | pm, | ||
ForceTree * | tree, | ||
double | rho0, | ||
int | NeutrinoTracer, | ||
int | FastParticleType | ||
) |
This function computes the gravitational forces for all active particles. If needed, a new tree is constructed, otherwise the dynamically updated tree is used. Particles are only exported to other processors when really needed, thereby allowing a good use of the communication buffer. NeutrinoTracer = All.HybridNeutrinosOn && (atime <= All.HybridNuPartTime); rho0 = CP.Omega0 * 3 * CP.Hubble * CP.Hubble / (8 * M_PI * G)
Definition at line 105 of file gravshort-tree.c.
References ActiveParticles::ActiveParticle, PetaPM::Asmth, gravshort_tree_params::BHOpeningAngle, GravShortPriv::BHOpeningAngle, ForceTree::BoxSize, GravShortPriv::cbrtrho0, GravShortPriv::cellsize, endrun(), gravshort_tree_params::ErrTolForceAcc, GravShortPriv::ErrTolForceAcc, TreeWalk::ev_label, GravShortPriv::FastParticleType, TreeWalk::fill, force_treeev_shortrange(), GravShortPriv::G, PetaPM::G, grav_short_copy(), grav_short_postprocess(), grav_short_reduce(), TreeWalk::haswork, message(), ForceTree::moments_computed_flag, MPIU_Barrier, mymalloc_usedbytes, GravShortPriv::NeutrinoTracer, PetaPM::Nmesh, ActiveParticles::NumActiveParticle, TreeWalk::postprocess, TreeWalk::priv, TreeWalk::query_type_elsize, gravshort_tree_params::Rcut, GravShortPriv::Rcut, TreeWalk::reduce, TreeWalk::result_type_elsize, TreeWalk::timecommsumm1, TreeWalk::timecommsumm2, TreeWalk::timecomp1, TreeWalk::timecomp2, TreeWalk::timecomp3, TreeWalk::timewait1, TreeWalk::timewait2, TreeWalk::tree, TreeParams, gravshort_tree_params::TreeUseBH, GravShortPriv::TreeUseBH, treewalk_run(), TreeWalk::visit, walltime_add, WALLTIME_IGNORE, and walltime_measure.
Referenced by do_force_test(), run(), and run_gravity_test().
void gravpm_force | ( | PetaPM * | pm, |
ForceTree * | tree, | ||
Cosmology * | CP, | ||
double | Time, | ||
double | UnitLength_in_cm, | ||
const char * | PowerOutputDir, | ||
double | TimeIC, | ||
int | FastParticleType | ||
) |
Definition at line 62 of file gravpm.c.
References _prepare(), PetaPMParticleStruct::active, compute_neutrino_power(), gravpm_params::CP, CP, gravpm_params::FastParticleType, functions, PetaPMGlobalFunctions::global_analysis, global_functions, PetaPMGlobalFunctions::global_readout, GravPM, GrowthFactor(), _omega_nu::hybnu, hybrid_nu_gravpm_is_active(), Cosmology::HybridNeutrinosOn, _powerspectrum::logknu, Cosmology::MassiveNuLinRespOn, measure_power_spectrum(), part_manager_type::NumPart, Cosmology::ONu, P, particle_nu_fraction(), PartManager, petapm_force(), potential_transfer(), powerspectrum_free(), powerspectrum_nu_save(), powerspectrum_save(), powerspectrum_sum(), PetaPM::ps, gravpm_params::Time, gravpm_params::TimeIC, gravpm_params::UnitLength_in_cm, UnitLength_in_cm, and walltime_measure.
Referenced by do_force_test(), run(), run_gravity_test(), and runpower().
void gravpm_init_periodic | ( | PetaPM * | pm, |
double | BoxSize, | ||
double | Asmth, | ||
int | Nmesh, | ||
double | G | ||
) |
Definition at line 53 of file gravpm.c.
References G, and petapm_init().
Referenced by do_force_test(), run(), run_gravity_test(), runfof(), and runpower().
void gravshort_fill_ntab | ( | const enum ShortRangeForceWindowType | ShortRangeForceWindowType, |
const double | Asmth | ||
) |
Definition at line 23 of file gravity.c.
References endrun(), NTAB, shortrange_force_kernels, SHORTRANGE_FORCE_WINDOW_TYPE_ERFC, SHORTRANGE_FORCE_WINDOW_TYPE_EXACT, shortrange_table, shortrange_table_potential, and shortrange_table_tidal.
Referenced by begrun(), and do_force_test().
void gravshort_set_softenings | ( | double | MeanSeparation | ) |
Sets the (comoving) softening length, converting from units of the mean DM separation to comoving internal units.
Sets the (comoving) softening length, converting from units of the mean separation to comoving internal units.
Definition at line 47 of file gravshort-tree.c.
References gravshort_tree_params::FractionalGravitySoftening, GravitySoftening, message(), and TreeParams.
Referenced by do_force_test(), init(), and setup_density().
void measure_power_spectrum | ( | PetaPM * | pm, |
int64_t | k2, | ||
int | kpos[3], | ||
pfft_complex * | value | ||
) |
Definition at line 361 of file gravpm.c.
References NODE::f, PetaPM::Nmesh, powerspectrum_add_mode(), PetaPM::ps, and sinc_unnormed().
Referenced by gravpm_force().
void powerspectrum_add_mode | ( | Power * | PowerSpectrum, |
const int64_t | k2, | ||
const int | kpos[3], | ||
pfft_complex *const | value, | ||
const double | invwindow, | ||
double | Nmesh | ||
) |
Definition at line 327 of file gravpm.c.
References _powerspectrum::kk, _powerspectrum::Nmodes, _powerspectrum::Norm, _powerspectrum::Power, and _powerspectrum::size.
Referenced by measure_power_spectrum(), and potential_transfer().
void set_gravshort_tree_params | ( | ParameterSet * | ps | ) |
Definition at line 67 of file gravshort-tree.c.
References gravshort_tree_params::AdaptiveSoftening, gravshort_tree_params::BHOpeningAngle, gravshort_tree_params::ErrTolForceAcc, gravshort_tree_params::FractionalGravitySoftening, param_get_double(), param_get_int(), gravshort_tree_params::Rcut, ThisTask, TreeParams, and gravshort_tree_params::TreeUseBH.
Referenced by read_parameter_file().
void set_gravshort_treepar | ( | struct gravshort_tree_params | tree_params | ) |
Definition at line 55 of file gravshort-tree.c.
Referenced by do_force_test(), run_gravity_test(), and setup_density().