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
b80fb3c3
Commit
b80fb3c3
authored
Jul 10, 2017
by
Matthieu Schaller
Browse files
Fixed a mangled merge in the Minimal-SPH hydro scheme.
parent
c7307172
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/hydro/Minimal/hydro.h
View file @
b80fb3c3
...
...
@@ -249,27 +249,6 @@ __attribute__((always_inline)) INLINE static void hydro_part_has_no_neighbours(
p
->
density
.
wcount_dh
=
0
.
f
;
}
/**
* @brief Sets all particle fields to sensible values when the #part has 0 ngbs.
*
* @param p The particle to act upon
* @param xp The extended particle data to act upon
*/
__attribute__
((
always_inline
))
INLINE
static
void
hydro_part_has_no_neighbours
(
struct
part
*
restrict
p
,
struct
xpart
*
restrict
xp
)
{
/* Some smoothing length multiples. */
const
float
h
=
p
->
h
;
const
float
h_inv
=
1
.
0
f
/
h
;
/* 1/h */
const
float
h_inv_dim
=
pow_dimension
(
h_inv
);
/* 1/h^d */
/* Re-set problematic values */
p
->
rho
=
p
->
mass
*
kernel_root
*
h_inv_dim
;
p
->
density
.
wcount
=
kernel_root
*
kernel_norm
*
h_inv_dim
;
p
->
density
.
rho_dh
=
0
.
f
;
p
->
density
.
wcount_dh
=
0
.
f
;
}
/**
* @brief Prepare a particle for the force calculation.
*
...
...
tests/benchmarkInteractions.c
View file @
b80fb3c3
...
...
@@ -125,7 +125,7 @@ struct part *make_particles(size_t count, double *offset, double spacing,
*/
void
prepare_force
(
struct
part
*
parts
,
size_t
count
)
{
#if !defined(GIZMO_SPH) && !defined(SHADOWFAX_SPH)
#if !defined(GIZMO_SPH) && !defined(SHADOWFAX_SPH)
&& !defined(MINIMAL_SPH)
struct
part
*
p
;
for
(
size_t
i
=
0
;
i
<
count
;
++
i
)
{
p
=
&
parts
[
i
];
...
...
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