Commit ee77bc3d authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

In the Quick Lyman-alpha model, don't even bother forming star particles. Just turn the gas into DM

parent 409d5e5b
......@@ -315,7 +315,7 @@ int main(int argc, char *argv[]) {
with_black_holes = 1;
with_fof = 1;
}
if(with_qla) {
if (with_qla) {
with_hydro = 1;
with_self_gravity = 1;
with_stars = 1;
......
......@@ -329,7 +329,13 @@ void runner_do_star_formation(struct runner *r, struct cell *c, int timer) {
#endif
/* Convert the gas particle to a star particle */
struct spart *sp = cell_convert_part_to_spart(e, c, p, xp);
struct spart *sp = NULL;
if (swift_star_formation_model_creates_stars) {
sp = cell_convert_part_to_spart(e, c, p, xp);
} else {
cell_convert_part_to_gpart(e, c, p, xp);
}
/* Did we get a star? (Or did we run out of spare ones?) */
if (sp != NULL) {
......
......@@ -5072,7 +5072,8 @@ void space_init(struct space *s, struct swift_params *params,
#endif
/* Do we want any spare particles for on the fly creation? */
if (!star_formation) space_extra_sparts = 0;
if (!star_formation || !swift_star_formation_model_creates_stars)
space_extra_sparts = 0;
/* Build the cells recursively. */
if (!dry_run) space_regrid(s, verbose);
......
......@@ -32,12 +32,16 @@
/* Import the right star formation law definition */
#if defined(STAR_FORMATION_NONE)
#define swift_star_formation_model_creates_stars 1
#include "./star_formation/none/star_formation.h"
#elif defined(STAR_FORMATION_QLA)
#define swift_star_formation_model_creates_stars 0
#include "./star_formation/QLA/star_formation.h"
#elif defined(STAR_FORMATION_EAGLE)
#define swift_star_formation_model_creates_stars 1
#include "./star_formation/EAGLE/star_formation.h"
#elif defined(STAR_FORMATION_GEAR)
#define swift_star_formation_model_creates_stars 1
#include "./star_formation/GEAR/star_formation.h"
#else
#error "Invalid choice of star formation law"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment