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
SWIFT
SWIFTsim
Commits
c6f36a99
Commit
c6f36a99
authored
May 10, 2020
by
Matthieu Schaller
Browse files
Increase the limit for PP instead of M2L or M2P to a VEC_SIZE
parent
00472623
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/cell.c
View file @
c6f36a99
...
...
@@ -6393,8 +6393,8 @@ int cell_can_use_pair_mm(const struct cell *ci, const struct cell *cj,
const
double
dim
[
3
]
=
{
s
->
dim
[
0
],
s
->
dim
[
1
],
s
->
dim
[
2
]};
/* Check for trivial cases */
if
(
ci
->
grav
.
count
<
2
)
return
0
;
if
(
cj
->
grav
.
count
<
2
)
return
0
;
if
(
ci
->
grav
.
count
<
VEC_SIZE
)
return
0
;
if
(
cj
->
grav
.
count
<
VEC_SIZE
)
return
0
;
/* Recover the multipole information */
const
struct
gravity_tensors
*
const
multi_i
=
ci
->
grav
.
multipole
;
...
...
src/runner_doiact_grav.c
View file @
c6f36a99
...
...
@@ -1011,8 +1011,8 @@ void runner_dopair_grav_pp(struct runner *r, struct cell *ci, struct cell *cj,
gcount_j
);
#endif
const
int
allow_multipole_i
=
allow_mpole
&&
ci
->
grav
.
count
>
1
;
const
int
allow_multipole_j
=
allow_mpole
&&
cj
->
grav
.
count
>
1
;
const
int
allow_multipole_i
=
allow_mpole
&&
ci
->
grav
.
count
>
VEC_SIZE
;
const
int
allow_multipole_j
=
allow_mpole
&&
cj
->
grav
.
count
>
VEC_SIZE
;
/* Fill the caches */
gravity_cache_populate
(
e
->
max_active_bin
,
allow_multipole_j
,
periodic
,
dim
,
...
...
@@ -1960,7 +1960,7 @@ void runner_dopair_recursive_grav(struct runner *r, struct cell *ci,
/* OK, we actually need to compute this pair. Let's find the cheapest
* option... */
if
(
ci
->
grav
.
count
<
2
||
cj
->
grav
.
count
<
2
)
{
if
(
ci
->
grav
.
count
<
VEC_SIZE
||
cj
->
grav
.
count
<
VEC_SIZE
)
{
/* We have two cheap cells. Go P-P. */
runner_dopair_grav_pp_no_cache
(
r
,
ci
,
cj
,
/*symmetric=*/
1
);
...
...
Write
Preview
Supports
Markdown
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