Commit 957ce621 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Proper header-guards for the Gadget-2 and Default SPH files.

parent 66d6d525
......@@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#ifndef SWIFT_DEFAULT_HYDRO_H
#define SWIFT_DEFAULT_HYDRO_H
#include "adiabatic_index.h"
#include "approx_math.h"
......@@ -341,3 +343,5 @@ __attribute__((always_inline)) INLINE static void hydro_kick_extra(
*/
__attribute__((always_inline)) INLINE static void hydro_convert_quantities(
struct part *restrict p) {}
#endif /* SWIFT_DEFAULT_HYDRO_H */
......@@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#ifndef SWIFT_DEFAULT_HYDRO_DEBUG_H
#define SWIFT_DEFAULT_HYDRO_DEBUG_H
__attribute__((always_inline)) INLINE static void hydro_debug_particle(
const struct part* p, const struct xpart* xp) {
......@@ -29,3 +31,5 @@ __attribute__((always_inline)) INLINE static void hydro_debug_particle(
p->h, (int)p->density.wcount, p->mass, p->rho_dh, p->rho, p->ti_begin,
p->ti_end);
}
#endif /* SWIFT_DEFAULT_HYDRO_DEBUG_H */
......@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#ifndef SWIFT_RUNNER_IACT_H
#define SWIFT_RUNNER_IACT_H
#ifndef SWIFT_DEFAULT_HYDRO_IACT_H
#define SWIFT_DEFAULT_HYDRO_IACT_H
#include "adiabatic_index.h"
......@@ -932,4 +932,4 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_vec_force(
#endif
}
#endif /* SWIFT_RUNNER_IACT_H */
#endif /* SWIFT_DEFAULT_HYDRO_IACT_H */
......@@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#ifndef SWIFT_DEFAULT_HYDRO_IO_H
#define SWIFT_DEFAULT_HYDRO_IO_H
#include "io_properties.h"
#include "kernel_hydro.h"
......@@ -112,3 +114,5 @@ void writeSPHflavour(hid_t h_grpsph) {
* @return 1 if entropy is in 'internal energy', 0 otherwise.
*/
int writeEntropyFlag() { return 0; }
#endif /* SWIFT_DEFAULT_HYDRO_IO_H */
......@@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#ifndef SWIFT_DEFAULT_HYDRO_PART_H
#define SWIFT_DEFAULT_HYDRO_PART_H
/* Extra particle data not needed during the SPH loops over neighbours. */
struct xpart {
......@@ -117,3 +119,5 @@ struct part {
struct gpart* gpart;
} __attribute__((aligned(part_align)));
#endif /* SWIFT_DEFAULT_HYDRO_PART_H */
......@@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#ifndef SWIFT_GADGET2_HYDRO_H
#define SWIFT_GADGET2_HYDRO_H
#include "adiabatic_index.h"
#include "dimension.h"
......@@ -361,3 +363,5 @@ __attribute__((always_inline)) INLINE static void hydro_convert_quantities(
/* We read u in the entropy field. We now get S from u */
p->entropy = gas_entropy_from_internal_energy(p->rho, p->entropy);
}
#endif /* SWIFT_GADGET2_HYDRO_H */
......@@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#ifndef SWIFT_GADGET2_HYDRO_DEBUG_H
#define SWIFT_GADGET2_HYDRO_DEBUG_H
__attribute__((always_inline)) INLINE static void hydro_debug_particle(
const struct part* p, const struct xpart* xp) {
......@@ -34,3 +36,5 @@ __attribute__((always_inline)) INLINE static void hydro_debug_particle(
p->density.rot_v[1], p->density.rot_v[2], p->force.balsara,
p->force.v_sig, p->force.h_dt, p->ti_begin, p->ti_end);
}
#endif /* SWIFT_GADGET2_HYDRO_DEBUG_H */
......@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#ifndef SWIFT_RUNNER_IACT_LEGACY_H
#define SWIFT_RUNNER_IACT_LEGACY_H
#ifndef SWIFT_GADGET2_HYDRO_IACT_H
#define SWIFT_GADGET2_HYDRO_IACT_H
/**
* @brief SPH interaction functions following the Gadget-2 version of SPH.
......@@ -913,4 +913,4 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_vec_force(
#endif
}
#endif /* SWIFT_RUNNER_IACT_LEGACY_H */
#endif /* SWIFT_GADGET2_HYDRO_IACT_H */
......@@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#ifndef SWIFT_GADGET2_HYDRO_IO_H
#define SWIFT_GADGET2_HYDRO_IO_H
#include "adiabatic_index.h"
#include "hydro.h"
......@@ -121,3 +123,5 @@ void writeSPHflavour(hid_t h_grpsph) {
* @return 1 if entropy is in 'internal energy', 0 otherwise.
*/
int writeEntropyFlag() { return 0; }
#endif /* SWIFT_GADGET2_HYDRO_IO_H */
......@@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#ifndef SWIFT_GADGET2_HYDRO_PART_H
#define SWIFT_GADGET2_HYDRO_PART_H
/* Extra particle data not needed during the SPH loops over neighbours. */
struct xpart {
......@@ -109,3 +111,5 @@ struct part {
struct gpart* gpart;
} __attribute__((aligned(part_align)));
#endif /* SWIFT_GADGET2_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