Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
28388f70
Commit
28388f70
authored
Aug 16, 2016
by
Matthieu Schaller
Browse files
Proper header-guards for the gravity files.
parent
957ce621
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/gravity/Default/gravity.h
View file @
28388f70
...
...
@@ -17,6 +17,8 @@
* 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
"potentials.h"
...
...
@@ -151,3 +153,5 @@ __attribute__((always_inline)) INLINE static void external_gravity(
*/
__attribute__
((
always_inline
))
INLINE
static
void
gravity_kick_extra
(
struct
gpart
*
gp
,
float
dt
,
float
half_dt
)
{}
#endif
/* SWIFT_DEFAULT_GRAVITY_H */
src/gravity/Default/gravity_debug.h
View file @
28388f70
...
...
@@ -16,6 +16,8 @@
* 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
(
const
struct
gpart
*
p
)
{
...
...
@@ -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
->
ti_end
);
}
#endif
/* SWIFT_DEFAULT_GRAVITY_DEBUG_H */
src/gravity/Default/gravity_iact.h
View file @
28388f70
...
...
@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#ifndef SWIFT_
RUNNER_IACT_GRAV
_H
#define SWIFT_
RUNNER_IACT_GRAV
_H
#ifndef SWIFT_
DEFAULT_GRAVITY_IACT
_H
#define SWIFT_
DEFAULT_GRAVITY_IACT
_H
/* Includes. */
#include
"const.h"
...
...
@@ -188,4 +188,4 @@ __attribute__((always_inline)) INLINE static void runner_iact_grav_pm(
#endif
}
#endif
/* SWIFT_
RUNNER_IACT_GRAV
_H */
#endif
/* SWIFT_
DEFAULT_GRAVITY_IACT
_H */
src/gravity/Default/gravity_io.h
View file @
28388f70
...
...
@@ -16,6 +16,8 @@
* 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"
...
...
@@ -68,3 +70,5 @@ void darkmatter_write_particles(struct gpart* gparts, struct io_props* list,
list
[
4
]
=
io_make_output_field
(
"Acceleration"
,
FLOAT
,
3
,
UNIT_CONV_ACCELERATION
,
gparts
,
a_grav
);
}
#endif
/* SWIFT_DEFAULT_GRAVITY_IO_H */
src/gravity/Default/gravity_part.h
View file @
28388f70
...
...
@@ -16,6 +16,9 @@
* 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. */
#include
<stdlib.h>
...
...
@@ -51,3 +54,5 @@ struct gpart {
long
long
id_or_neg_offset
;
}
__attribute__
((
aligned
(
gpart_align
)));
#endif
/* SWIFT_DEFAULT_GRAVITY_PART_H */
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment