Commit d62733f6 authored by lhausamm's avatar lhausamm
Browse files

Update doc string for gear and add missing functions to chemistry/none

parent dc32a10e
......@@ -43,7 +43,6 @@
__attribute__((always_inline)) INLINE static const char*
chemistry_get_element_name(enum chemistry_element elem) {
/* Warning: in the I/O, expect string < 20 */
static const char* chemistry_element_names[chemistry_element_count] = {
"Oxygen", "Magnesium", "Sulfur", "Iron",
"Zinc", "Strontium", "Yttrium", "Barium",
......
......@@ -32,7 +32,15 @@
#include "chemistry_struct.h"
/**
* @brief Smooth metalicity
* @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,
......@@ -67,7 +75,15 @@ const struct chemistry_data *chem_data) {
}
/**
* @brief Non symmetric smooth metalicity
* @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,
......
......@@ -37,6 +37,18 @@
#include "physical_constants.h"
#include "units.h"
/**
* @brief Return a string containing the name of a given #chemistry_element.
*/
__attribute__((always_inline)) INLINE static const char*
chemistry_get_element_name(enum chemistry_element elem) {
static const char* chemistry_element_names[chemistry_element_count] = {
};
return chemistry_element_names[elem];
}
/**
* @brief Sets the chemistry properties of the (x-)particles to a valid start
* state.
......@@ -75,4 +87,27 @@ static INLINE void chemistry_print_backend(const struct chemistry_data* data) {
message("Chemistry function is 'No chemistry'.");
}
/**
* @brief Finishes the density calculation.
*
* @param p The particle to act upon
*/
__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.
*
* Nothing to do here.
*
* @param p Pointer to the particle data.
* @param xp Pointer to the extended particle data.
* @param data The global chemistry information.
*/
__attribute__((always_inline)) INLINE static void chemistry_first_init_part(
struct part* restrict p, struct xpart* restrict xp,
const struct chemistry_data* data) {}
#endif /* SWIFT_CHEMISTRY_NONE_H */
/*******************************************************************************
* This file is part of SWIFT.
* Copyright (c) 2012 Pedro Gonnet (pedro.gonnet@durham.ac.uk)
* 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_NONE_CHEMISTRY_IACT_H
#define SWIFT_NONE_CHEMISTRY_IACT_H
/**
* @file none/chemistry_iact.h
* @brief Density computation
*/
#include "cache.h"
#include "minmax.h"
#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_NONE_CHEMISTRY_IACT_H */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment