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
716001d8
Commit
716001d8
authored
Jun 04, 2016
by
Matthieu Schaller
Browse files
New formatting style
parent
09f3bcc2
Changes
52
Hide whitespace changes
Inline
Side-by-side
examples/main.c
View file @
716001d8
...
...
@@ -27,10 +27,10 @@
/* Some standard headers. */
#include
<fenv.h>
#include
<unistd.h>
#include
<stdio.h>
#include
<stdlib.h>
#include
<string.h>
#include
<unistd.h>
/* MPI headers. */
#ifdef WITH_MPI
...
...
@@ -125,8 +125,7 @@ int main(int argc, char *argv[]) {
/* Let's pin the main thread */
#if defined(HAVE_SETAFFINITY) && defined(HAVE_LIBNUMA) && defined(_GNU_SOURCE)
if
(((
ENGINE_POLICY
)
&
engine_policy_setaffinity
)
==
engine_policy_setaffinity
)
if
(((
ENGINE_POLICY
)
&
engine_policy_setaffinity
)
==
engine_policy_setaffinity
)
engine_pin
();
#endif
...
...
src/cell.c
View file @
716001d8
...
...
@@ -50,8 +50,8 @@
#include
"atomic.h"
#include
"error.h"
#include
"gravity.h"
#include
"hydro_properties.h"
#include
"hydro.h"
#include
"hydro_properties.h"
#include
"space.h"
#include
"timers.h"
...
...
src/common_io.h
View file @
716001d8
...
...
@@ -52,10 +52,7 @@ enum DATA_TYPE {
*start a run or optional.
*
*/
enum
DATA_IMPORTANCE
{
COMPULSORY
=
1
,
OPTIONAL
=
0
};
enum
DATA_IMPORTANCE
{
COMPULSORY
=
1
,
OPTIONAL
=
0
};
/**
* @brief The different particle types present in a GADGET IC file
...
...
src/cycle.h
View file @
716001d8
...
...
@@ -334,7 +334,7 @@ typedef unsigned __int64 ticks;
extern
"C"
#endif
ticks
__getReg
(
int
whichReg
);
__getReg
(
int
whichReg
);
#pragma intrinsic(__getReg)
static
__inline
ticks
getticks
(
void
)
{
...
...
@@ -481,9 +481,9 @@ INLINE_ELAPSED(inline)
/* MIPS ZBus */
#if HAVE_MIPS_ZBUS_TIMER
#if defined(__mips__) && !defined(HAVE_TICK_COUNTER)
#include
<fcntl.h>
#include
<sys/mman.h>
#include
<unistd.h>
#include
<fcntl.h>
typedef
uint64_t
ticks
;
...
...
src/debug.c
View file @
716001d8
...
...
@@ -24,8 +24,8 @@
#include
"config.h"
#include
"const.h"
#include
"part.h"
#include
"debug.h"
#include
"part.h"
/* Import the right hydro definition */
#if defined(MINIMAL_SPH)
...
...
src/drift.h
View file @
716001d8
...
...
@@ -25,6 +25,8 @@
/* Local headers. */
#include
"const.h"
#include
"debug.h"
#include
"hydro.h"
#include
"part.h"
/**
* @brief Perform the 'drift' operation on a #gpart
...
...
@@ -58,9 +60,9 @@ __attribute__((always_inline)) INLINE static void drift_gpart(
* @param ti_old Integer start of time-step
* @param ti_current Integer end of time-step
*/
__attribute__
((
always_inline
))
INLINE
static
void
drift_part
(
struct
part
*
p
,
struct
xpart
*
xp
,
float
dt
,
double
timeBase
,
int
ti_old
,
int
ti_current
)
{
__attribute__
((
always_inline
))
INLINE
static
void
drift_part
(
struct
part
*
p
,
struct
xpart
*
xp
,
float
dt
,
double
timeBase
,
int
ti_old
,
int
ti_current
)
{
/* Useful quantity */
const
float
h_inv
=
1
.
0
f
/
p
->
h
;
...
...
src/engine.c
View file @
716001d8
...
...
@@ -29,11 +29,11 @@
#include
<float.h>
#include
<limits.h>
#include
<sched.h>
#include
<stdbool.h>
#include
<stdio.h>
#include
<stdlib.h>
#include
<string.h>
#include
<unistd.h>
#include
<stdbool.h>
/* MPI headers. */
#ifdef WITH_MPI
...
...
@@ -56,19 +56,27 @@
#include
"error.h"
#include
"hydro.h"
#include
"minmax.h"
#include
"parallel_io.h"
#include
"part.h"
#include
"partition.h"
#include
"parallel_io.h"
#include
"serial_io.h"
#include
"single_io.h"
#include
"timers.h"
#include
"tools.h"
const
char
*
engine_policy_names
[
13
]
=
{
"none"
,
"rand"
,
"steal"
,
"keep"
,
"block"
,
"fix_dt"
,
"cpu_tight"
,
"mpi"
,
"numa_affinity"
,
"hydro"
,
"self_gravity"
,
"external_gravity"
,
"cosmology_integration"
};
const
char
*
engine_policy_names
[
13
]
=
{
"none"
,
"rand"
,
"steal"
,
"keep"
,
"block"
,
"fix_dt"
,
"cpu_tight"
,
"mpi"
,
"numa_affinity"
,
"hydro"
,
"self_gravity"
,
"external_gravity"
,
"cosmology_integration"
};
/** The rank of the engine as a global variable (for messages). */
int
engine_rank
;
...
...
@@ -2257,7 +2265,7 @@ void engine_step(struct engine *e) {
double
snapshot_drift_time
=
0
.;
struct
space
*
s
=
e
->
s
;
TIMER_TIC2
;
struct
clocks_time
time1
,
time2
;
...
...
src/engine.h
View file @
716001d8
...
...
@@ -39,15 +39,15 @@
/* Includes. */
#include
"hydro_properties.h"
#include
"lock.h"
#include
"parser.h"
#include
"partition.h"
#include
"physical_constants.h"
#include
"potentials.h"
#include
"proxy.h"
#include
"runner.h"
#include
"scheduler.h"
#include
"space.h"
#include
"task.h"
#include
"parser.h"
#include
"partition.h"
#include
"physical_constants.h"
#include
"potentials.h"
#include
"units.h"
/* Some constants. */
...
...
src/gravity/Default/gravity.h
View file @
716001d8
...
...
@@ -31,11 +31,10 @@
* @param phys_const The physical constants in internal units.
* @param gp Pointer to the g-particle data.
*/
__attribute__
((
always_inline
))
INLINE
static
float
gravity_compute_timestep_external
(
const
struct
external_potential
*
potential
,
const
struct
phys_const
*
const
phys_const
,
const
struct
gpart
*
const
gp
)
{
__attribute__
((
always_inline
))
INLINE
static
float
gravity_compute_timestep_external
(
const
struct
external_potential
*
potential
,
const
struct
phys_const
*
const
phys_const
,
const
struct
gpart
*
const
gp
)
{
float
dt
=
FLT_MAX
;
...
...
@@ -53,10 +52,9 @@ __attribute__((always_inline))
* @param phys_const The physical constants in internal units.
* @param gp Pointer to the g-particle data.
*/
__attribute__
((
always_inline
))
INLINE
static
float
gravity_compute_timestep_self
(
const
struct
phys_const
*
const
phys_const
,
const
struct
gpart
*
const
gp
)
{
__attribute__
((
always_inline
))
INLINE
static
float
gravity_compute_timestep_self
(
const
struct
phys_const
*
const
phys_const
,
const
struct
gpart
*
const
gp
)
{
const
float
ac2
=
gp
->
a_grav
[
0
]
*
gp
->
a_grav
[
0
]
+
gp
->
a_grav
[
1
]
*
gp
->
a_grav
[
1
]
+
...
...
@@ -77,8 +75,8 @@ __attribute__((always_inline))
*
* @param gp The particle to act upon
*/
__attribute__
((
always_inline
))
INLINE
static
void
gravity_first_init_gpart
(
struct
gpart
*
gp
)
{}
__attribute__
((
always_inline
))
INLINE
static
void
gravity_first_init_gpart
(
struct
gpart
*
gp
)
{}
/**
* @brief Prepares a g-particle for the gravity calculation
...
...
@@ -88,8 +86,8 @@ __attribute__((always_inline))
*
* @param gp The particle to act upon
*/
__attribute__
((
always_inline
))
INLINE
static
void
gravity_init_part
(
struct
gpart
*
gp
)
{
__attribute__
((
always_inline
))
INLINE
static
void
gravity_init_part
(
struct
gpart
*
gp
)
{
/* Zero the acceleration */
gp
->
a_grav
[
0
]
=
0
.
f
;
...
...
@@ -107,8 +105,8 @@ __attribute__((always_inline))
* @param gp The particle to act upon
* @param const_G Newton's constant
*/
__attribute__
((
always_inline
))
INLINE
static
void
gravity_end_force
(
struct
gpart
*
gp
,
double
const_G
)
{
__attribute__
((
always_inline
))
INLINE
static
void
gravity_end_force
(
struct
gpart
*
gp
,
double
const_G
)
{
/* Let's get physical... */
gp
->
a_grav
[
0
]
*=
const_G
;
...
...
src/gravity/Default/gravity_debug.h
View file @
716001d8
...
...
@@ -17,8 +17,8 @@
*
******************************************************************************/
__attribute__
((
always_inline
))
INLINE
static
void
gravity_debug_particle
(
struct
gpart
*
p
)
{
__attribute__
((
always_inline
))
INLINE
static
void
gravity_debug_particle
(
struct
gpart
*
p
)
{
printf
(
"x=[%.3e,%.3e,%.3e], "
"v_full=[%.3e,%.3e,%.3e]
\n
a=[%.3e,%.3e,%.3e],
\n
"
...
...
src/gravity/Default/gravity_part.h
View file @
716001d8
...
...
@@ -39,7 +39,7 @@ struct gpart {
/* Softening length */
float
epsilon
;
/* Particle time of beginning of time-step. */
int
ti_begin
;
...
...
src/hydro.h
View file @
716001d8
...
...
@@ -19,20 +19,23 @@
#ifndef SWIFT_HYDRO_H
#define SWIFT_HYDRO_H
#include
"./const.h"
#include
"const.h"
#include
"hydro_properties.h"
#include
"kernel_hydro.h"
#include
"part.h"
/* Import the right functions */
#if defined(MINIMAL_SPH)
#include
"./hydro/Minimal/hydro_iact.h"
#include
"./hydro/Minimal/hydro.h"
#include
"./hydro/Minimal/hydro_iact.h"
#define SPH_IMPLEMENTATION "Minimal version of SPH (e.g. Price 2010)"
#elif defined(GADGET2_SPH)
#include
"./hydro/Gadget2/hydro_iact.h"
#include
"./hydro/Gadget2/hydro.h"
#include
"./hydro/Gadget2/hydro_iact.h"
#define SPH_IMPLEMENTATION "Gadget-2 version of SPH (Springel 2005)"
#elif defined(DEFAULT_SPH)
#include
"./hydro/Default/hydro_iact.h"
#include
"./hydro/Default/hydro.h"
#include
"./hydro/Default/hydro_iact.h"
#define SPH_IMPLEMENTATION "Default version of SPH"
#else
#error "Invalid choice of SPH variant"
...
...
src/hydro/Default/hydro.h
View file @
716001d8
...
...
@@ -53,9 +53,8 @@ __attribute__((always_inline)) INLINE static float hydro_compute_timestep(
* @param p The particle to act upon
* @param xp The extended particle data to act upon
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_first_init_part
(
struct
part
*
p
,
struct
xpart
*
xp
)
{
}
__attribute__
((
always_inline
))
INLINE
static
void
hydro_first_init_part
(
struct
part
*
p
,
struct
xpart
*
xp
)
{}
/**
* @brief Prepares a particle for the density calculation.
...
...
@@ -65,8 +64,8 @@ __attribute__((always_inline))
*
* @param p The particle to act upon
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_init_part
(
struct
part
*
p
)
{
__attribute__
((
always_inline
))
INLINE
static
void
hydro_init_part
(
struct
part
*
p
)
{
p
->
density
.
wcount
=
0
.
f
;
p
->
density
.
wcount_dh
=
0
.
f
;
p
->
rho
=
0
.
f
;
...
...
@@ -86,8 +85,8 @@ __attribute__((always_inline))
* @param p The particle to act upon
* @param time The current time
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_end_density
(
struct
part
*
p
,
float
time
)
{
__attribute__
((
always_inline
))
INLINE
static
void
hydro_end_density
(
struct
part
*
p
,
float
time
)
{
/* Some smoothing length multiples. */
const
float
h
=
p
->
h
;
...
...
@@ -171,8 +170,8 @@ __attribute__((always_inline)) INLINE static void hydro_prepare_force(
*
* @param p The particle to act upon
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_reset_acceleration
(
struct
part
*
p
)
{
__attribute__
((
always_inline
))
INLINE
static
void
hydro_reset_acceleration
(
struct
part
*
p
)
{
/* Reset the acceleration. */
p
->
a_hydro
[
0
]
=
0
.
0
f
;
...
...
@@ -218,8 +217,8 @@ __attribute__((always_inline)) INLINE static void hydro_predict_extra(
*
* @param p The particle to act upon
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_end_force
(
struct
part
*
p
)
{}
__attribute__
((
always_inline
))
INLINE
static
void
hydro_end_force
(
struct
part
*
p
)
{}
/**
* @brief Kick the additional variables
...
...
@@ -239,8 +238,8 @@ __attribute__((always_inline)) INLINE static void hydro_kick_extra(
*
* @param p The particle to act upon
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_convert_quantities
(
struct
part
*
p
)
{}
__attribute__
((
always_inline
))
INLINE
static
void
hydro_convert_quantities
(
struct
part
*
p
)
{}
/**
* @brief Returns the internal energy of a particle
...
...
src/hydro/Default/hydro_debug.h
View file @
716001d8
...
...
@@ -17,8 +17,8 @@
*
******************************************************************************/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_debug_particle
(
struct
part
*
p
,
struct
xpart
*
xp
)
{
__attribute__
((
always_inline
))
INLINE
static
void
hydro_debug_particle
(
struct
part
*
p
,
struct
xpart
*
xp
)
{
printf
(
"x=[%.3e,%.3e,%.3e], "
"v=[%.3e,%.3e,%.3e],v_full=[%.3e,%.3e,%.3e]
\n
a=[%.3e,%.3e,%.3e],
\n
"
...
...
src/hydro/Default/hydro_iact.h
View file @
716001d8
...
...
@@ -268,11 +268,9 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_density(
* @brief Density loop (non-symmetric vectorized version)
*/
__attribute__
((
always_inline
))
INLINE
static
void
runner_iact_nonsym_vec_density
(
float
*
R2
,
float
*
Dx
,
float
*
Hi
,
float
*
Hj
,
struct
part
**
pi
,
struct
part
**
pj
)
{
__attribute__
((
always_inline
))
INLINE
static
void
runner_iact_nonsym_vec_density
(
float
*
R2
,
float
*
Dx
,
float
*
Hi
,
float
*
Hj
,
struct
part
**
pi
,
struct
part
**
pj
)
{
#ifdef VECTORIZE
...
...
src/hydro/Gadget2/hydro.h
View file @
716001d8
...
...
@@ -46,9 +46,8 @@ __attribute__((always_inline)) INLINE static float hydro_compute_timestep(
* @param p The particle to act upon
* @param xp The extended particle data to act upon
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_first_init_part
(
struct
part
*
p
,
struct
xpart
*
xp
)
{
}
__attribute__
((
always_inline
))
INLINE
static
void
hydro_first_init_part
(
struct
part
*
p
,
struct
xpart
*
xp
)
{}
/**
* @brief Prepares a particle for the density calculation.
...
...
@@ -58,8 +57,8 @@ __attribute__((always_inline))
*
* @param p The particle to act upon
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_init_part
(
struct
part
*
p
)
{
__attribute__
((
always_inline
))
INLINE
static
void
hydro_init_part
(
struct
part
*
p
)
{
p
->
density
.
wcount
=
0
.
f
;
p
->
density
.
wcount_dh
=
0
.
f
;
p
->
rho
=
0
.
f
;
...
...
@@ -79,8 +78,8 @@ __attribute__((always_inline))
* @param p The particle to act upon
* @param ti_current The current time (on the integer timeline)
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_end_density
(
struct
part
*
p
,
int
ti_current
)
{
__attribute__
((
always_inline
))
INLINE
static
void
hydro_end_density
(
struct
part
*
p
,
int
ti_current
)
{
/* Some smoothing length multiples. */
const
float
h
=
p
->
h
;
...
...
@@ -148,8 +147,8 @@ __attribute__((always_inline)) INLINE static void hydro_prepare_force(
*
* @param p The particle to act upon
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_reset_acceleration
(
struct
part
*
p
)
{
__attribute__
((
always_inline
))
INLINE
static
void
hydro_reset_acceleration
(
struct
part
*
p
)
{
/* Reset the acceleration. */
p
->
a_hydro
[
0
]
=
0
.
0
f
;
...
...
@@ -193,8 +192,8 @@ __attribute__((always_inline)) INLINE static void hydro_predict_extra(
*
* @param p The particle to act upon
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_end_force
(
struct
part
*
p
)
{
__attribute__
((
always_inline
))
INLINE
static
void
hydro_end_force
(
struct
part
*
p
)
{
p
->
entropy_dt
*=
(
const_hydro_gamma
-
1
.
f
)
*
powf
(
p
->
rho
,
-
(
const_hydro_gamma
-
1
.
f
));
...
...
@@ -230,8 +229,8 @@ __attribute__((always_inline)) INLINE static void hydro_kick_extra(
*
* @param p The particle to act upon
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_convert_quantities
(
struct
part
*
p
)
{
__attribute__
((
always_inline
))
INLINE
static
void
hydro_convert_quantities
(
struct
part
*
p
)
{
p
->
entropy
=
(
const_hydro_gamma
-
1
.
f
)
*
p
->
entropy
*
powf
(
p
->
rho
,
-
(
const_hydro_gamma
-
1
.
f
));
...
...
src/hydro/Gadget2/hydro_debug.h
View file @
716001d8
...
...
@@ -17,8 +17,8 @@
*
******************************************************************************/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_debug_particle
(
struct
part
*
p
,
struct
xpart
*
xp
)
{
__attribute__
((
always_inline
))
INLINE
static
void
hydro_debug_particle
(
struct
part
*
p
,
struct
xpart
*
xp
)
{
printf
(
"x=[%.3e,%.3e,%.3e], "
"v=[%.3e,%.3e,%.3e],v_full=[%.3e,%.3e,%.3e]
\n
a=[%.3e,%.3e,%.3e],
\n
"
...
...
src/hydro/Gadget2/hydro_io.h
View file @
716001d8
...
...
@@ -112,5 +112,4 @@ void writeSPHflavour(hid_t h_grpsph) {
"Legacy Gadget-2 as in Springel (2005)"
);
writeAttribute_f
(
h_grpsph
,
"Viscosity alpha"
,
const_viscosity_alpha
);
writeAttribute_f
(
h_grpsph
,
"Viscosity beta"
,
3
.
f
);
}
src/hydro/Gizmo/hydro.h
View file @
716001d8
...
...
@@ -39,17 +39,16 @@ __attribute__((always_inline)) INLINE static float hydro_compute_timestep(
* @param p The particle to act upon
* @param xp The extended particle data to act upon
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_first_init_part
(
struct
part
*
p
,
struct
xpart
*
xp
)
{
}
__attribute__
((
always_inline
))
INLINE
static
void
hydro_first_init_part
(
struct
part
*
p
,
struct
xpart
*
xp
)
{}
/**
* @brief Prepares a particle for the volume calculation.
*
* @param p The particle to act upon
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_init_part
(
struct
part
*
p
)
{
__attribute__
((
always_inline
))
INLINE
static
void
hydro_init_part
(
struct
part
*
p
)
{
#ifdef SPH_GRADIENTS
/* use the old volumes to estimate new primitive variables to be used for the
...
...
@@ -127,8 +126,8 @@ __attribute__((always_inline))
*
* @param p The particle to act upon
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_end_volume
(
struct
part
*
p
)
{
__attribute__
((
always_inline
))
INLINE
static
void
hydro_end_volume
(
struct
part
*
p
)
{
/* Some smoothing length multiples. */
const
float
h
=
p
->
h
;
...
...
@@ -387,8 +386,8 @@ __attribute__((always_inline)) INLINE static void hydro_prepare_gradient(
*
* @param p The particle to act upon
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_end_gradient
(
struct
part
*
p
)
{
__attribute__
((
always_inline
))
INLINE
static
void
hydro_end_gradient
(
struct
part
*
p
)
{
#ifndef SPH_GRADIENTS
float
h
,
ih
,
ih2
,
ih3
;
...
...
@@ -531,8 +530,8 @@ __attribute__((always_inline))
* @param p The particle to act upon
* @param xp The extended particle data to act upon
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_prepare_fluxes
(
struct
part
*
p
,
struct
xpart
*
xp
)
{
__attribute__
((
always_inline
))
INLINE
static
void
hydro_prepare_fluxes
(
struct
part
*
p
,
struct
xpart
*
xp
)
{
/* initialize variables used for timestep calculation */
p
->
timestepvars
.
vmax
=
0
.
0
f
;
...
...
@@ -546,8 +545,8 @@ __attribute__((always_inline))
*
* @param p The particle to act upon
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_reset_acceleration
(
struct
part
*
p
)
{
__attribute__
((
always_inline
))
INLINE
static
void
hydro_reset_acceleration
(
struct
part
*
p
)
{
/* figure out what to put here */
}
...
...
@@ -559,8 +558,8 @@ __attribute__((always_inline))
*
* @param p The particle to act upon
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_end_fluxes
(
struct
part
*
p
)
{
__attribute__
((
always_inline
))
INLINE
static
void
hydro_end_fluxes
(
struct
part
*
p
)
{
/* do nothing */
}
...
...
@@ -572,8 +571,8 @@ __attribute__((always_inline))
*
* @param p The particle to act upon
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_convert_quantities
(
struct
part
*
p
)
{
__attribute__
((
always_inline
))
INLINE
static
void
hydro_convert_quantities
(
struct
part
*
p
)
{
float
volume
;
GFLOAT
m
;
...
...
@@ -605,17 +604,17 @@ __attribute__((always_inline))
}
// MATTHIEU
__attribute__
((
always_inline
))
INLINE
static
void
hydro_end_density
(
struct
part
*
p
,
float
time
)
{}
__attribute__
((
always_inline
))
INLINE
static
void
hydro_end_density
(
struct
part
*
p
,
float
time
)
{}
__attribute__
((
always_inline
))
INLINE
static
void
hydro_prepare_force
(
struct
part
*
p
,
struct
xpart
*
xp
,
int
ti_current
,
double
timeBase
)
{}
__attribute__
((
always_inline
))
INLINE
static
void
hydro_predict_extra
(
struct
part
*
p
,
struct
xpart
*
xp
,
int
t0
,
int
t1
,
double
timeBase
)
{}
__attribute__
((
always_inline
))
INLINE
static
void
hydro_end_force
(
struct
part
*
p
)
{}
__attribute__
((
always_inline
))
INLINE
static
void
hydro_end_force
(
struct
part
*
p
)
{}
__attribute__
((
always_inline
))
INLINE
static
void
hydro_kick_extra
(
struct
part
*
p
,
struct
xpart
*
xp
,
float
dt
,
float
half_dt
)
{}
__attribute__
((
always_inline
))
INLINE
static
float
hydro_get_internal_energy
(
struct
part
*
p
)
{
__attribute__
((
always_inline
))
INLINE
static
float
hydro_get_internal_energy
(
struct
part
*
p
)
{
return
0
.
f
;
}
src/hydro/Gizmo/hydro_debug.h
View file @
716001d8
...
...
@@ -17,8 +17,8 @@
*
******************************************************************************/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_debug_particle
(
struct
part
*
p
,
struct
xpart
*
xp
)
{
__attribute__
((
always_inline
))
INLINE
static
void
hydro_debug_particle
(
struct
part
*
p
,
struct
xpart
*
xp
)
{
printf
(
"x=[%.16e,%.16e,%.16e], "
"v=[%.3e,%.3e,%.3e], a=[%.3e,%.3e,%.3e], volume=%.3e
\n
"
,
...
...
Prev
1
2
3
Next
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