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

Add the star formation struct to the main.c and engine_init

parent 21e886b8
Branches
Tags
1 merge request!705Star formation following Schaye08
......@@ -90,6 +90,7 @@ int main(int argc, char *argv[]) {
struct cooling_function_data cooling_func;
struct cosmology cosmo;
struct external_potential potential;
struct star_formation starform;
struct pm_mesh mesh;
struct gpart *gparts = NULL;
struct gravity_props gravity_properties;
......@@ -862,6 +863,11 @@ int main(int argc, char *argv[]) {
cooling_init(params, &us, &prog_const, &cooling_func);
if (myrank == 0) cooling_print(&cooling_func);
/* Initialise the star formation law and its properties */
if (with_star_formation)
starformation_init(params, &prog_const, &us, &s, &starform);
if (myrank ==0) starformation_init(&starform);
/* Initialise the chemistry */
bzero(&chemistry, sizeof(struct chemistry_global_data));
chemistry_init(params, &us, &prog_const, &chemistry);
......@@ -890,7 +896,7 @@ int main(int argc, char *argv[]) {
engine_init(&e, &s, params, N_total[0], N_total[1], N_total[2],
engine_policies, talking, &reparttype, &us, &prog_const, &cosmo,
&hydro_properties, &gravity_properties, &stars_properties,
&mesh, &potential, &cooling_func, &chemistry);
&mesh, &potential, &cooling_func, &starform, &chemistry);
engine_config(0, &e, params, nr_nodes, myrank, nr_threads, with_aff,
talking, restart_file);
......
......@@ -356,6 +356,9 @@ struct engine {
/* Properties of the cooling scheme */
struct cooling_function_data *cooling_func;
/* Properties of the starformation law */
const struct star_formation *star_formation;
/* Properties of the chemistry model */
const struct chemistry_global_data *chemistry;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment