Skip to content
Snippets Groups Projects
Commit 929f97fb authored by Folkert Nobels's avatar Folkert Nobels
Browse files

Allow multiple star models besides default

parent ec331260
No related branches found
No related tags found
1 merge request!705Star formation following Schaye08
......@@ -135,6 +135,8 @@ nobase_noinst_HEADERS = align.h approx_math.h atomic.h barrier.h cycle.h error.h
stars.h stars_io.h \
stars/Default/stars.h stars/Default/stars_iact.h stars/Default/stars_io.h \
stars/Default/stars_debug.h stars/Default/stars_part.h \
stars/EAGLE/stars.h stars/EAGLE/stars_iact.h stars/EAGLE/stars_io.h \
stars/EAGLE/stars_debug.h stars/EAGLE/stars_part.h \
potential/none/potential.h potential/point_mass/potential.h \
potential/isothermal/potential.h potential/disc_patch/potential.h \
potential/sine_wave/potential.h \
......
......@@ -89,7 +89,15 @@
#endif
/* Import the right star particle definition */
#if defined(STARS_NONE)
#include "./stars/Default/stars_part.h"
#elif defined(STARS_EAGLE)
#include "./stars/EAGLE/stars_part.h"
#elif defined(STARS_GEAR)
#include "./stars/GEAR/stars_part.h"
#else
#error "Invalid choice of star particle"
#endif
void part_relink_gparts_to_parts(struct part *parts, size_t N,
ptrdiff_t offset);
......
......@@ -34,6 +34,7 @@
#include "cooling.h"
#include "adiabatic_index.h"
#include "cell.h"
#include "stars.h"
/* Starformation struct */
struct star_formation {
......@@ -221,6 +222,7 @@ INLINE static void star_formation_copy_properties(
struct spart *sp = cell_convert_part_to_spart(e, c, p, xp);
sp->mass = p->mass;
sp->mass_init = p->mass;
sp->age = cosmo->a;
message("Copy Properties");
}
......
......@@ -28,7 +28,7 @@
#include "./stars/Default/stars_iact.h"
#elif defined(STARS_EAGLE)
#include "./stars/EAGLE/stars.h"
#include "./stars/EAGLE/stars_iact.h"
#include "./stars/EAGLE/stars_iact.h"
#elif defined(STARS_GEAR)
#include "./stars/GEAR/stars.h"
#include "./stars/GEAR/stars_iact.h"
......
......@@ -20,7 +20,17 @@
#define SWIFT_STARS_IO_H
#include "./const.h"
#include "../config.h"
/* Load the correct star type */
#if defined(STARS_NONE)
#include "./stars/Default/stars_io.h"
#elif defined(STARS_EAGLE)
#include "./stars/EAGLE/stars_io.h"
#elif defined(STARS_GEAR)
#include "./stars/GEAR/stars_io.h"
#else
#error "Invalid choice of star model"
#endif
#endif /* SWIFT_STARS_IO_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment