Skip to content
Snippets Groups Projects

Draft: MPI for sink particles

Closed Darwin requested to merge darwin/sink_mpi into master
Files
41
+ 6
1
@@ -171,7 +171,8 @@ __attribute__((always_inline)) INLINE static void sink_init_part(
cpd->E_rot_neighbours[0] = 0.f;
cpd->E_rot_neighbours[1] = 0.f;
cpd->E_rot_neighbours[2] = 0.f;
cpd->potential = 0.f;
/* cpd->potential = 0.f; */ /* The value was given by
sink_store_potential_in_part() */
cpd->E_mec_bound = 0.f; /* Gravitationally bound particles will have
E_mec_bound < 0. This is checked before comparing
any other value with this one. So no need to put
@@ -643,6 +644,10 @@ INLINE static int sink_spawn_star(struct sink* sink, const struct engine* e,
const int with_cosmology,
const struct phys_const* phys_const,
const struct unit_system* restrict us) {
/* Exit if we have disabled SF */
if (sink_props->disable_star_formation) {
return 0;
}
if (sink->mass > sink->target_mass_Msun * phys_const->const_solar_mass)
return 1;
Loading