Commit a6727152 authored by Matthieu Schaller's avatar Matthieu Schaller

Added mechanism to add tracers information to the xparts. Added the EAGLE...

Added mechanism to add tracers information to the xparts. Added the EAGLE tracers (max(T) and time of max(T)). Tracers are dumped in snapshots.
parent e6e3c871
......@@ -1183,6 +1183,7 @@ AC_ARG_WITH([subgrid],
# Default values
with_subgrid_cooling=none
with_subgrid_chemistry=none
with_subgrid_tracers=none
with_subgrid_hydro=none
with_subgrid_stars=none
with_subgrid_feedback=none
......@@ -1196,6 +1197,7 @@ case "$with_subgrid" in
GEAR)
with_subgrid_cooling=grackle
with_subgrid_chemistry=GEAR
with_subgrid_tracers=none
with_subgrid_hydro=gadget2
with_subgrid_stars=GEAR
with_subgrid_feedback=thermal
......@@ -1203,6 +1205,7 @@ case "$with_subgrid" in
EAGLE)
with_subgrid_cooling=EAGLE
with_subgrid_chemistry=EAGLE
with_subgrid_tracers=EAGLE
with_subgrid_hydro=gadget2
with_subgrid_stars=none
with_subgrid_feedback=none
......@@ -1546,6 +1549,35 @@ case "$with_chemistry" in
;;
esac
# Particle tracers
AC_ARG_WITH([tracers],
[AS_HELP_STRING([--with-tracers=<function>],
[chemistry function @<:@none, EAGLE default: none@:>@]
)],
[with_tracers="$withval"],
[with_tracers="none"]
)
if test "$with_subgrid" != "none"; then
if test "$with_tracers" != "none"; then
AC_MSG_ERROR([Cannot provide with-subgrid and with-tracers together])
else
with_tracers="$with_subgrid_tracers"
fi
fi
case "$with_tracers" in
none)
AC_DEFINE([TRACERS_NONE], [1], [No tracers function])
;;
EAGLE)
AC_DEFINE([TRACERS_EAGLE], [1], [Tracers taken from the EAGLE model])
;;
*)
AC_MSG_ERROR([Unknown tracers choice: $with_tracers])
;;
esac
# Stellar model.
AC_ARG_WITH([stars],
[AS_HELP_STRING([--with-stars=<model>],
......@@ -1738,6 +1770,7 @@ AC_MSG_RESULT([
Cooling function : $with_cooling
Chemistry : $with_chemistry
Tracers : $with_tracers
Stellar model : $with_stars
Feedback model : $with_feedback
......
......@@ -772,6 +772,7 @@ INPUT += @top_srcdir@/src/cooling/const_lambda
INPUT += @top_srcdir@/src/cooling/Compton
INPUT += @top_srcdir@/src/cooling/EAGLE
INPUT += @top_srcdir@/src/chemistry/EAGLE
INPUT += @top_srcdir@/src/tracers/EAGLE
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
......
......@@ -49,7 +49,7 @@ include_HEADERS = space.h runner.h queue.h task.h lock.h cell.h part.h const.h \
gravity_softened_derivatives.h vector_power.h collectgroup.h hydro_space.h sort_part.h \
chemistry.h chemistry_io.h chemistry_struct.h cosmology.h restart.h space_getsid.h utilities.h \
mesh_gravity.h cbrt.h exp10.h velociraptor_interface.h swift_velociraptor_part.h outputlist.h \
logger_io.h
logger_io.h tracers_io.h tracers.h tracers_struct.h
# source files for EAGLE cooling
EAGLE_COOLING_SOURCES =
......@@ -161,7 +161,11 @@ nobase_noinst_HEADERS = align.h approx_math.h atomic.h barrier.h cycle.h error.h
chemistry/EAGLE/chemistry.h \
chemistry/EAGLE/chemistry_io.h \
chemistry/EAGLE/chemistry_struct.h\
chemistry/EAGLE/chemistry_iact.h
chemistry/EAGLE/chemistry_iact.h \
tracers/none/tracers.h tracers/none/tracers_struct.h \
tracers/none/tracers_io.h \
tracers/EAGLE/tracers.h tracers/EAGLE/tracers_struct.h \
tracers/EAGLE/tracers_io.h
# Sources and flags for regular library
......
......@@ -64,6 +64,7 @@
#include "stars.h"
#include "timers.h"
#include "tools.h"
#include "tracers.h"
/* Global variables. */
int cell_next_tag = 0;
......@@ -3357,6 +3358,7 @@ int cell_has_tasks(struct cell *c) {
*/
void cell_drift_part(struct cell *c, const struct engine *e, int force) {
const int with_cosmology = (e->policy & engine_policy_cosmology);
const float hydro_h_max = e->hydro_properties->h_max;
const integertime_t ti_old_part = c->hydro.ti_old_part;
const integertime_t ti_current = e->ti_current;
......@@ -3423,7 +3425,7 @@ void cell_drift_part(struct cell *c, const struct engine *e, int force) {
/* Drift from the last time the cell was drifted to the current time */
double dt_drift, dt_kick_grav, dt_kick_hydro, dt_therm;
if (e->policy & engine_policy_cosmology) {
if (with_cosmology) {
dt_drift =
cosmology_get_drift_factor(e->cosmology, ti_old_part, ti_current);
dt_kick_grav =
......@@ -3454,6 +3456,11 @@ void cell_drift_part(struct cell *c, const struct engine *e, int force) {
drift_part(p, xp, dt_drift, dt_kick_hydro, dt_kick_grav, dt_therm,
ti_old_part, ti_current);
/* Update the tracers properties */
tracers_after_drift(p, xp, e->internal_units, e->physical_constants,
with_cosmology, e->cosmology, e->hydro_properties,
e->cooling_func, e->time);
#ifdef SWIFT_DEBUG_CHECKS
/* Make sure the particle does not drift by more than a box length. */
if (fabs(xp->v_full[0] * dt_drift) > e->s->dim[0] ||
......@@ -3513,6 +3520,9 @@ void cell_drift_part(struct cell *c, const struct engine *e, int force) {
if (part_is_active(p, e)) {
hydro_init_part(p, &e->s->hs);
chemistry_init_part(p, e->chemistry);
tracers_after_init(p, xp, e->internal_units, e->physical_constants,
with_cosmology, e->cosmology, e->hydro_properties,
e->cooling_func, e->time);
}
}
......
......@@ -34,6 +34,7 @@
#include "chemistry_struct.h"
#include "cooling_struct.h"
#include "logger.h"
#include "tracers_struct.h"
/* Extra particle data not needed during the SPH loops over neighbours. */
struct xpart {
......@@ -56,6 +57,9 @@ struct xpart {
/* Additional data used to record cooling information */
struct cooling_xpart_data cooling_data;
/* Additional data used by the tracers */
struct tracers_xpart_data tracers_data;
#ifdef WITH_LOGGER
/* Additional data for the particle logger */
struct logger_part_data logger_data;
......
......@@ -52,6 +52,7 @@
#include "part.h"
#include "part_type.h"
#include "stars_io.h"
#include "tracers_io.h"
#include "units.h"
#include "xmf.h"
......@@ -953,6 +954,8 @@ void prepare_file(struct engine* e, const char* baseName, long long N_total[6],
const struct gpart* gparts = e->s->gparts;
const struct spart* sparts = e->s->sparts;
struct swift_params* params = e->parameter_file;
const int with_cosmology = e->policy & engine_policy_cosmology;
FILE* xmfFile = 0;
int periodic = e->s->periodic;
int numFiles = 1;
......@@ -1056,6 +1059,7 @@ void prepare_file(struct engine* e, const char* baseName, long long N_total[6],
if (h_grp < 0) error("Error while creating subgrid group");
cooling_write_flavour(h_grp, e->cooling_func);
chemistry_write_flavour(h_grp);
tracers_write_flavour(h_grp);
H5Gclose(h_grp);
/* Print the gravity parameters */
......@@ -1138,6 +1142,9 @@ void prepare_file(struct engine* e, const char* baseName, long long N_total[6],
num_fields += chemistry_write_particles(parts, list + num_fields);
num_fields += cooling_write_particles(parts, xparts, list + num_fields,
e->cooling_func);
num_fields += tracers_write_particles(parts, xparts, list + num_fields,
with_cosmology);
break;
case swift_type_dark_matter:
......@@ -1212,6 +1219,7 @@ void write_output_parallel(struct engine* e, const char* baseName,
const struct gpart* gparts = e->s->gparts;
const struct spart* sparts = e->s->sparts;
struct swift_params* params = e->parameter_file;
const int with_cosmology = e->policy & engine_policy_cosmology;
/* Number of particles currently in the arrays */
const size_t Ntot = e->s->nr_gparts;
......@@ -1401,6 +1409,9 @@ void write_output_parallel(struct engine* e, const char* baseName,
num_fields += chemistry_write_particles(parts, list + num_fields);
num_fields += cooling_write_particles(
parts, xparts, list + num_fields, e->cooling_func);
num_fields += tracers_write_particles(
parts, xparts, list + num_fields, with_cosmology);
} else {
/* Ok, we need to fish out the particles we want */
......@@ -1426,6 +1437,8 @@ void write_output_parallel(struct engine* e, const char* baseName,
num_fields +=
cooling_write_particles(parts_written, xparts_written,
list + num_fields, e->cooling_func);
num_fields += tracers_write_particles(
parts_written, xparts_written, list + num_fields, with_cosmology);
}
} break;
......
......@@ -64,6 +64,7 @@
#include "task.h"
#include "timers.h"
#include "timestep.h"
#include "tracers.h"
#define TASK_LOOP_DENSITY 0
#define TASK_LOOP_GRADIENT 1
......@@ -1989,6 +1990,7 @@ void runner_do_timestep(struct runner *r, struct cell *c, int timer) {
const struct engine *e = r->e;
const integertime_t ti_current = e->ti_current;
const int with_cosmology = (e->policy & engine_policy_cosmology);
const int count = c->hydro.count;
const int gcount = c->grav.count;
const int scount = c->stars.count;
......@@ -2044,6 +2046,11 @@ void runner_do_timestep(struct runner *r, struct cell *c, int timer) {
p->time_bin = get_time_bin(ti_new_step);
if (p->gpart != NULL) p->gpart->time_bin = p->time_bin;
/* Update the tracers properties */
tracers_after_timestep(p, xp, e->internal_units, e->physical_constants,
with_cosmology, e->cosmology,
e->hydro_properties, e->cooling_func, e->time);
/* Number of updated particles */
updated++;
if (p->gpart != NULL) g_updated++;
......
......@@ -52,6 +52,7 @@
#include "part.h"
#include "part_type.h"
#include "stars_io.h"
#include "tracers_io.h"
#include "units.h"
#include "xmf.h"
......@@ -782,6 +783,7 @@ void write_output_serial(struct engine* e, const char* baseName,
const struct gpart* gparts = e->s->gparts;
const struct spart* sparts = e->s->sparts;
struct swift_params* params = e->parameter_file;
const int with_cosmology = e->policy & engine_policy_cosmology;
FILE* xmfFile = 0;
/* Number of particles currently in the arrays */
......@@ -919,6 +921,7 @@ void write_output_serial(struct engine* e, const char* baseName,
if (h_grp < 0) error("Error while creating subgrid group");
cooling_write_flavour(h_grp, e->cooling_func);
chemistry_write_flavour(h_grp);
tracers_write_flavour(h_grp);
H5Gclose(h_grp);
/* Print the gravity parameters */
......@@ -1076,6 +1079,9 @@ void write_output_serial(struct engine* e, const char* baseName,
num_fields += chemistry_write_particles(parts, list + num_fields);
num_fields += cooling_write_particles(
parts, xparts, list + num_fields, e->cooling_func);
num_fields += tracers_write_particles(
parts, xparts, list + num_fields, with_cosmology);
} else {
/* Ok, we need to fish out the particles we want */
......@@ -1101,6 +1107,9 @@ void write_output_serial(struct engine* e, const char* baseName,
num_fields +=
cooling_write_particles(parts_written, xparts_written,
list + num_fields, e->cooling_func);
num_fields +=
tracers_write_particles(parts_written, xparts_written,
list + num_fields, with_cosmology);
}
} break;
......
......@@ -51,6 +51,7 @@
#include "part.h"
#include "part_type.h"
#include "stars_io.h"
#include "tracers_io.h"
#include "units.h"
#include "xmf.h"
......@@ -645,6 +646,7 @@ void write_output_single(struct engine* e, const char* baseName,
const struct gpart* gparts = e->s->gparts;
const struct spart* sparts = e->s->sparts;
struct swift_params* params = e->parameter_file;
const int with_cosmology = e->policy & engine_policy_cosmology;
/* Number of particles currently in the arrays */
const size_t Ntot = e->s->nr_gparts;
......@@ -772,6 +774,7 @@ void write_output_single(struct engine* e, const char* baseName,
if (h_grp < 0) error("Error while creating subgrid group");
cooling_write_flavour(h_grp, e->cooling_func);
chemistry_write_flavour(h_grp);
tracers_write_flavour(h_grp);
H5Gclose(h_grp);
/* Print the gravity parameters */
......@@ -895,6 +898,9 @@ void write_output_single(struct engine* e, const char* baseName,
num_fields += chemistry_write_particles(parts, list + num_fields);
num_fields += cooling_write_particles(
parts, xparts, list + num_fields, e->cooling_func);
num_fields += tracers_write_particles(
parts, xparts, list + num_fields, with_cosmology);
} else {
/* Ok, we need to fish out the particles we want */
......@@ -920,6 +926,8 @@ void write_output_single(struct engine* e, const char* baseName,
num_fields +=
cooling_write_particles(parts_written, xparts_written,
list + num_fields, e->cooling_func);
num_fields += tracers_write_particles(
parts_written, xparts_written, list + num_fields, with_cosmology);
}
} break;
......
......@@ -59,6 +59,7 @@
#include "stars.h"
#include "threadpool.h"
#include "tools.h"
#include "tracers.h"
/* Split size. */
int space_splitsize = space_splitsize_default;
......@@ -3355,6 +3356,10 @@ void space_first_init_parts_mapper(void *restrict map_data, int count,
/* And the cooling */
cooling_first_init_part(phys_const, us, cosmo, cool_func, &p[k], &xp[k]);
/* And the tracers */
tracers_first_init_xpart(&p[k], &xp[k], us, phys_const, cosmo, hydro_props,
cool_func);
#ifdef SWIFT_DEBUG_CHECKS
/* Check part->gpart->part linkeage. */
if (p[k].gpart && p[k].gpart->id_or_neg_offset != -(k + delta))
......
/*******************************************************************************
* This file is part of SWIFT.
* Copyright (c) 2018 Matthieu Schaller (matthieu.schaller@durham.ac.uk)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#ifndef SWIFT_TRACERS_H
#define SWIFT_TRACERS_H
/**
* @file src/tracers.h
* @brief Branches between the different particle data tracers
*/
/* Config parameters. */
#include "../config.h"
/* Import the right cooling definition */
#if defined(TRACERS_NONE)
#include "./tracers/none/tracers.h"
#elif defined(TRACERS_EAGLE)
#include "./tracers/EAGLE/tracers.h"
#else
#error "Invalid choice of tracers."
#endif
#endif /* SWIFT_TRACERS_H */
/*******************************************************************************
* This file is part of SWIFT.
* Copyright (c) 2018 Matthieu Schaller (matthieu.schaller@durham.ac.uk)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#ifndef SWIFT_TRACERS_EAGLE_H
#define SWIFT_TRACERS_EAGLE_H
/* Config parameters. */
#include "../config.h"
/* Local includes */
#include "cooling.h"
#include "part.h"
#include "tracers_struct.h"
/**
* @brief Update the particle tracers just after it has been initialised at the
* start of a step.
*
* Nothing to do here in the EAGLE model.
*
* @param us The internal system of units.
* @param phys_const The physical constants in internal units.
* @param cosmo The current cosmological model.
* @param hydro_properties the hydro_props struct
* @param cooling The #cooling_function_data used in the run.
* @param p Pointer to the particle data.
* @param xp Pointer to the extended particle data (containing the tracers
* struct).
*/
static INLINE void tracers_after_init(
const struct part *p, struct xpart *xp, const struct unit_system *us,
const struct phys_const *phys_const, const int with_cosmology,
const struct cosmology *cosmo, const struct hydro_props *hydro_props,
const struct cooling_function_data *cooling, const double time) {}
/**
* @brief Update the particle tracers just after it has been drifted.
*
* Nothing to do here in the EAGLE model.
*
* @param us The internal system of units.
* @param phys_const The physical constants in internal units.
* @param cosmo The current cosmological model.
* @param hydro_properties the hydro_props struct
* @param cooling The #cooling_function_data used in the run.
* @param p Pointer to the particle data.
* @param xp Pointer to the extended particle data (containing the tracers
* struct).
*/
static INLINE void tracers_after_drift(
const struct part *p, struct xpart *xp, const struct unit_system *us,
const struct phys_const *phys_const, const int with_cosmology,
const struct cosmology *cosmo, const struct hydro_props *hydro_props,
const struct cooling_function_data *cooling, const double time) {}
/**
* @brief Update the particle tracers just after its time-step has been
* computed.
*
* In EAGLE we record the highest temperature reached.
*
* @param us The internal system of units.
* @param phys_const The physical constants in internal units.
* @param cosmo The current cosmological model.
* @param hydro_properties the hydro_props struct
* @param cooling The #cooling_function_data used in the run.
* @param p Pointer to the particle data.
* @param xp Pointer to the extended particle data (containing the tracers
* struct).
*/
static INLINE void tracers_after_timestep(
const struct part *p, struct xpart *xp, const struct unit_system *us,
const struct phys_const *phys_const, const int with_cosmology,
const struct cosmology *cosmo, const struct hydro_props *hydro_props,
const struct cooling_function_data *cooling, const double time) {
/* Current temperature */
const float temperature = cooling_get_temperature(phys_const, hydro_props, us,
cosmo, cooling, p, xp);
/* New record? */
if (temperature > xp->tracers_data.maximum_temperature) {
xp->tracers_data.maximum_temperature = temperature;
if (with_cosmology) {
xp->tracers_data.maximum_temperature_scale_factor = cosmo->a;
} else {
xp->tracers_data.maximum_temperature_time = time;
}
}
}
/**
* @brief Update the particle tracers just after its time-step has been
* computed.
*
* Set the maximal temperature to a valid initial state
*
* @param us The internal system of units.
* @param phys_const The physical constants in internal units.
* @param cosmo The current cosmological model.
* @param hydro_properties the hydro_props struct
* @param cooling The #cooling_function_data used in the run.
* @param p Pointer to the particle data.
* @param xp Pointer to the extended particle data (containing the tracers
* struct).
*/
static INLINE void tracers_first_init_xpart(
const struct part *p, struct xpart *xp, const struct unit_system *us,
const struct phys_const *phys_const, const struct cosmology *cosmo,
const struct hydro_props *hydro_props,
const struct cooling_function_data *cooling) {
xp->tracers_data.maximum_temperature = -1.f;
xp->tracers_data.maximum_temperature_time = -1.f;
}
#endif /* SWIFT_TRACERS_EAGLE_H */
/*******************************************************************************
* This file is part of SWIFT.
* Copyright (c) 2018 Matthieu Schaller (matthieu.schaller@durham.ac.uk)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#ifndef SWIFT_TRACERS_EAGLE_IO_H
#define SWIFT_TRACERS_EAGLE_IO_H
/* Config parameters. */
#include "../config.h"
/* Local includes */
#include "io_properties.h"
#include "tracers.h"
#ifdef HAVE_HDF5
/**
* @brief Writes the current model of tracers to the file.
*
* @param h_grp The HDF5 group in which to write
* @param tracers The #tracers_function_data
*/
__attribute__((always_inline)) INLINE static void tracers_write_flavour(
hid_t h_grp) {
io_write_attribute_s(h_grp, "Tracers", "EAGLE");
}
#endif
/**
* @brief Specifies which particle fields to write to a dataset
*
* @param parts The particle array.
* @param xparts The extended data particle array.
* @param list The list of i/o properties to write.
*
* @return Returns the number of fields to write.
*/
__attribute__((always_inline)) INLINE static int tracers_write_particles(
const struct part* parts, const struct xpart* xparts, struct io_props* list,
const int with_cosmology) {
list[0] = io_make_output_field("Maximal Temperature", FLOAT, 1,
UNIT_CONV_TEMPERATURE, xparts,
tracers_data.maximum_temperature);
if (with_cosmology) {
list[1] = io_make_output_field(
"Maximal Temperature scale-factor", FLOAT, 1, UNIT_CONV_NO_UNITS,
xparts, tracers_data.maximum_temperature_scale_factor);
} else {
list[1] = io_make_output_field("MaxTemperature time", FLOAT, 1,
UNIT_CONV_NO_UNITS, xparts,
tracers_data.maximum_temperature_time);
}
return 2;
}
#endif /* SWIFT_TRACERS_EAGLE_IO_H */
/*******************************************************************************
* This file is part of SWIFT.
* Copyright (c) 2018 Matthieu Schaller (matthieu.schaller@durham.ac.uk)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#ifndef SWIFT_TRACERS_STRUCT_EAGLE_H
#define SWIFT_TRACERS_STRUCT_EAGLE_H
/**
* @brief Properties of the tracers stored in the extended particle data.
*/
struct tracers_xpart_data {
/*! Maximum temperature achieved by this particle */
float maximum_temperature;
/*! Anonymous union for the cosmological non-cosmological runs distinction */
union {
/*! Scale-factor at which the maximal temperature was reached */
float maximum_temperature_scale_factor;
/*! Time at which the maximal temperature was reached */
float maximum_temperature_time;
};
};
#endif /* SWIFT_TRACERS_STRUCT_EAGLE_H */
<
/*******************************************************************************
* This file is part of SWIFT.
* Copyright (c) 2018 Matthieu Schaller (matthieu.schaller@durham.ac.uk)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#ifndef SWIFT_TRACERS_NONE_H
#define SWIFT_TRACERS_NONE_H
/* Config parameters. */
#include "../config.h"
/* Local includes */
#include "cooling.h"
#include "part.h"
#include "tracers_struct.h"
/**
* @brief Update the particle tracers just after it has been initialised at the
* start of a step.
*
* Nothing to do here in the EAGLE model.
*
* @param us The internal system of units.
* @param phys_const The physical constants in internal units.
* @param cosmo The current cosmological model.
* @param hydro_properties the hydro_props struct
* @param cooling The #cooling_function_data used in the run.
* @param p Pointer to the particle data.
* @param xp Pointer to the extended particle data (containing the tracers
* struct).
*/
static INLINE void tracers_after_init(
const struct part *p, struct xpart *xp, const struct unit_system *us,
const struct phys_const *phys_const, const int with_cosmology,
const struct cosmology *cosmo, const struct hydro_props *hydro_props,
const struct cooling_function_data *cooling, const double time) {}
/**
* @brief Update the particle tracers just after it has been drifted.
*
* Nothing to do here in the EAGLE model.
*
* @param us The internal system of units.
* @param phys_const The physical constants in internal units.
* @param cosmo The current cosmological model.
* @param hydro_properties the hydro_props struct
* @param cooling The #cooling_function_data used in the run.
* @param p Pointer to the particle data.
* @param xp Pointer to the extended particle data (containing the tracers
* struct).
*/
static INLINE void tracers_after_drift(
const struct part *p, struct xpart *xp, const struct unit_system *us,
const struct phys_const *phys_const, const int with_cosmology,
const struct cosmology *cosmo, const struct hydro_props *hydro_props,
const struct cooling_function_data *cooling, const double time) {}
/**
* @brief Update the particle tracers just after its time-step has been
* computed.
*
* Nothing to do here in the EAGLE model.
*
* @param us The internal system of units.
* @param phys_const The physical constants in internal units.
* @param cosmo The current cosmological model.
* @param hydro_properties the hydro_props struct
* @param cooling The #cooling_function_data used in the run.
* @param p Pointer to the particle data.
* @param xp Pointer to the extended particle data (containing the tracers
* struct).
*/
static INLINE void tracers_after_timestep(
const struct part *p, struct xpart *xp, const struct unit_system *us,
const struct phys_const *phys_const, const int with_cosmology,
const struct cosmology *cosmo, const struct hydro_props *hydro_props,
const struct cooling_function_data *cooling, const double time) {}
/**
* @brief Update the particle tracers just after its time-step has been