MP-Gadget
5.0.1.dev1-76bc7d4726-dirty
|
#include <mpi.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <bigfile-mpi.h>
#include "utils.h"
#include "utils/mpsort.h"
#include "partmanager.h"
#include "slotsmanager.h"
#include "petaio.h"
#include "exchange.h"
#include "fof.h"
#include "walltime.h"
Go to the source code of this file.
Classes | |
struct | PartIndex |
Macros | |
#define | SIMPLE_PROPERTY_FOF(name, field, type, items) |
Functions | |
static void | fof_register_io_blocks (int MetalReturnOn, int BlackHoleOn, struct IOTable *IOTable) |
static void | fof_write_header (BigFile *bf, int64_t TotNgroups, const double atime, const double *MassTable, Cosmology *CP, MPI_Comm Comm) |
static void | build_buffer_fof (FOFGroups *fof, BigArray *array, IOTableEntry *ent, struct conversions *conv) |
static int | fof_distribute_particles (struct part_manager_type *halo_pman, struct slots_manager_type *halo_sman, MPI_Comm Comm) |
static void | fof_radix_Group_GrNr (const void *a, void *radix, void *arg) |
void | fof_save_particles (FOFGroups *fof, const char *OutputDir, const char *FOFFileBase, int num, int SaveParticles, Cosmology *CP, double atime, const double *MassTable, int MetalReturnOn, int BlackholeOn, MPI_Comm Comm) |
static int | fof_sorted_layout (int i, const void *userdata) |
static void | fof_radix_sortkey (const void *c1, void *out, void *arg) |
static void | fof_radix_origin (const void *c1, void *out, void *arg) |
static int | order_by_type_and_grnr (const void *a, const void *b) |
static int | fof_try_particle_exchange (struct part_manager_type *halo_pman, struct slots_manager_type *halo_sman, MPI_Comm Comm) |
static void | GTFirstPos (int i, float *out, void *baseptr, void *smanptr, const struct conversions *params) |
static void | STFirstPos (int i, float *out, void *baseptr, void *smanptr, const struct conversions *params) |
static void | GTMassCenterPosition (int i, double *out, void *baseptr, void *smanptr, const struct conversions *params) |
static void | STMassCenterPosition (int i, double *out, void *baseptr, void *smanptr, const struct conversions *params) |
static void | GTMassCenterVelocity (int i, float *out, void *baseptr, void *slotptr, const struct conversions *params) |
#define SIMPLE_PROPERTY_FOF | ( | name, | |
field, | |||
type, | |||
items | |||
) |
Definition at line 394 of file fofpetaio.c.
|
static |
Definition at line 333 of file fofpetaio.c.
References IOTableEntry::getter, FOFGroups::Group, FOFGroups::Ngroups, and petaio_alloc_buffer().
Referenced by fof_save_particles().
|
static |
Definition at line 249 of file fofpetaio.c.
References part_manager_type::Base, slots_manager_type::Base, part_manager_type::BoxSize, part_manager_type::CurrentParticleOffset, slot_info::elsize, slot_info::enabled, endrun(), fof_try_particle_exchange(), slots_manager_type::info, part_manager_type::MaxPart, slot_info::maxsize, message(), mymalloc, part_manager_type::NumPart, order_by_type_and_grnr(), P, PartManager, particle_data::PI, slot_info::ptr, qsort_openmp, slot_info::size, slots_reserve(), and SlotsManager.
Referenced by fof_save_particles().
|
static |
Definition at line 26 of file fofpetaio.c.
References BaseGroup::GrNr.
Referenced by fof_save_particles().
|
static |
Definition at line 137 of file fofpetaio.c.
References PartIndex::origin.
Referenced by fof_try_particle_exchange().
|
static |
Definition at line 132 of file fofpetaio.c.
References PartIndex::sortKey.
Referenced by fof_try_particle_exchange().
|
static |
Definition at line 468 of file fofpetaio.c.
References IOTable::allocated, IOTable::ent, IO_REG, IO_REG_WRONLY, mymalloc2, NMETALS, PTYPE_FOF_GROUP, and IOTable::used.
Referenced by fof_save_particles().
void fof_save_particles | ( | FOFGroups * | fof, |
const char * | OutputDir, | ||
const char * | FOFFileBase, | ||
int | num, | ||
int | SaveParticles, | ||
Cosmology * | CP, | ||
double | atime, | ||
const double * | MassTable, | ||
int | MetalReturnOn, | ||
int | BlackholeOn, | ||
MPI_Comm | Comm | ||
) |
Definition at line 32 of file fofpetaio.c.
References conversions::atime, part_manager_type::Base, slots_manager_type::Base, build_buffer_fof(), CP, destroy_io_blocks(), endrun(), IOTable::ent, fastpm_strdup_printf(), fof_distribute_particles(), fof_radix_Group_GrNr(), fof_register_io_blocks(), fof_write_header(), FOFGroups::Group, conversions::hubble, hubble_function(), message(), MPIU_Barrier, mpsort_mpi, myfree, mymalloc, IOTableEntry::name, FOFGroups::Ngroups, part_manager_type::NumPart, petaio_build_buffer(), petaio_build_selection(), petaio_destroy_buffer(), petaio_save_block(), IOTableEntry::ptype, ptype, PTYPE_FOF_GROUP, register_io_blocks(), FOFGroups::TotNgroups, IOTable::used, and walltime_measure.
Referenced by fof_save_groups().
|
static |
Definition at line 127 of file fofpetaio.c.
References part_manager_type::Base, and particle_data::TargetTask.
Referenced by fof_try_particle_exchange().
|
static |
Definition at line 178 of file fofpetaio.c.
References part_manager_type::Base, domain_exchange(), endrun(), fof_radix_origin(), fof_radix_sortkey(), fof_sorted_layout(), particle_data::GrNr, part_manager_type::MaxPart, mpsort_mpi, myfree, mymalloc, NTask, part_manager_type::NumPart, PartIndex::origin, PartManager, PartIndex::sortKey, PartIndex::targetTask, particle_data::TargetTask, ThisTask, and walltime_measure.
Referenced by fof_distribute_particles().
|
static |
Definition at line 347 of file fofpetaio.c.
References part_manager_type::BoxSize, Cosmology::CMBTemperature, CP, endrun(), GetUsePeculiarVelocity(), hubble_function(), Cosmology::HubbleParam, MPI_INT64, part_manager_type::NumPart, Cosmology::Omega0, Cosmology::OmegaBaryon, Cosmology::OmegaLambda, P, and PartManager.
Referenced by fof_save_particles().
|
static |
Definition at line 404 of file fofpetaio.c.
References Group::base, part_manager_type::BoxSize, part_manager_type::CurrentParticleOffset, BaseGroup::FirstPos, and PartManager.
|
static |
Definition at line 423 of file fofpetaio.c.
References part_manager_type::BoxSize, Group::CM, part_manager_type::CurrentParticleOffset, and PartManager.
|
static |
Definition at line 442 of file fofpetaio.c.
References conversions::atime, GetUsePeculiarVelocity(), and Group::Vel.
|
static |
Definition at line 160 of file fofpetaio.c.
References particle_data::GrNr, and particle_data::Type.
Referenced by fof_distribute_particles().
|
static |
|
static |