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
8e8ed29d
Commit
8e8ed29d
authored
7 years ago
by
James Willis
Browse files
Options
Downloads
Patches
Plain Diff
Tidied code up.
parent
fa153c4c
No related branches found
No related tags found
1 merge request
!456
Dopair vec mpi
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/runner_doiact_vec.c
+8
-18
8 additions, 18 deletions
src/runner_doiact_vec.c
with
8 additions
and
18 deletions
src/runner_doiact_vec.c
+
8
−
18
View file @
8e8ed29d
...
@@ -1164,13 +1164,8 @@ void runner_dopair1_density_vec(struct runner *r, struct cell *ci,
...
@@ -1164,13 +1164,8 @@ void runner_dopair1_density_vec(struct runner *r, struct cell *ci,
TIMER_TIC
;
TIMER_TIC
;
/* Check whether cells are local to the node. */
/* Check whether cells are local to the node. */
#ifdef WITH_MPI
const
int
ci_local
=
(
ci
->
nodeID
==
e
->
nodeID
);
const
int
ci_local
=
(
ci
->
nodeID
==
e
->
nodeID
)
?
1
:
0
;
const
int
cj_local
=
(
cj
->
nodeID
==
e
->
nodeID
);
const
int
cj_local
=
(
cj
->
nodeID
==
e
->
nodeID
)
?
1
:
0
;
#else
const
int
ci_local
=
1
;
const
int
cj_local
=
1
;
#endif
/* Get the cutoff shift. */
/* Get the cutoff shift. */
double
rshift
=
0
.
0
;
double
rshift
=
0
.
0
;
...
@@ -1190,8 +1185,8 @@ void runner_dopair1_density_vec(struct runner *r, struct cell *ci,
...
@@ -1190,8 +1185,8 @@ void runner_dopair1_density_vec(struct runner *r, struct cell *ci,
const
double
di_max
=
sort_i
[
count_i
-
1
].
d
-
rshift
;
const
double
di_max
=
sort_i
[
count_i
-
1
].
d
-
rshift
;
const
double
dj_min
=
sort_j
[
0
].
d
;
const
double
dj_min
=
sort_j
[
0
].
d
;
const
float
dx_max
=
(
ci
->
dx_max_sort
+
cj
->
dx_max_sort
);
const
float
dx_max
=
(
ci
->
dx_max_sort
+
cj
->
dx_max_sort
);
const
int
active_ci
=
cell_is_active
(
ci
,
e
)
&
ci_local
;
const
int
active_ci
=
cell_is_active
(
ci
,
e
)
&
&
ci_local
;
const
int
active_cj
=
cell_is_active
(
cj
,
e
)
&
cj_local
;
const
int
active_cj
=
cell_is_active
(
cj
,
e
)
&
&
cj_local
;
/* Count number of particles that are in range and active*/
/* Count number of particles that are in range and active*/
int
numActive
=
0
;
int
numActive
=
0
;
...
@@ -1523,13 +1518,8 @@ void runner_dopair2_force_vec(struct runner *r, struct cell *ci,
...
@@ -1523,13 +1518,8 @@ void runner_dopair2_force_vec(struct runner *r, struct cell *ci,
TIMER_TIC
;
TIMER_TIC
;
/* Check whether cells are local to the node. */
/* Check whether cells are local to the node. */
#ifdef WITH_MPI
const
int
ci_local
=
(
ci
->
nodeID
==
e
->
nodeID
);
const
int
ci_local
=
(
ci
->
nodeID
==
e
->
nodeID
)
?
1
:
0
;
const
int
cj_local
=
(
cj
->
nodeID
==
e
->
nodeID
);
const
int
cj_local
=
(
cj
->
nodeID
==
e
->
nodeID
)
?
1
:
0
;
#else
const
int
ci_local
=
1
;
const
int
cj_local
=
1
;
#endif
/* Get the cutoff shift. */
/* Get the cutoff shift. */
double
rshift
=
0
.
0
;
double
rshift
=
0
.
0
;
...
@@ -1551,8 +1541,8 @@ void runner_dopair2_force_vec(struct runner *r, struct cell *ci,
...
@@ -1551,8 +1541,8 @@ void runner_dopair2_force_vec(struct runner *r, struct cell *ci,
const
double
di_max
=
sort_i
[
count_i
-
1
].
d
-
rshift
;
const
double
di_max
=
sort_i
[
count_i
-
1
].
d
-
rshift
;
const
double
dj_min
=
sort_j
[
0
].
d
;
const
double
dj_min
=
sort_j
[
0
].
d
;
const
float
dx_max
=
(
ci
->
dx_max_sort
+
cj
->
dx_max_sort
);
const
float
dx_max
=
(
ci
->
dx_max_sort
+
cj
->
dx_max_sort
);
const
int
active_ci
=
cell_is_active
(
ci
,
e
)
&
ci_local
;
const
int
active_ci
=
cell_is_active
(
ci
,
e
)
&
&
ci_local
;
const
int
active_cj
=
cell_is_active
(
cj
,
e
)
&
cj_local
;
const
int
active_cj
=
cell_is_active
(
cj
,
e
)
&
&
cj_local
;
/* Check if any particles are active and in range */
/* Check if any particles are active and in range */
int
numActive
=
0
;
int
numActive
=
0
;
...
...
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