diff --git a/src/black_holes/EAGLE/black_holes.h b/src/black_holes/EAGLE/black_holes.h index aaeed5783429bb24318dfad116d4c1192b64f9c2..e9c873f69b40cb2bebfe02355a50a99ab37d3503 100644 --- a/src/black_holes/EAGLE/black_holes.h +++ b/src/black_holes/EAGLE/black_holes.h @@ -55,6 +55,7 @@ __attribute__((always_inline)) INLINE static void black_holes_first_init_bpart( bp->time_bin = 0; bp->subgrid_mass = bp->mass; bp->energy_reservoir = 0.; + bp->formation_time = -1.; } /** diff --git a/src/black_holes/EAGLE/black_holes_io.h b/src/black_holes/EAGLE/black_holes_io.h index ffd4a38a61ef8bd8f124128be7fe9a852634f52e..f794d7a298838eee8d6da6fd6ca75d59c8110677 100644 --- a/src/black_holes/EAGLE/black_holes_io.h +++ b/src/black_holes/EAGLE/black_holes_io.h @@ -61,7 +61,7 @@ INLINE static void black_holes_write_particles(const struct bpart *bparts, int *num_fields) { /* Say how much we want to write */ - *num_fields = 5; + *num_fields = 10; /* List what we want to write */ list[0] = io_make_output_field("Coordinates", DOUBLE, 3, UNIT_CONV_LENGTH, @@ -74,6 +74,16 @@ INLINE static void black_holes_write_particles(const struct bpart *bparts, bparts, id); list[4] = io_make_output_field("SmoothingLength", FLOAT, 1, UNIT_CONV_LENGTH, bparts, h); + list[5] = io_make_output_field("SubgridMasses", FLOAT, 1, UNIT_CONV_MASS, + bparts, subgrid_mass); + list[6] = io_make_output_field("FormationTime", FLOAT, 1, UNIT_CONV_TIME, + bparts, formation_time); + list[7] = io_make_output_field("GasDensity", FLOAT, 1, UNIT_CONV_DENSITY, + bparts, rho_gas); + list[8] = io_make_output_field("GasSoundSpeed", FLOAT, 1, UNIT_CONV_SPEED, + bparts, sound_speed_gas); + list[9] = io_make_output_field("EnergyReservoir", FLOAT, 1, UNIT_CONV_ENERGY, + bparts, energy_reservoir); #ifdef DEBUG_INTERACTIONS_BLACK_HOLES diff --git a/src/black_holes/EAGLE/black_holes_part.h b/src/black_holes/EAGLE/black_holes_part.h index 0aa311ff8084b87e607f6ccbf3d1cce7b15b53ce..bbb19936b6d33c2b42279f93d53e5fc31d60491d 100644 --- a/src/black_holes/EAGLE/black_holes_part.h +++ b/src/black_holes/EAGLE/black_holes_part.h @@ -63,6 +63,16 @@ struct bpart { /*! Subgrid mass of the black hole */ float subgrid_mass; + /*! Union for the formation time and formation scale factor */ + union { + + /*! Formation time */ + float formation_time; + + /*! Formation scale factor */ + float formation_scale_factor; + }; + /*! Energy reservoir for feedback */ float energy_reservoir;