Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Volker Springel
Gadget4
Commits
7b3992a5
Commit
7b3992a5
authored
Nov 05, 2020
by
Oliver Zier
Browse files
Merge branch 'master' of
https://gitlab.mpcdf.mpg.de/vrs/gadget4
parents
b260f126
068a5082
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/domain/domain.cc
View file @
7b3992a5
...
...
@@ -237,18 +237,8 @@ void domain<simparticles>::domain_find_total_cost(void)
if
(
Tp
->
P
[
i
].
getType
()
==
0
)
{
#ifdef SUBFIND
if
(
Mode
==
COLL_SUBFIND
)
{
if
(
Tp
->
PS
[
i
].
DomainFlag
)
HydroCostPerListedTimeBin
[
n
]
+=
1.0
;
}
else
#endif
{
if
(
bin
>=
Tp
->
P
[
i
].
getTimeBinHydro
())
HydroCostPerListedTimeBin
[
n
]
+=
1.0
;
}
if
(
bin
>=
Tp
->
P
[
i
].
getTimeBinHydro
())
HydroCostPerListedTimeBin
[
n
]
+=
1.0
;
}
}
}
...
...
src/fof/fof_nearest.cc
View file @
7b3992a5
...
...
@@ -157,6 +157,14 @@ class fofdata_comm : public generic_comm<fofdata_in, fofdata_out, T_tree, T_doma
fofnode
*
current
=
Tree
->
get_nodep
(
no
,
shmrank
);
if
(
current
->
level
==
0
)
{
/* we always open the root node (its full node length can't be stored in the integer type */
no
=
current
->
nextnode
;
/* no change in shmrank expected here */
shmrank
=
current
->
nextnode_shmrank
;
continue
;
}
int
nosaved
=
no
;
no
=
current
->
sibling
;
/* in case the node can be discarded */
...
...
src/main/init.cc
View file @
7b3992a5
...
...
@@ -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
++
)
{
...
...
src/subfind/subfind_history.cc
View file @
7b3992a5
...
...
@@ -289,8 +289,6 @@ void fof<partset>::subfind_hbt_single_group(domain<partset> *SubDomain, domain<p
/* sort the candidates by size */
mycxxsort
(
all_candidates
,
all_candidates
+
totcand
,
subfind_hbt_compare_subcand_len
);
hbt_subcand_t
maxlen_candidate
=
all_candidates
[
totcand
-
1
];
/* sort the candidates by summed previous length, as this is arguably a more robust decision of which one should be the largest
*/
mycxxsort
(
all_candidates
,
all_candidates
+
totcand
,
subfind_hbt_compare_subcand_summedprevlen
);
...
...
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