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
3e16dde9
Commit
3e16dde9
authored
May 25, 2020
by
Matthieu Schaller
Browse files
Use restrict on the cell arguments of cell_reorder_extra_gparts().
parent
78ac2e81
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cell.c
View file @
3e16dde9
...
...
@@ -6379,6 +6379,8 @@ void cell_reorder_extra_gparts(struct cell *c, struct part *parts,
/**
* @brief Can we use the MM interactions fo a given pair of cells?
*
* The two cells have to be different!
*
* @param ci The first #cell.
* @param cj The second #cell.
* @param e The #engine.
...
...
@@ -6386,9 +6388,9 @@ void cell_reorder_extra_gparts(struct cell *c, struct part *parts,
* @param use_rebuild_data Are we considering the data at the last tree-build
* (1) or current data (0)?
*/
int
cell_can_use_pair_mm
(
const
struct
cell
*
ci
,
const
str
u
ct
c
ell
*
cj
,
const
struct
engine
*
e
,
const
struct
spac
e
*
s
,
const
int
use_rebuild_data
)
{
int
cell_can_use_pair_mm
(
const
struct
cell
*
re
str
i
ct
c
i
,
const
struct
cell
*
restrict
cj
,
const
struct
engin
e
*
e
,
const
struct
space
*
s
,
const
int
use_rebuild_data
)
{
const
struct
gravity_props
*
props
=
e
->
gravity_properties
;
const
int
periodic
=
s
->
periodic
;
...
...
@@ -6399,8 +6401,8 @@ int cell_can_use_pair_mm(const struct cell *ci, const struct cell *cj,
if
(
cj
->
grav
.
count
<=
1
)
return
0
;
/* Recover the multipole information */
const
struct
gravity_tensors
*
cons
t
multi_i
=
ci
->
grav
.
multipole
;
const
struct
gravity_tensors
*
cons
t
multi_j
=
cj
->
grav
.
multipole
;
const
struct
gravity_tensors
*
restric
t
multi_i
=
ci
->
grav
.
multipole
;
const
struct
gravity_tensors
*
restric
t
multi_j
=
cj
->
grav
.
multipole
;
double
dx
,
dy
,
dz
;
...
...
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