Skip to content
Snippets Groups Projects

Add sink module

Merged Loic Hausammann requested to merge sink_modules into master
7 files
+ 382
1
Compare changes
  • Side-by-side
  • Inline
Files
7
+ 91
0
/*******************************************************************************
* This file is part of SWIFT.
* Coypright (c) 2020 Loic Hausammann (loic.hausammann@epfl.ch)
*
* 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_DEFAULT_SINK_H
#define SWIFT_DEFAULT_SINK_H
#include <float.h>
/* Local includes */
#include "dimension.h"
#include "kernel_hydro.h"
#include "minmax.h"
#include "sink_part.h"
/**
* @brief Computes the time-step of a given sink particle.
*
* @param sp Pointer to the sink-particle data.
*/
__attribute__((always_inline)) INLINE static float sink_compute_timestep(
const struct sink* const sp) {
return FLT_MAX;
}
/**
* @brief Initialises the sink-particles for the first time
*
* This function is called only once just after the ICs have been
* read in to do some conversions.
*
* @param sp The particle to act upon
* @param props The properties of the sink model.
*/
__attribute__((always_inline)) INLINE static void sink_first_init_sink(
struct sink* sp) {
sp->time_bin = 0;
}
/**
* @brief Prepares a sink-particle for its interactions
*
* @param sp The particle to act upon
*/
__attribute__((always_inline)) INLINE static void sink_init_sink(
struct sink* sp) {}
/**
* @brief Predict additional particle fields forward in time when drifting
*
* @param sp The particle
* @param dt_drift The drift time-step for positions.
*/
__attribute__((always_inline)) INLINE static void sink_predict_extra(
struct sink* restrict sp, float dt_drift) {}
/**
* @brief Sets the values to be predicted in the drifts to their values at a
* kick time
*
* @param sp The particle.
*/
__attribute__((always_inline)) INLINE static void sink_reset_predicted_values(
struct sink* restrict sp) {}
/**
* @brief Kick the additional variables
*
* @param sp The particle to act upon
* @param dt The time-step for this kick
*/
__attribute__((always_inline)) INLINE static void sink_kick_extra(
struct sink* sp, float dt) {}
#endif /* SWIFT_DEFAULT_SINK_H */
Loading