MP-Gadget
5.0.1.dev1-76bc7d4726-dirty
|
#include <mpi.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <omp.h>
#include <gsl/gsl_rng.h>
#include "allvars.h"
#include "proto.h"
#include <libgadget/petapm.h>
#include <libgadget/walltime.h>
#include <libgadget/utils.h>
#include <libgadget/powerspectrum.h>
#include <libgadget/gravity.h>
Go to the source code of this file.
Classes | |
struct | ic_prep_data |
Functions | |
static void | potential_transfer (PetaPM *pm, int64_t k2, int kpos[3], pfft_complex *value) |
static void | force_x_transfer (PetaPM *pm, int64_t k2, int kpos[3], pfft_complex *value) |
static void | force_y_transfer (PetaPM *pm, int64_t k2, int kpos[3], pfft_complex *value) |
static void | force_z_transfer (PetaPM *pm, int64_t k2, int kpos[3], pfft_complex *value) |
static void | readout_force_x (PetaPM *pm, int i, double *mesh, double weight) |
static void | readout_force_y (PetaPM *pm, int i, double *mesh, double weight) |
static void | readout_force_z (PetaPM *pm, int i, double *mesh, double weight) |
static PetaPMRegion * | _prepare (PetaPM *pm, PetaPMParticleStruct *pstruct, void *userdata, int *Nregions) |
static void | glass_force (PetaPM *pm, double t_f, struct ic_part_data *ICP, const int NumPart) |
static void | glass_stats (struct ic_part_data *ICP, int NumPart) |
int | setup_glass (IDGenerator *idgen, PetaPM *pm, double shift, int seed, double mass, struct ic_part_data *ICP, const double UnitLength_in_cm, const char *OutputDir) |
void | glass_evolve (PetaPM *pm, int nsteps, const char *pkoutname, struct ic_part_data *ICP, const int NumPart, const double UnitLength_in_cm, const char *OutputDir) |
static double | diff_kernel (double w) |
static void | force_transfer (PetaPM *pm, int k, pfft_complex *value) |
Variables | |
static PetaPMFunctions | functions [] |
static PetaPMGlobalFunctions | global_functions = {measure_power_spectrum, NULL, potential_transfer} |
static struct ic_part_data * | curICP |
static double | pot_factor |
|
static |
Definition at line 218 of file glass.c.
References PetaPM::BoxSize, ic_prep_data::curICP, ic_part_data::Mass, mymalloc2, PetaPM::Nmesh, ic_prep_data::NumPart, Region::offset, petapm_region_init_strides(), ic_part_data::Pos, pot_factor, Region::size, and walltime_measure.
Referenced by glass_force().
|
static |
Definition at line 316 of file glass.c.
Referenced by force_transfer().
|
static |
Definition at line 326 of file glass.c.
References PetaPM::BoxSize, diff_kernel(), and PetaPM::Nmesh.
Referenced by force_x_transfer(), force_y_transfer(), and force_z_transfer().
|
static |
Definition at line 340 of file glass.c.
References force_transfer().
|
static |
Definition at line 343 of file glass.c.
References force_transfer().
|
static |
Definition at line 346 of file glass.c.
References force_transfer().
void glass_evolve | ( | PetaPM * | pm, |
int | nsteps, | ||
const char * | pkoutname, | ||
struct ic_part_data * | ICP, | ||
const int | NumPart, | ||
const double | UnitLength_in_cm, | ||
const char * | OutputDir | ||
) |
Definition at line 73 of file glass.c.
References PetaPM::BoxSize, ic_part_data::Disp, glass_force(), glass_stats(), message(), PetaPM::Nmesh, ic_part_data::Pos, powerspectrum_alloc(), powerspectrum_free(), powerspectrum_save(), PetaPM::ps, UnitLength_in_cm, and ic_part_data::Vel.
Referenced by main(), and setup_glass().
|
static |
Definition at line 181 of file glass.c.
References _prepare(), curICP, ic_part_data::Disp, functions, global_functions, ic_part_data::Mass, ic_prep_data::NumPart, petapm_force(), ic_part_data::Pos, powerspectrum_sum(), powerspectrum_zero(), PetaPM::ps, and walltime_measure.
Referenced by glass_evolve().
|
static |
Definition at line 148 of file glass.c.
References ic_part_data::Disp, message(), and ic_part_data::Vel.
Referenced by glass_evolve().
|
static |
Definition at line 282 of file glass.c.
References PetaPM::Nmesh, pot_factor, powerspectrum_add_mode(), and PetaPM::ps.
|
static |
|
static |
|
static |
int setup_glass | ( | IDGenerator * | idgen, |
PetaPM * | pm, | ||
double | shift, | ||
int | seed, | ||
double | mass, | ||
struct ic_part_data * | ICP, | ||
const double | UnitLength_in_cm, | ||
const char * | OutputDir | ||
) |
Definition at line 41 of file glass.c.
References IDGenerator::BoxSize, fastpm_strdup_printf(), glass_evolve(), idgen_create_pos_from_index(), ic_part_data::Mass, myfree, IDGenerator::Ngrid, IDGenerator::NumPart, ic_part_data::Pos, ThisTask, and UnitLength_in_cm.
Referenced by main().
|
static |
Definition at line 177 of file glass.c.
Referenced by glass_force(), readout_force_x(), readout_force_y(), readout_force_z(), and write_particle_data().
|
static |
Definition at line 25 of file glass.c.
Referenced by glass_force().
|
static |
Definition at line 33 of file glass.c.
Referenced by glass_force(), gravpm_force(), petapm_force(), and petapm_force_r2c().
|
static |
Definition at line 215 of file glass.c.
Referenced by _prepare(), and potential_transfer().