Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sten Delos
Gadget4
Commits
29ba6ed5
Commit
29ba6ed5
authored
Nov 03, 2020
by
Volker Springel
Browse files
added utherm to entroy conversion in Subfind postprocessing with gas
parent
06d04a45
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/init.cc
View file @
29ba6ed5
...
...
@@ -405,6 +405,14 @@ void sim::init(int RestartSnapNum)
Sp
.
PS
=
(
subfind_data
*
)
Mem
.
mymalloc_movable
(
&
Sp
.
PS
,
"PS"
,
Sp
.
MaxPart
*
sizeof
(
subfind_data
));
memset
(
Sp
.
PS
,
0
,
Sp
.
MaxPart
*
sizeof
(
subfind_data
));
for
(
int
i
=
0
;
i
<
Sp
.
NumGas
;
i
++
)
{
if
(
ThisTask
==
0
&&
i
==
0
)
printf
(
"INIT: Converting u -> entropy All.cf_a3inv=%g
\n
"
,
All
.
cf_a3inv
);
Sp
.
SphP
[
i
].
Entropy
=
GAMMA_MINUS1
*
Sp
.
SphP
[
i
].
Entropy
/
pow
(
Sp
.
SphP
[
i
].
Density
*
All
.
cf_a3inv
,
GAMMA_MINUS1
);
}
/* First, we save the original location of the particles, in order to be able to revert to this layout later on */
for
(
int
i
=
0
;
i
<
Sp
.
NumPart
;
i
++
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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