Commit 38398a02 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Proper referencing and addition of header guards

parent 262f7b78
...@@ -16,6 +16,23 @@ ...@@ -16,6 +16,23 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
* *
******************************************************************************/ ******************************************************************************/
#ifndef SWIFT_MINIMAL_HYDRO_H
#define SWIFT_MINIMAL_HYDRO_H
/**
* @file Minimal/hydro.h
* @brief Minimal conservative implementation of SPH (Non-neighbour loop
* equations)
*
* The thermal variable is the internal energy (u). Simple constant
* viscosity term without switches is implemented. No thermal conduction
* term is implemented.
*
* This corresponds to equations (43), (44), (45), (101), (103) and (104) with
* \f$\beta=3\f$ and \f$\alpha_u=0\f$ of
* Price, D., Journal of Computational Physics, 2012, Volume 231, Issue 3,
* pp. 759-794.
*/
#include "adiabatic_index.h" #include "adiabatic_index.h"
#include "dimension.h" #include "dimension.h"
...@@ -337,3 +354,5 @@ __attribute__((always_inline)) INLINE static void hydro_kick_extra( ...@@ -337,3 +354,5 @@ __attribute__((always_inline)) INLINE static void hydro_kick_extra(
*/ */
__attribute__((always_inline)) INLINE static void hydro_convert_quantities( __attribute__((always_inline)) INLINE static void hydro_convert_quantities(
struct part *restrict p) {} struct part *restrict p) {}
#endif /* SWIFT_MINIMAL_HYDRO_H */
...@@ -16,6 +16,22 @@ ...@@ -16,6 +16,22 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
* *
******************************************************************************/ ******************************************************************************/
#ifndef SWIFT_MINIMAL_HYDRO_DEBUG_H
#define SWIFT_MINIMAL_HYDRO_DEBUG_H
/**
* @file Minimal/hydro_debug.h
* @brief Minimal conservative implementation of SPH (Debugging routines)
*
* The thermal variable is the internal energy (u). Simple constant
* viscosity term without switches is implemented. No thermal conduction
* term is implemented.
*
* This corresponds to equations (43), (44), (45), (101), (103) and (104) with
* \f$\beta=3\f$ and \f$\alpha_u=0\f$ of
* Price, D., Journal of Computational Physics, 2012, Volume 231, Issue 3,
* pp. 759-794.
*/
__attribute__((always_inline)) INLINE static void hydro_debug_particle( __attribute__((always_inline)) INLINE static void hydro_debug_particle(
const struct part* p, const struct xpart* xp) { const struct part* p, const struct xpart* xp) {
...@@ -31,3 +47,5 @@ __attribute__((always_inline)) INLINE static void hydro_debug_particle( ...@@ -31,3 +47,5 @@ __attribute__((always_inline)) INLINE static void hydro_debug_particle(
(int)p->density.wcount, p->mass, p->rho_dh, p->rho, p->ti_begin, (int)p->density.wcount, p->mass, p->rho_dh, p->rho, p->ti_begin,
p->ti_end); p->ti_end);
} }
#endif /* SWIFT_MINIMAL_HYDRO_DEBUG_H */
...@@ -16,20 +16,25 @@ ...@@ -16,20 +16,25 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
* *
******************************************************************************/ ******************************************************************************/
#ifndef SWIFT_RUNNER_IACT_MINIMAL_H #ifndef SWIFT_MINIMAL_HYDRO_IACT_H
#define SWIFT_RUNNER_IACT_MINIMAL_H #define SWIFT_MINIMAL_HYDRO_IACT_H
#include "adiabatic_index.h"
/** /**
* @file hydro_iact.h * @file Minimal/hydro_iact.h
* @brief Minimal conservative implementation of SPH * @brief Minimal conservative implementation of SPH (Neighbour loop equations)
* *
* The thermal variable is the internal energy (u). Simple constant * The thermal variable is the internal energy (u). Simple constant
* viscosity term without switche is implemented. No thermal conduction * viscosity term without switches is implemented. No thermal conduction
* terms is implemented. * term is implemented.
*
* This corresponds to equations (43), (44), (45), (101), (103) and (104) with
* \f$\beta=3\f$ and \f$\alpha_u=0\f$ of
* Price, D., Journal of Computational Physics, 2012, Volume 231, Issue 3,
* pp. 759-794.
*/ */
#include "adiabatic_index.h"
/** /**
* @brief Density loop * @brief Density loop
*/ */
...@@ -324,4 +329,4 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_vec_force( ...@@ -324,4 +329,4 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_vec_force(
"function does not exist yet!"); "function does not exist yet!");
} }
#endif /* SWIFT_RUNNER_IACT_MINIMAL_H */ #endif /* SWIFT_MINIMAL_HYDRO_IACT_H */
...@@ -16,6 +16,22 @@ ...@@ -16,6 +16,22 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
* *
******************************************************************************/ ******************************************************************************/
#ifndef SWIFT_MINIMAL_HYDRO_IO_H
#define SWIFT_MINIMAL_HYDRO_IO_H
/**
* @file Minimal/hydro_io.h
* @brief Minimal conservative implementation of SPH (i/o routines)
*
* The thermal variable is the internal energy (u). Simple constant
* viscosity term without switches is implemented. No thermal conduction
* term is implemented.
*
* This corresponds to equations (43), (44), (45), (101), (103) and (104) with
* \f$\beta=3\f$ and \f$\alpha_u=0\f$ of
* Price, D., Journal of Computational Physics, 2012, Volume 231, Issue 3,
* pp. 759-794.
*/
#include "adiabatic_index.h" #include "adiabatic_index.h"
#include "hydro.h" #include "hydro.h"
...@@ -122,3 +138,5 @@ void writeSPHflavour(hid_t h_grpsph) { ...@@ -122,3 +138,5 @@ void writeSPHflavour(hid_t h_grpsph) {
* @return 1 if entropy is in 'internal energy', 0 otherwise. * @return 1 if entropy is in 'internal energy', 0 otherwise.
*/ */
int writeEntropyFlag() { return 0; } int writeEntropyFlag() { return 0; }
#endif /* SWIFT_MINIMAL_HYDRO_IO_H */
...@@ -16,6 +16,22 @@ ...@@ -16,6 +16,22 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
* *
******************************************************************************/ ******************************************************************************/
#ifndef SWIFT_MINIMAL_HYDRO_PART_H
#define SWIFT_MINIMAL_HYDRO_PART_H
/**
* @file Minimal/hydro_part.h
* @brief Minimal conservative implementation of SPH (Particle definition)
*
* The thermal variable is the internal energy (u). Simple constant
* viscosity term without switches is implemented. No thermal conduction
* term is implemented.
*
* This corresponds to equations (43), (44), (45), (101), (103) and (104) with
* \f$\beta=3\f$ and \f$\alpha_u=0\f$ of
* Price, D., Journal of Computational Physics, 2012, Volume 231, Issue 3,
* pp. 759-794.
*/
/** /**
* @brief Particle fields not needed during the SPH loops over neighbours. * @brief Particle fields not needed during the SPH loops over neighbours.
...@@ -105,3 +121,5 @@ struct part { ...@@ -105,3 +121,5 @@ struct part {
struct gpart* gpart; /*!< Pointer to corresponding gravity part. */ struct gpart* gpart; /*!< Pointer to corresponding gravity part. */
} __attribute__((aligned(part_align))); } __attribute__((aligned(part_align)));
#endif /* SWIFT_MINIMAL_HYDRO_PART_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