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
12abbde0
Commit
12abbde0
authored
6 years ago
by
James Willis
Browse files
Options
Downloads
Patches
Plain Diff
Only loop over local top level cells when performing the local FOF.
parent
398646e5
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!543
Fof
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/fof.c
+5
-5
5 additions, 5 deletions
src/fof.c
with
5 additions
and
5 deletions
src/fof.c
+
5
−
5
View file @
12abbde0
...
@@ -723,12 +723,12 @@ void fof_search_tree_mapper(void *map_data, int num_elements,
...
@@ -723,12 +723,12 @@ void fof_search_tree_mapper(void *map_data, int num_elements,
struct
space
*
s
=
(
struct
space
*
)
extra_data
;
struct
space
*
s
=
(
struct
space
*
)
extra_data
;
int
*
local_cells
=
(
int
*
)
map_data
;
int
*
local_cells
=
(
int
*
)
map_data
;
const
size_t
nr_cells
=
s
->
nr_cells
;
const
size_t
nr_
local_
cells
=
s
->
nr_
local_
cells
;
const
double
dim
[
3
]
=
{
s
->
dim
[
0
],
s
->
dim
[
1
],
s
->
dim
[
2
]};
const
double
dim
[
3
]
=
{
s
->
dim
[
0
],
s
->
dim
[
1
],
s
->
dim
[
2
]};
const
double
search_r2
=
s
->
l_x2
;
const
double
search_r2
=
s
->
l_x2
;
/* Make a list of cell offsets into the top-level cell array. */
/* Make a list of cell offsets into the
local
top-level cell array. */
int
*
const
offset
=
s
->
cell_index
+
(
ptrdiff_t
)(
&
s
->
cells_top
[
local_cells
[
0
]]
-
s
->
cells_top
);
int
*
const
offset
=
s
->
cell_index
+
(
ptrdiff_t
)(
local_cells
-
s
->
local_
cells_top
);
/* Loop over cells and find which cells are in range of each other to perform
/* Loop over cells and find which cells are in range of each other to perform
* the FOF search. */
* the FOF search. */
...
@@ -748,9 +748,9 @@ void fof_search_tree_mapper(void *map_data, int num_elements,
...
@@ -748,9 +748,9 @@ void fof_search_tree_mapper(void *map_data, int num_elements,
/* Loop over all top-level cells skipping over the cells already searched.
/* Loop over all top-level cells skipping over the cells already searched.
*/
*/
for
(
size_t
cjd
=
offset
[
ind
]
+
1
;
cjd
<
nr_cells
;
cjd
++
)
{
for
(
size_t
cjd
=
offset
[
ind
]
+
1
;
cjd
<
nr_
local_
cells
;
cjd
++
)
{
struct
cell
*
restrict
cj
=
&
s
->
cells_top
[
cjd
];
struct
cell
*
restrict
cj
=
&
s
->
cells_top
[
s
->
local_cells_top
[
cjd
]
]
;
/* Only perform FOF search on local cells. */
/* Only perform FOF search on local cells. */
if
(
cj
->
nodeID
==
engine_rank
)
{
if
(
cj
->
nodeID
==
engine_rank
)
{
...
...
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