Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
03e709c1
Commit
03e709c1
authored
5 years ago
by
Loic Hausammann
Browse files
Options
Downloads
Patches
Plain Diff
Stars: improve skip criterion
parent
070f08a8
No related branches found
No related tags found
1 merge request
!945
Fix stars interaction
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/runner_doiact_functions_stars.h
+4
-4
4 additions, 4 deletions
src/runner_doiact_functions_stars.h
with
4 additions
and
4 deletions
src/runner_doiact_functions_stars.h
+
4
−
4
View file @
03e709c1
...
@@ -299,7 +299,7 @@ void DO_SYM_PAIR1_STARS(struct runner *r, struct cell *ci, struct cell *cj,
...
@@ -299,7 +299,7 @@ void DO_SYM_PAIR1_STARS(struct runner *r, struct cell *ci, struct cell *cj,
#endif
#endif
const
double
dj_min
=
sort_j
[
0
].
d
;
const
double
dj_min
=
sort_j
[
0
].
d
;
const
float
dx_max
=
(
ci
->
stars
.
dx_max_sort
+
cj
->
hydro
.
dx_max_sort
);
const
float
dx_max
=
(
ci
->
stars
.
dx_max_sort
+
cj
->
hydro
.
dx_max_sort
);
const
float
dx_max_rshift
=
dx_max
-
rshift
;
const
float
hydro_
dx_max_rshift
=
cj
->
hydro
.
dx_max
_sort
-
rshift
;
/* Loop over the sparts in ci. */
/* Loop over the sparts in ci. */
for
(
int
pid
=
count_i
-
1
;
for
(
int
pid
=
count_i
-
1
;
...
@@ -321,7 +321,7 @@ void DO_SYM_PAIR1_STARS(struct runner *r, struct cell *ci, struct cell *cj,
...
@@ -321,7 +321,7 @@ void DO_SYM_PAIR1_STARS(struct runner *r, struct cell *ci, struct cell *cj,
px
[
2
]
*
runner_shift
[
sid
][
2
];
px
[
2
]
*
runner_shift
[
sid
][
2
];
/* Is there anything we need to interact with ? */
/* Is there anything we need to interact with ? */
const
double
di
=
dist
+
hi
*
kernel_gamma
+
dx_max_rshift
;
const
double
di
=
dist
+
hi
*
kernel_gamma
+
hydro_
dx_max_rshift
;
if
(
di
<
dj_min
)
continue
;
if
(
di
<
dj_min
)
continue
;
/* Get some additional information about pi */
/* Get some additional information about pi */
...
@@ -428,7 +428,7 @@ void DO_SYM_PAIR1_STARS(struct runner *r, struct cell *ci, struct cell *cj,
...
@@ -428,7 +428,7 @@ void DO_SYM_PAIR1_STARS(struct runner *r, struct cell *ci, struct cell *cj,
struct
spart
*
restrict
sparts_j
=
cj
->
stars
.
parts
;
struct
spart
*
restrict
sparts_j
=
cj
->
stars
.
parts
;
const
double
di_max
=
sort_i
[
count_i
-
1
].
d
-
rshift
;
const
double
di_max
=
sort_i
[
count_i
-
1
].
d
-
rshift
;
const
float
dx_max
=
(
ci
->
hydro
.
dx_max_sort
+
cj
->
stars
.
dx_max_sort
);
const
float
dx_max
=
(
ci
->
hydro
.
dx_max_sort
+
cj
->
stars
.
dx_max_sort
);
const
float
dx_max_rshift
=
dx_max
-
rshift
;
const
float
hydro_
dx_max_rshift
=
ci
->
hydro
.
dx_max
_sort
-
rshift
;
/* Loop over the parts in cj. */
/* Loop over the parts in cj. */
for
(
int
pjd
=
0
;
pjd
<
count_j
&&
sort_j
[
pjd
].
d
-
hj_max
-
dx_max
<
di_max
;
for
(
int
pjd
=
0
;
pjd
<
count_j
&&
sort_j
[
pjd
].
d
-
hj_max
-
dx_max
<
di_max
;
...
@@ -450,7 +450,7 @@ void DO_SYM_PAIR1_STARS(struct runner *r, struct cell *ci, struct cell *cj,
...
@@ -450,7 +450,7 @@ void DO_SYM_PAIR1_STARS(struct runner *r, struct cell *ci, struct cell *cj,
px
[
2
]
*
runner_shift
[
sid
][
2
];
px
[
2
]
*
runner_shift
[
sid
][
2
];
/* Is there anything we need to interact with ? */
/* Is there anything we need to interact with ? */
const
double
dj
=
dist
-
hj
*
kernel_gamma
-
dx_max_rshift
;
const
double
dj
=
dist
-
hj
*
kernel_gamma
-
hydro_
dx_max_rshift
;
if
(
dj
-
rshift
>
di_max
)
continue
;
if
(
dj
-
rshift
>
di_max
)
continue
;
/* Get some additional information about pj */
/* Get some additional information about pj */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment