Commit f898d54d authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Updated the plotting python scripts to include the new BH-related tasks.

parent 8e057a9d
......@@ -709,6 +709,12 @@ void task_get_group_name(int type, int subtype, char *cluster) {
case task_subtype_stars_feedback:
strcpy(cluster, "StarsFeedback");
break;
case task_subtype_bh_density:
strcpy(cluster, "BHDensity");
break;
case task_subtype_bh_feedback:
strcpy(cluster, "BHFeedback");
break;
default:
strcpy(cluster, "None");
break;
......
......@@ -136,6 +136,20 @@ def appendData(data):
return data[0]
def taskIsBlackHoles(name):
"""
Does the task concern black holes?
Parameters
----------
name: str
Task name
"""
if "bh" in name or "bpart" in name:
return True
return False
def taskIsStars(name):
"""
Does the task concern stars?
......@@ -150,7 +164,6 @@ def taskIsStars(name):
return True
return False
def taskIsHydro(name):
"""
Does the task concern the hydro?
......@@ -291,6 +304,9 @@ def writeTask(f, name, implicit, mpi, with_calls):
if mpi:
txt += "shape=diamond,"
if taskIsBlackHoles(name):
txt += "color=forestgreen,"
if taskIsStars(name):
txt += "color=darkorange1,"
......
......@@ -77,6 +77,7 @@ TASKTYPES = [
"extra_ghost",
"drift_part",
"drift_spart",
"drift_bpart",
"drift_gpart",
"drift_gpart_out",
"hydro_end_force",
......@@ -103,6 +104,9 @@ TASKTYPES = [
"stars_ghost",
"stars_ghost_out",
"stars_sort",
"bh_in",
"bh_out",
"bh_ghost",
"count",
]
......@@ -124,6 +128,8 @@ SUBTYPES = [
"spart",
"stars_density",
"stars_feedback",
"bh_density",
"bh_feedback",
"count",
]
......
......@@ -162,6 +162,7 @@ TASKTYPES = [
"extra_ghost",
"drift_part",
"drift_spart",
"drift_bpart",
"drift_gpart",
"drift_gpart_out",
"hydro_end_force",
......@@ -188,6 +189,9 @@ TASKTYPES = [
"stars_ghost",
"stars_ghost_out",
"stars_sort",
"bh_in",
"bh_out",
"bh_ghost",
"count",
]
......@@ -209,6 +213,8 @@ SUBTYPES = [
"spart",
"stars_density",
"stars_feedback",
"bh_density",
"bh_feedback",
"count",
]
......@@ -254,6 +260,14 @@ FULLTYPES = [
"pair/stars_feedback",
"sub_self/stars_feedback",
"sub_pair/stars_feedback",
"self/bh_density",
"pair/bh_density",
"sub_self/bh_density",
"sub_pair/bh_density",
"self/bh_feedback",
"pair/bh_feedback",
"sub_self/bh_feedback",
"sub_pair/bh_feedback",
]
# A number of colours for the various types. Recycled when there are
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment