Skip to content
Snippets Groups Projects
Commit eefdcf36 authored by David Hendriks's avatar David Hendriks
Browse files

local change

parent 9e2a8bca
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,7 @@ import json ...@@ -3,6 +3,7 @@ import json
import time import time
import pickle import pickle
import sys import sys
import numpy as np
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
...@@ -76,26 +77,26 @@ def parse_function(self, output): ...@@ -76,26 +77,26 @@ def parse_function(self, output):
## Set values ## Set values
test_pop = Population() test_pop = Population()
test_pop.set( # test_pop.set(
C_logging_code=""" # C_logging_code="""
if(stardata->star[0].SN_type != SN_NONE) # if(stardata->star[0].SN_type != SN_NONE)
{ # {
if (stardata->model.time < stardata->model.max_evolution_time) # if (stardata->model.time < stardata->model.max_evolution_time)
{ # {
Printf("DAVID_SN %30.12e %g %g %g %d\\n", # Printf("DAVID_SN %30.12e %g %g %g %d\\n",
// # //
stardata->model.time, // 1 # stardata->model.time, // 1
stardata->star[0].mass, //2 # stardata->star[0].mass, //2
stardata->previous_stardata->star[0].mass, //3 # stardata->previous_stardata->star[0].mass, //3
stardata->star[0].pms_mass, //4 # stardata->star[0].pms_mass, //4
stardata->star[0].SN_type //5 # stardata->star[0].SN_type //5
); # );
}; # };
/* Kill the simulation to save time */ # /* Kill the simulation to save time */
stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm; # stardata->model.max_evolution_time = stardata->model.time - stardata->model.dtm;
}; # };
""" # """
) # )
test_pop.set( test_pop.set(
separation=1000000000, separation=1000000000,
...@@ -116,7 +117,7 @@ with open("comparison_result.dat", "a") as f: ...@@ -116,7 +117,7 @@ with open("comparison_result.dat", "a") as f:
f.write(str(res) + "\n") f.write(str(res) + "\n")
mass_distribution = np.arange(1, 200) # mass_distribution = np.arange(1, 200)
# evolve_population_mp(parse_function, mass_distribution) # evolve_population_mp(parse_function, mass_distribution)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment