Skip to content
Snippets Groups Projects
Commit e2a06e57 authored by Loic Hausammann's avatar Loic Hausammann
Browse files

GEAR: apply unit changes after reading parameters from yaml

parent f516f850
No related branches found
No related tags found
1 merge request!1052Gear cosmological simulations
...@@ -149,9 +149,6 @@ __attribute__((always_inline)) INLINE static void lifetime_read_from_tables( ...@@ -149,9 +149,6 @@ __attribute__((always_inline)) INLINE static void lifetime_read_from_tables(
lt->constant[i] = tmp[i + 2 * dim]; lt->constant[i] = tmp[i + 2 * dim];
} }
/* Change units from yr into Myr */
lt->constant[dim - 1] -= 6;
/* Cleanup everything */ /* Cleanup everything */
free(tmp); free(tmp);
h5_close_group(file_id, group_id); h5_close_group(file_id, group_id);
...@@ -196,6 +193,11 @@ __attribute__((always_inline)) INLINE static void lifetime_init( ...@@ -196,6 +193,11 @@ __attribute__((always_inline)) INLINE static void lifetime_init(
/* overwrite the parameters if found in the params */ /* overwrite the parameters if found in the params */
lifetime_read_from_params(lt, params); lifetime_read_from_params(lt, params);
/* Change units from yr into Myr */
const int dim = 3;
lt->constant[dim - 1] -= 6;
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment