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
d0107f58
Commit
d0107f58
authored
May 03, 2016
by
John Regan
Browse files
Removed an extra kernel_igamma from the rho_dh calculation
parent
c3795f39
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/hydro/Gadget2/hydro.h
View file @
d0107f58
...
...
@@ -94,7 +94,7 @@ __attribute__((always_inline))
/* Final operation on the density (add self-contribution). */
p
->
rho
+=
p
->
mass
*
kernel_root
;
p
->
rho_dh
-=
3
.
0
f
*
p
->
mass
*
kernel_root
*
kernel_igamma
;
p
->
rho_dh
-=
3
.
0
f
*
p
->
mass
*
kernel_root
;
p
->
density
.
wcount
+=
kernel_root
;
/* Finish the calculation by inserting the missing h-factors */
...
...
src/hydro/Gadget2/hydro_iact.h
View file @
d0107f58
...
...
@@ -65,7 +65,7 @@ __attribute__((always_inline)) INLINE static void runner_iact_density(
/* Compute contribution to the density */
pi
->
rho
+=
mj
*
wi
;
pi
->
rho_dh
-=
mj
*
kernel_igamma
*
(
3
.
f
*
wi
+
ui
*
wi_dx
);
pi
->
rho_dh
-=
mj
*
(
3
.
f
*
wi
+
ui
*
wi_dx
);
/* Compute contribution to the number of neighbours */
pi
->
density
.
wcount
+=
wi
;
...
...
@@ -78,7 +78,7 @@ __attribute__((always_inline)) INLINE static void runner_iact_density(
/* Compute contribution to the density */
pj
->
rho
+=
mi
*
wj
;
pj
->
rho_dh
-=
mi
*
kernel_igamma
*
(
3
.
f
*
wj
+
uj
*
wj_dx
);
pj
->
rho_dh
-=
mi
*
(
3
.
f
*
wj
+
uj
*
wj_dx
);
/* Compute contribution to the number of neighbours */
pj
->
density
.
wcount
+=
wj
;
...
...
@@ -134,7 +134,7 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_density(
/* Compute contribution to the density */
pi
->
rho
+=
mj
*
wi
;
pi
->
rho_dh
-=
mj
*
kernel_igamma
*
(
3
.
f
*
wi
+
u
*
wi_dx
);
pi
->
rho_dh
-=
mj
*
(
3
.
f
*
wi
+
u
*
wi_dx
);
/* Compute contribution to the number of neighbours */
pi
->
density
.
wcount
+=
wi
;
...
...
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