Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
a6ce0b83
Commit
a6ce0b83
authored
4 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Store the number of times a particle was hit by SNII or AGN feedback, not only whether it was hit.
parent
34e3b79e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/tracers/EAGLE/tracers.h
+2
-2
2 additions, 2 deletions
src/tracers/EAGLE/tracers.h
src/tracers/EAGLE/tracers_io.h
+4
-2
4 additions, 2 deletions
src/tracers/EAGLE/tracers_io.h
with
6 additions
and
4 deletions
src/tracers/EAGLE/tracers.h
+
2
−
2
View file @
a6ce0b83
...
@@ -145,7 +145,7 @@ static INLINE void tracers_first_init_xpart(
...
@@ -145,7 +145,7 @@ static INLINE void tracers_first_init_xpart(
*/
*/
static
INLINE
void
tracers_after_feedback
(
struct
xpart
*
xp
)
{
static
INLINE
void
tracers_after_feedback
(
struct
xpart
*
xp
)
{
xp
->
tracers_data
.
hit_by_SNII_feedback
=
1
;
xp
->
tracers_data
.
hit_by_SNII_feedback
++
;
}
}
/**
/**
...
@@ -163,7 +163,7 @@ static INLINE void tracers_after_black_holes_feedback(
...
@@ -163,7 +163,7 @@ static INLINE void tracers_after_black_holes_feedback(
struct
xpart
*
xp
,
const
int
with_cosmology
,
const
float
scale_factor
,
struct
xpart
*
xp
,
const
int
with_cosmology
,
const
float
scale_factor
,
const
double
time
,
const
double
delta_energy
)
{
const
double
time
,
const
double
delta_energy
)
{
xp
->
tracers_data
.
hit_by_AGN_feedback
=
1
;
xp
->
tracers_data
.
hit_by_AGN_feedback
++
;
xp
->
tracers_data
.
AGN_feedback_energy
+=
delta_energy
;
xp
->
tracers_data
.
AGN_feedback_energy
+=
delta_energy
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/tracers/EAGLE/tracers_io.h
+
4
−
2
View file @
a6ce0b83
...
@@ -77,13 +77,15 @@ __attribute__((always_inline)) INLINE static int tracers_write_particles(
...
@@ -77,13 +77,15 @@ __attribute__((always_inline)) INLINE static int tracers_write_particles(
io_make_output_field
(
"HeatedBySNIIFeedback"
,
CHAR
,
1
,
UNIT_CONV_NO_UNITS
,
io_make_output_field
(
"HeatedBySNIIFeedback"
,
CHAR
,
1
,
UNIT_CONV_NO_UNITS
,
0
.
f
,
xparts
,
tracers_data
.
hit_by_SNII_feedback
,
0
.
f
,
xparts
,
tracers_data
.
hit_by_SNII_feedback
,
"Flags the particles that have been directly hit by "
"Flags the particles that have been directly hit by "
"a SNII feedback event at some point in the past."
);
"a SNII feedback event at some point in the past. "
"If > 0, contains the number of individual events."
);
list
[
3
]
=
list
[
3
]
=
io_make_output_field
(
"HeatedByAGNFeedback"
,
CHAR
,
1
,
UNIT_CONV_NO_UNITS
,
io_make_output_field
(
"HeatedByAGNFeedback"
,
CHAR
,
1
,
UNIT_CONV_NO_UNITS
,
0
.
f
,
xparts
,
tracers_data
.
hit_by_AGN_feedback
,
0
.
f
,
xparts
,
tracers_data
.
hit_by_AGN_feedback
,
"Flags the particles that have been directly hit by "
"Flags the particles that have been directly hit by "
"an AGN feedback event at some point in the past."
);
"an AGN feedback event at some point in the past. "
"If > 0, contains the number of individual events."
);
list
[
4
]
=
io_make_output_field
(
"EnergiesReceivedFromAGNFeedback"
,
FLOAT
,
1
,
list
[
4
]
=
io_make_output_field
(
"EnergiesReceivedFromAGNFeedback"
,
FLOAT
,
1
,
UNIT_CONV_ENERGY
,
0
.
f
,
xparts
,
UNIT_CONV_ENERGY
,
0
.
f
,
xparts
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment