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
bb5ea549
Commit
bb5ea549
authored
Sep 26, 2017
by
Matthieu Schaller
Browse files
Better threshold for maximal distance a particle can have moved from its cell when using MPI
parent
573af0fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/cache.h
View file @
bb5ea549
...
...
@@ -370,11 +370,11 @@ __attribute__((always_inline)) INLINE void cache_read_two_partial_cells_sorted(
#ifdef SWIFT_DEBUG_CHECKS
const
float
shift_threshold_x
=
2
.
*
ci
->
width
[
0
]
+
max
(
ci
->
dx_max_part
,
cj
->
dx_max_part
);
2
.
*
ci
->
width
[
0
]
+
2
.
*
max
(
ci
->
dx_max_part
,
cj
->
dx_max_part
);
const
float
shift_threshold_y
=
2
.
*
ci
->
width
[
1
]
+
max
(
ci
->
dx_max_part
,
cj
->
dx_max_part
);
2
.
*
ci
->
width
[
1
]
+
2
.
*
max
(
ci
->
dx_max_part
,
cj
->
dx_max_part
);
const
float
shift_threshold_z
=
2
.
*
ci
->
width
[
2
]
+
max
(
ci
->
dx_max_part
,
cj
->
dx_max_part
);
2
.
*
ci
->
width
[
2
]
+
2
.
*
max
(
ci
->
dx_max_part
,
cj
->
dx_max_part
);
/* Make sure that particle positions have been shifted correctly. */
for
(
int
i
=
0
;
i
<
ci_cache_count
;
i
++
)
{
...
...
src/runner_doiact.h
View file @
bb5ea549
...
...
@@ -811,11 +811,11 @@ void DOPAIR1(struct runner *r, struct cell *ci, struct cell *cj, const int sid,
/* Some constants used to checks that the parts are in the right frame */
const
float
shift_threshold_x
=
2
.
*
ci
->
width
[
0
]
+
max
(
ci
->
dx_max_part
,
cj
->
dx_max_part
);
2
.
*
ci
->
width
[
0
]
+
2
.
*
max
(
ci
->
dx_max_part
,
cj
->
dx_max_part
);
const
float
shift_threshold_y
=
2
.
*
ci
->
width
[
1
]
+
max
(
ci
->
dx_max_part
,
cj
->
dx_max_part
);
2
.
*
ci
->
width
[
1
]
+
2
.
*
max
(
ci
->
dx_max_part
,
cj
->
dx_max_part
);
const
float
shift_threshold_z
=
2
.
*
ci
->
width
[
2
]
+
max
(
ci
->
dx_max_part
,
cj
->
dx_max_part
);
2
.
*
ci
->
width
[
2
]
+
2
.
*
max
(
ci
->
dx_max_part
,
cj
->
dx_max_part
);
#endif
/* SWIFT_DEBUG_CHECKS */
...
...
@@ -1114,11 +1114,11 @@ void DOPAIR2(struct runner *r, struct cell *ci, struct cell *cj) {
/* Some constants used to checks that the parts are in the right frame */
const
float
shift_threshold_x
=
2
.
*
ci
->
width
[
0
]
+
max
(
ci
->
dx_max_part
,
cj
->
dx_max_part
);
2
.
*
ci
->
width
[
0
]
+
2
.
*
max
(
ci
->
dx_max_part
,
cj
->
dx_max_part
);
const
float
shift_threshold_y
=
2
.
*
ci
->
width
[
1
]
+
max
(
ci
->
dx_max_part
,
cj
->
dx_max_part
);
2
.
*
ci
->
width
[
1
]
+
2
.
*
max
(
ci
->
dx_max_part
,
cj
->
dx_max_part
);
const
float
shift_threshold_z
=
2
.
*
ci
->
width
[
2
]
+
max
(
ci
->
dx_max_part
,
cj
->
dx_max_part
);
2
.
*
ci
->
width
[
2
]
+
2
.
*
max
(
ci
->
dx_max_part
,
cj
->
dx_max_part
);
#endif
/* SWIFT_DEBUG_CHECKS */
...
...
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