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
220dbc37
Commit
220dbc37
authored
Dec 16, 2019
by
Matthieu Schaller
Browse files
Documentation of the new function and added the new BH-related functions to the Default model.
parent
e70e32e0
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/black_holes/Default/black_holes.h
View file @
220dbc37
...
...
@@ -227,6 +227,32 @@ __attribute__((always_inline)) INLINE static void black_holes_reset_feedback(
#endif
}
/**
* @brief Store the gravitational potential of a black hole by copying it from
* its #gpart friend.
*
* Nothing to do here.
*
* @param bp The black hole particle.
* @param gp The black hole's #gpart.
*/
__attribute__
((
always_inline
))
INLINE
static
void
black_holes_store_potential_in_bpart
(
struct
bpart
*
bp
,
const
struct
gpart
*
gp
)
{
}
/**
* @brief Store the gravitational potential of a particle by copying it from
* its #gpart friend.
*
* Nothing to do here.
*
* @param p_data The black hole data of a gas particle.
* @param gp The black hole's #gpart.
*/
__attribute__
((
always_inline
))
INLINE
static
void
black_holes_store_potential_in_part
(
struct
black_holes_part_data
*
p_data
,
const
struct
gpart
*
gp
)
{}
/**
* @brief Initialise a BH particle that has just been seeded.
*
...
...
src/black_holes/Default/black_holes_struct.h
View file @
220dbc37
...
...
@@ -41,6 +41,16 @@ black_holes_mark_part_as_not_swallowed(struct black_holes_part_data* p_data) {
/* Nothing to do here: No swallowing in the default model */
}
/**
* @brief Reset the particle-carried potential at the start of a time-step.
*
* Nothing to do here.
*
* @param p_data The #part's black hole data.
*/
__attribute__
((
always_inline
))
INLINE
static
void
black_holes_init_potential
(
struct
black_holes_part_data
*
p_data
)
{}
/**
* @brief Update a given #part's BH data field to mark the particle has
* having been been swallowed.
...
...
src/black_holes/EAGLE/black_holes_struct.h
View file @
220dbc37
...
...
@@ -61,6 +61,11 @@ black_holes_mark_part_as_not_swallowed(struct black_holes_part_data* p_data) {
p_data
->
swallow_id
=
-
1
;
}
/**
* @brief Reset the particle-carried potential at the start of a time-step.
*
* @param p_data The #part's black hole data.
*/
__attribute__
((
always_inline
))
INLINE
static
void
black_holes_init_potential
(
struct
black_holes_part_data
*
p_data
)
{
p_data
->
potential
=
FLT_MAX
;
...
...
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