MP-Gadget
5.0.1.dev1-76bc7d4726-dirty
|
Go to the source code of this file.
Classes | |
struct | slot_info |
struct | particle_data_ext |
struct | bh_particle_data |
struct | star_particle_data |
struct | sph_particle_data |
struct | slots_manager_type |
struct | EISlotsFork |
Macros | |
#define | NMETALS 9 |
#define | SphP ((struct sph_particle_data*) SlotsManager->info[0].ptr) |
#define | StarP ((struct star_particle_data*) SlotsManager->info[4].ptr) |
#define | BhP ((struct bh_particle_data*) SlotsManager->info[5].ptr) |
#define | SPHP(i) SphP[P[i].PI] |
#define | BHP(i) BhP[P[i].PI] |
#define | STARP(i) StarP[P[i].PI] |
#define | BASESLOT_PI(PI, ptype, sman) ((struct particle_data_ext *)(sman->info[ptype].ptr + sman->info[ptype].elsize * (PI))) |
Functions | |
void | slots_init (double increase, struct slots_manager_type *sman) |
void | slots_set_enabled (int ptype, size_t elsize, struct slots_manager_type *sman) |
void | slots_free (struct slots_manager_type *sman) |
void | slots_mark_garbage (int i, struct part_manager_type *pman, struct slots_manager_type *sman) |
void | slots_setup_topology (struct part_manager_type *pman, int64_t *NLocal, struct slots_manager_type *sman) |
void | slots_setup_id (const struct part_manager_type *pman, struct slots_manager_type *sman) |
int | slots_split_particle (int parent, double childmass, struct part_manager_type *pman) |
int | slots_convert (int parent, int ptype, int placement, struct part_manager_type *pman, struct slots_manager_type *sman) |
int | slots_gc (int *compact_slots, struct part_manager_type *pman, struct slots_manager_type *sman) |
void | slots_gc_sorted (struct part_manager_type *pman, struct slots_manager_type *sman) |
size_t | slots_reserve (int where, int64_t atleast[6], struct slots_manager_type *sman) |
void | slots_check_id_consistency (struct part_manager_type *pman, struct slots_manager_type *sman) |
Variables | |
struct slots_manager_type | SlotsManager [1] |
MPI_Datatype | MPI_TYPE_PARTICLE |
MPI_Datatype | MPI_TYPE_SLOT [6] |
#define BASESLOT_PI | ( | PI, | |
ptype, | |||
sman | |||
) | ((struct particle_data_ext *)(sman->info[ptype].ptr + sman->info[ptype].elsize * (PI))) |
Definition at line 132 of file slotsmanager.h.
#define BhP ((struct bh_particle_data*) SlotsManager->info[5].ptr) |
Definition at line 121 of file slotsmanager.h.
Definition at line 125 of file slotsmanager.h.
#define NMETALS 9 |
Definition at line 60 of file slotsmanager.h.
#define SphP ((struct sph_particle_data*) SlotsManager->info[0].ptr) |
Definition at line 119 of file slotsmanager.h.
Definition at line 124 of file slotsmanager.h.
#define StarP ((struct star_particle_data*) SlotsManager->info[4].ptr) |
Definition at line 120 of file slotsmanager.h.
Definition at line 126 of file slotsmanager.h.
void slots_check_id_consistency | ( | struct part_manager_type * | pman, |
struct slots_manager_type * | sman | ||
) |
Definition at line 587 of file slotsmanager.c.
References part_manager_type::Base, BASESLOT_PI, slot_info::enabled, endrun(), particle_data::ID, slots_manager_type::info, particle_data::IsGarbage, message(), MPI_INT64, part_manager_type::NumPart, particle_data::PI, ptype, slot_info::size, and particle_data::Type.
Referenced by domain_exchange_once(), slots_gc_slots(), slots_gc_sorted(), test_exchange(), test_exchange_uneven(), test_exchange_with_garbage(), test_exchange_zero_slots(), test_slots_gc(), and test_slots_gc_sorted().
int slots_convert | ( | int | parent, |
int | ptype, | ||
int | placement, | ||
struct part_manager_type * | pman, | ||
struct slots_manager_type * | sman | ||
) |
Definition at line 60 of file slotsmanager.c.
References atomic_fetch_and_add_64(), part_manager_type::Base, BASESLOT_PI, endrun(), slots_manager_type::info, part_manager_type::MaxPart, slot_info::maxsize, particle_data::PI, ptype, slot_info::size, slots_connect_new_slot(), SLOTS_ENABLED, and particle_data::Type.
Referenced by blackhole_make_one(), make_particle_star(), test_slots_convert(), and test_slots_fork().
void slots_free | ( | struct slots_manager_type * | sman | ) |
Definition at line 570 of file slotsmanager.c.
References slots_manager_type::Base, and myfree.
Referenced by teardown_particles().
int slots_gc | ( | int * | compact_slots, |
struct part_manager_type * | pman, | ||
struct slots_manager_type * | sman | ||
) |
Definition at line 145 of file slotsmanager.c.
References slots_gc_base(), and slots_gc_slots().
Referenced by domain_exchange_once(), run(), test_slots_gc(), and test_slots_zero().
void slots_gc_sorted | ( | struct part_manager_type * | pman, |
struct slots_manager_type * | sman | ||
) |
Definition at line 442 of file slotsmanager.c.
References part_manager_type::Base, slot_info::elsize, slots_manager_type::info, part_manager_type::NumPart, order_by_type_and_key(), slot_info::ptr, ptype, qsort_openmp, slot_info::size, slot_cmp_reverse_link(), slots_check_id_consistency(), SLOTS_ENABLED, slots_gc_collect(), slots_gc_mark(), slots_get_last_garbage(), and SlotsManager.
Referenced by domain_decompose_full(), test_slots_gc_sorted(), and test_slots_zero().
void slots_init | ( | double | increase, |
struct slots_manager_type * | sman | ||
) |
Definition at line 550 of file slotsmanager.c.
References slots_manager_type::increase, and MPI_TYPE_PARTICLE.
Referenced by begrun(), setup_density(), and setup_particles().
void slots_mark_garbage | ( | int | i, |
struct part_manager_type * | pman, | ||
struct slots_manager_type * | sman | ||
) |
Definition at line 577 of file slotsmanager.c.
References part_manager_type::Base, BASESLOT_PI, particle_data::IsGarbage, part_manager_type::MaxPart, particle_data::PI, SLOTS_ENABLED, and particle_data::Type.
Referenced by blackhole_feedback_ngbiter(), domain_exchange_once(), test_exchange_with_garbage(), test_slots_gc(), test_slots_gc_sorted(), and test_slots_zero().
size_t slots_reserve | ( | int | where, |
int64_t | atleast[6], | ||
struct slots_manager_type * | sman | ||
) |
Definition at line 475 of file slotsmanager.c.
References add, slots_manager_type::Base, slot_info::elsize, GDB_BhP, GDB_SphP, GDB_StarP, slots_manager_type::increase, slots_manager_type::info, slot_info::maxsize, message(), mymalloc, myrealloc, slot_info::ptr, ptype, slot_info::size, and SLOTS_ENABLED.
Referenced by domain_exchange_once(), fof_distribute_particles(), fof_seed(), init_alloc_particle_slot_memory(), setup_density(), setup_particles(), sfr_reserve_slots(), and test_slots_reserve().
void slots_set_enabled | ( | int | ptype, |
size_t | elsize, | ||
struct slots_manager_type * | sman | ||
) |
Definition at line 560 of file slotsmanager.c.
References slot_info::elsize, slot_info::enabled, slots_manager_type::info, MPI_TYPE_SLOT, and ptype.
Referenced by begrun(), setup_density(), and setup_particles().
void slots_setup_id | ( | const struct part_manager_type * | pman, |
struct slots_manager_type * | sman | ||
) |
Definition at line 653 of file slotsmanager.c.
References part_manager_type::Base, slot_info::elsize, slot_info::enabled, endrun(), particle_data::ID, particle_data_ext::ID, slots_manager_type::info, part_manager_type::NumPart, particle_data::PI, slot_info::ptr, particle_data_ext::ReverseLink, slot_info::size, and particle_data::Type.
Referenced by petaio_read_snapshot(), and setup_particles().
void slots_setup_topology | ( | struct part_manager_type * | pman, |
int64_t * | NLocal, | ||
struct slots_manager_type * | sman | ||
) |
Definition at line 624 of file slotsmanager.c.
References part_manager_type::Base, slot_info::enabled, slots_manager_type::info, particle_data::IsGarbage, particle_data::PI, ptype, slot_info::size, and particle_data::Type.
Referenced by init_alloc_particle_slot_memory(), and setup_particles().
int slots_split_particle | ( | int | parent, |
double | childmass, | ||
struct part_manager_type * | pman | ||
) |
When a new additional star particle is created, we can put it into the tree at the position of the spawning gas particle. Multipole moments of tree nodes need not be changed.
Definition at line 103 of file slotsmanager.c.
References atomic_fetch_and_add_64(), part_manager_type::Base, endrun(), event_emit(), EventSlotsFork, particle_data::Generation, particle_data::ID, particle_data::Mass, part_manager_type::MaxPart, part_manager_type::NumPart, EISlotsFork::parent, and particle_data::PI.
Referenced by get_sfr_eeqos(), and test_slots_fork().
|
extern |
Definition at line 11 of file slotsmanager.c.
Referenced by domain_exchange_once(), and slots_init().
|
extern |
Definition at line 13 of file slotsmanager.c.
Referenced by domain_exchange_once(), and slots_set_enabled().
struct slots_manager_type SlotsManager[1] |