Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
f898d54d
Commit
f898d54d
authored
May 01, 2019
by
Matthieu Schaller
Browse files
Updated the plotting python scripts to include the new BH-related tasks.
parent
8e057a9d
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/task.c
View file @
f898d54d
...
...
@@ -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
;
...
...
tools/plot_task_dependencies.py
View file @
f898d54d
...
...
@@ -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,"
...
...
tools/task_plots/analyse_tasks.py
View file @
f898d54d
...
...
@@ -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"
,
]
...
...
tools/task_plots/plot_tasks.py
View file @
f898d54d
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment