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

Proper header-guards for the gravity files.

parent 957ce621
No related branches found
No related tags found
No related merge requests found
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
* 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_DEFAULT_GRAVITY_H
#define SWIFT_DEFAULT_GRAVITY_H
#include <float.h> #include <float.h>
#include "potentials.h" #include "potentials.h"
...@@ -151,3 +153,5 @@ __attribute__((always_inline)) INLINE static void external_gravity( ...@@ -151,3 +153,5 @@ __attribute__((always_inline)) INLINE static void external_gravity(
*/ */
__attribute__((always_inline)) INLINE static void gravity_kick_extra( __attribute__((always_inline)) INLINE static void gravity_kick_extra(
struct gpart* gp, float dt, float half_dt) {} struct gpart* gp, float dt, float half_dt) {}
#endif /* SWIFT_DEFAULT_GRAVITY_H */
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
* 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_DEFAULT_GRAVITY_DEBUG_H
#define SWIFT_DEFAULT_GRAVITY_DEBUG_H
__attribute__((always_inline)) INLINE static void gravity_debug_particle( __attribute__((always_inline)) INLINE static void gravity_debug_particle(
const struct gpart* p) { const struct gpart* p) {
...@@ -27,3 +29,5 @@ __attribute__((always_inline)) INLINE static void gravity_debug_particle( ...@@ -27,3 +29,5 @@ __attribute__((always_inline)) INLINE static void gravity_debug_particle(
p->a_grav[0], p->a_grav[1], p->a_grav[2], p->mass, p->ti_begin, p->a_grav[0], p->a_grav[1], p->a_grav[2], p->mass, p->ti_begin,
p->ti_end); p->ti_end);
} }
#endif /* SWIFT_DEFAULT_GRAVITY_DEBUG_H */
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
* 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_GRAV_H #ifndef SWIFT_DEFAULT_GRAVITY_IACT_H
#define SWIFT_RUNNER_IACT_GRAV_H #define SWIFT_DEFAULT_GRAVITY_IACT_H
/* Includes. */ /* Includes. */
#include "const.h" #include "const.h"
...@@ -188,4 +188,4 @@ __attribute__((always_inline)) INLINE static void runner_iact_grav_pm( ...@@ -188,4 +188,4 @@ __attribute__((always_inline)) INLINE static void runner_iact_grav_pm(
#endif #endif
} }
#endif /* SWIFT_RUNNER_IACT_GRAV_H */ #endif /* SWIFT_DEFAULT_GRAVITY_IACT_H */
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
* 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_DEFAULT_GRAVITY_IO_H
#define SWIFT_DEFAULT_GRAVITY_IO_H
#include "io_properties.h" #include "io_properties.h"
...@@ -68,3 +70,5 @@ void darkmatter_write_particles(struct gpart* gparts, struct io_props* list, ...@@ -68,3 +70,5 @@ void darkmatter_write_particles(struct gpart* gparts, struct io_props* list,
list[4] = io_make_output_field("Acceleration", FLOAT, 3, list[4] = io_make_output_field("Acceleration", FLOAT, 3,
UNIT_CONV_ACCELERATION, gparts, a_grav); UNIT_CONV_ACCELERATION, gparts, a_grav);
} }
#endif /* SWIFT_DEFAULT_GRAVITY_IO_H */
...@@ -16,6 +16,9 @@ ...@@ -16,6 +16,9 @@
* 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_DEFAULT_GRAVITY_PART_H
#define SWIFT_DEFAULT_GRAVITY_PART_H
/* Some standard headers. */ /* Some standard headers. */
#include <stdlib.h> #include <stdlib.h>
...@@ -51,3 +54,5 @@ struct gpart { ...@@ -51,3 +54,5 @@ struct gpart {
long long id_or_neg_offset; long long id_or_neg_offset;
} __attribute__((aligned(gpart_align))); } __attribute__((aligned(gpart_align)));
#endif /* SWIFT_DEFAULT_GRAVITY_PART_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment