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

Added empty interaction functions for the EAGLE chemistry model.

parent 286a53ff
Branches
Tags
1 merge request!507Smoothed metallicity
......@@ -37,7 +37,7 @@
#include "./chemistry/gear/chemistry_iact.h"
#elif defined(CHEMISTRY_EAGLE)
#include "./chemistry/EAGLE/chemistry.h"
/* #include "./chemistry/EAGLE/chemistry_iact.h" */
#include "./chemistry/EAGLE/chemistry_iact.h"
#else
#error "Invalid choice of chemistry function."
#endif
......
......@@ -50,6 +50,32 @@ chemistry_get_element_name(enum chemistry_element elem) {
return chemistry_element_names[elem];
}
/**
* @brief Prepares a particle for the smooth metal calculation.
*
* Zeroes all the relevant arrays in preparation for the sums taking place in
* the various smooth metallicity tasks
*
* @param p The particle to act upon
* @param cd #chemistry_data containing chemistry informations.
*/
__attribute__((always_inline)) INLINE static void chemistry_init_part(
struct part* restrict p, const struct chemistry_data* cd) {}
/**
* @brief Finishes the smooth metal calculation.
*
* Multiplies the smoothed metallicity and number of neighbours by the
* appropiate constants and add the self-contribution term.
*
* This function requires the #hydro_end_density to have been called.
*
* @param p The particle to act upon.
* @param cd #chemistry_data containing chemistry informations.
*/
__attribute__((always_inline)) INLINE static void chemistry_end_density(
struct part* restrict p, const struct chemistry_data* cd) {}
/**
* @brief Sets the chemistry properties of the (x-)particles to a valid start
* state.
......
/*******************************************************************************
* 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_EAGLE_CHEMISTRY_IACT_H
#define SWIFT_EAGLE_CHEMISTRY_IACT_H
/**
* @file EAGLE/chemistry_iact.h
* @brief Smooth metal interaction functions following the EAGLE model.
*/
#include "chemistry_struct.h"
/**
* @brief Do chemistry computation after the runner_iact_density (symmetric
* version)
*
* @param r2 Distance squared between particles
* @param dx Distance between particles
* @param hi Smoothing length of i
* @param hj Smoothing length of j
* @param pi #part i
* @param pj #part j
* @param chem_data Chemistry informations
*/
__attribute__((always_inline)) INLINE static void runner_iact_chemistry(
float r2, float *dx, float hi, float hj, struct part *pi, struct part *pj,
const struct chemistry_data *chem_data) {}
/**
* @brief Do chemistry computation after the runner_iact_density (non-symmetric
* version)
*
* @param r2 Distance squared between particles
* @param dx Distance between particles
* @param hi Smoothing length of i
* @param hj Smoothing length of j
* @param pi #part i
* @param pj #part j
* @param chem_data Chemistry informations
*/
__attribute__((always_inline)) INLINE static void runner_iact_nonsym_chemistry(
float r2, float *dx, float hi, float hj, struct part *pi,
const struct part *pj, const struct chemistry_data *chem_data) {}
#endif /* SWIFT_EAGLE_CHEMISTRY_IACT_H */
......@@ -97,8 +97,7 @@ __attribute__((always_inline)) INLINE static void chemistry_init_part(
* @brief Finishes the smooth metal calculation.
*
* Multiplies the smoothed metallicity and number of neighbours by the
* appropiate constants
* and add the self-contribution term.
* appropiate constants and add the self-contribution term.
*
* This method requires the #hydro_end_density to have been computed.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment