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
957ce621
Commit
957ce621
authored
Aug 16, 2016
by
Matthieu Schaller
Browse files
Proper header-guards for the Gadget-2 and Default SPH files.
parent
66d6d525
Changes
10
Hide whitespace changes
Inline
Side-by-side
src/hydro/Default/hydro.h
View file @
957ce621
...
...
@@ -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 */
src/hydro/Default/hydro_debug.h
View file @
957ce621
...
...
@@ -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 */
src/hydro/Default/hydro_iact.h
View file @
957ce621
...
...
@@ -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 */
src/hydro/Default/hydro_io.h
View file @
957ce621
...
...
@@ -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 */
src/hydro/Default/hydro_part.h
View file @
957ce621
...
...
@@ -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 */
src/hydro/Gadget2/hydro.h
View file @
957ce621
...
...
@@ -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 */
src/hydro/Gadget2/hydro_debug.h
View file @
957ce621
...
...
@@ -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 */
src/hydro/Gadget2/hydro_iact.h
View file @
957ce621
...
...
@@ -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 */
src/hydro/Gadget2/hydro_io.h
View file @
957ce621
...
...
@@ -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 */
src/hydro/Gadget2/hydro_part.h
View file @
957ce621
...
...
@@ -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 */
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