Skip to content
Snippets Groups Projects
Commit d3c230dc authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Redirect the output of SWIFT to a output file

parent 494177c3
No related branches found
No related tags found
1 merge request!242Add the cooling infrastructure and the const_du and const_lambda
...@@ -5,6 +5,6 @@ echo "Generating initial conditions for the cooling box example..." ...@@ -5,6 +5,6 @@ echo "Generating initial conditions for the cooling box example..."
python makeIC.py 10 python makeIC.py 10
../swift -s -t 1 coolingBox.yml -C ../swift -s -t 1 coolingBox.yml -C 2>&1 | tee output.log
python energy_plot.py 0 python energy_plot.py 0
...@@ -330,17 +330,6 @@ int main(int argc, char *argv[]) { ...@@ -330,17 +330,6 @@ int main(int argc, char *argv[]) {
struct hydro_props hydro_properties; struct hydro_props hydro_properties;
hydro_props_init(&hydro_properties, params); hydro_props_init(&hydro_properties, params);
/* Initialise the external potential properties */
struct external_potential potential;
if (with_external_gravity)
potential_init(params, &prog_const, &us, &potential);
if (with_external_gravity && myrank == 0) potential_print(&potential);
/* Initialise the cooling function properties */
struct cooling_data cooling;
if (with_cooling) cooling_init(params, &us, &prog_const, &cooling);
if (with_cooling && myrank == 0) cooling_print(&cooling);
/* Read particles and space information from (GADGET) ICs */ /* Read particles and space information from (GADGET) ICs */
char ICfileName[200] = ""; char ICfileName[200] = "";
parser_get_param_string(params, "InitialConditions:file_name", ICfileName); parser_get_param_string(params, "InitialConditions:file_name", ICfileName);
...@@ -443,6 +432,17 @@ int main(int argc, char *argv[]) { ...@@ -443,6 +432,17 @@ int main(int argc, char *argv[]) {
message("nr of cells at depth %i is %i.", data[0], data[1]); message("nr of cells at depth %i is %i.", data[0], data[1]);
} }
/* Initialise the external potential properties */
struct external_potential potential;
if (with_external_gravity)
potential_init(params, &prog_const, &us, &potential);
if (with_external_gravity && myrank == 0) potential_print(&potential);
/* Initialise the cooling function properties */
struct cooling_data cooling;
if (with_cooling) cooling_init(params, &us, &prog_const, &cooling);
if (with_cooling && myrank == 0) cooling_print(&cooling);
/* Construct the engine policy */ /* Construct the engine policy */
int engine_policies = ENGINE_POLICY | engine_policy_steal; int engine_policies = ENGINE_POLICY | engine_policy_steal;
if (with_drift_all) engine_policies |= engine_policy_drift_all; if (with_drift_all) engine_policies |= engine_policy_drift_all;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment