Skip to content
Snippets Groups Projects
Commit 852c89e1 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Also make the code compile with the new function signatures if we are not...

Also make the code compile with the new function signatures if we are not using the EAGLE black hole model.
parent 28344b91
No related branches found
No related tags found
1 merge request!804Implementation of black hole accretion and feedback
......@@ -20,6 +20,9 @@
#define SWIFT_DEFAULT_BLACK_HOLES_H
#include <float.h>
/* Local includes */
#include "black_holes_properties.h"
#include "dimension.h"
#include "kernel_hydro.h"
#include "minmax.h"
......@@ -42,9 +45,10 @@ __attribute__((always_inline)) INLINE static float black_holes_compute_timestep(
* read in to do some conversions.
*
* @param bp The particle to act upon
* @param props The properties of the black holes model.
*/
__attribute__((always_inline)) INLINE static void black_holes_first_init_bpart(
struct bpart* bp) {
struct bpart* bp, const struct black_holes_props* props) {
bp->time_bin = 0;
}
......@@ -135,6 +139,23 @@ black_holes_bpart_has_no_neighbours(struct bpart* restrict bp,
bp->density.wcount_dh = 0.f;
}
/**
* @brief Compute the accretion rate of the black hole and all the quantites
* required for the feedback loop.
*
* Nothing to do here.
*
* @param bp The black hole particle.
* @param props The properties of the black hole scheme.
* @param constants The physical constants (in internal units).
* @param cosmo The cosmological model.
* @param dt The time-step size (in physical internal units).
*/
__attribute__((always_inline)) INLINE static void black_holes_prepare_feedback(
struct bpart* restrict bp, const struct black_holes_props* props,
const struct phys_const* constants, const struct cosmology* cosmo,
const double dt) {}
/**
* @brief Reset acceleration fields of a particle
*
......
......@@ -33,8 +33,9 @@
*/
__attribute__((always_inline)) INLINE static void runner_iact_nonsym_bh_density(
const float r2, const float *dx, const float hi, const float hj,
struct bpart *restrict bi, const struct part *restrict pj, const float a,
const float H) {
struct bpart *restrict bi, const struct part *restrict pj,
const struct xpart *restrict xpj, const struct cosmology *cosmo,
const integertime_t ti_current) {
float wi, wi_dx;
......@@ -76,8 +77,10 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_bh_density(
__attribute__((always_inline)) INLINE static void
runner_iact_nonsym_bh_feedback(const float r2, const float *dx, const float hi,
const float hj, struct bpart *restrict bi,
struct part *restrict pj, const float a,
const float H) {
struct part *restrict pj,
const struct xpart *restrict xpj,
const struct cosmology *cosmo,
const integertime_t ti_current) {
#ifdef DEBUG_INTERACTIONS_BH
/* Update ngb counters */
if (si->num_ngb_force < MAX_NUM_OF_NEIGHBOURS_BH)
......
......@@ -61,12 +61,12 @@ struct black_holes_props {
* @param hydro_props The already read-in properties of the hydro scheme.
* @param cosmo The cosmological model.
*/
void black_holes_props_init(struct black_holes_props *bp,
const struct phys_const *phys_const,
const struct unit_system *us,
struct swift_params *params,
const struct hydro_props *hydro_props,
const struct cosmology *cosmo) {
static INLINE void black_holes_props_init(struct black_holes_props *bp,
const struct phys_const *phys_const,
const struct unit_system *us,
struct swift_params *params,
const struct hydro_props *hydro_props,
const struct cosmology *cosmo) {
/* Kernel properties */
bp->eta_neighbours = parser_get_opt_param_float(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment