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
7021a704
Commit
7021a704
authored
May 21, 2018
by
Josh Borrow
Browse files
Added debugging checks and removed everything from the convert quantities (we use energy anyway!)
parent
f6f80792
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/hydro/PressureEnergy/hydro.h
View file @
7021a704
...
...
@@ -611,13 +611,7 @@ __attribute__((always_inline)) INLINE static void hydro_kick_extra(
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_convert_quantities
(
struct
part
*
restrict
p
,
struct
xpart
*
restrict
xp
,
const
struct
cosmology
*
cosmo
)
{
/* Compute the sound speed */
const
float
soundspeed
=
hydro_get_comoving_soundspeed
(
p
);
p
->
force
.
soundspeed
=
soundspeed
;
}
const
struct
cosmology
*
cosmo
)
{
}
/**
* @brief Initialises the particles for the first time
...
...
@@ -643,6 +637,29 @@ __attribute__((always_inline)) INLINE static void hydro_first_init_part(
hydro_reset_acceleration
(
p
);
hydro_init_part
(
p
,
NULL
);
#ifdef SWIFT_DEBUG_CHECKS
if
(
p
->
id
==
116589
)
{
printf
(
"Ending hydro_first_init_part
\n
"
);
printf
(
"P_bar=%.3e
\n
"
,
p
->
pressure_bar
);
}
if
(
p
->
u
<
-
0
.
0001
)
printf
(
"Particle %lld has negative u=%.3e "
"(hydro_first_init_part)
\n
"
,
p
->
id
,
p
->
u
);
if
(
p
->
pressure_bar
<
-
0
.
0001
)
printf
(
"Particle %lld has negative P_bar=%.3e "
"(hydro_first_init_part)
\n
"
,
p
->
id
,
p
->
pressure_bar
);
if
(
p
->
rho
<
-
0
.
0001
)
printf
(
"Particle %lld has negative rho=%.3e "
"(hydro_first_init_part)
\n
"
,
p
->
id
,
p
->
rho
);
if
(
p
->
mass
<
-
0
.
0001
)
printf
(
"Particle %lld has negative m=%.3e "
"(hydro_first_init_part)
\n
"
,
p
->
id
,
p
->
mass
);
#endif
}
/**
...
...
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