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
6331f40e
Commit
6331f40e
authored
6 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Update the test27stars to correctly drift and sort the stars.
parent
04384ae8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/runner.h
+1
-0
1 addition, 0 deletions
src/runner.h
tests/test27cellsStars.c
+7
-1
7 additions, 1 deletion
tests/test27cellsStars.c
with
8 additions
and
1 deletion
src/runner.h
+
1
−
0
View file @
6331f40e
...
...
@@ -75,6 +75,7 @@ void runner_do_stars_sort(struct runner *r, struct cell *c, int flag,
int
cleanup
,
int
clock
);
void
runner_do_drift_part
(
struct
runner
*
r
,
struct
cell
*
c
,
int
timer
);
void
runner_do_drift_gpart
(
struct
runner
*
r
,
struct
cell
*
c
,
int
timer
);
void
runner_do_drift_spart
(
struct
runner
*
r
,
struct
cell
*
c
,
int
timer
);
void
runner_do_kick1
(
struct
runner
*
r
,
struct
cell
*
c
,
int
timer
);
void
runner_do_kick2
(
struct
runner
*
r
,
struct
cell
*
c
,
int
timer
);
void
runner_do_end_hydro_force
(
struct
runner
*
r
,
struct
cell
*
c
,
int
timer
);
...
...
This diff is collapsed.
Click to expand it.
tests/test27cellsStars.c
+
7
−
1
View file @
6331f40e
...
...
@@ -172,13 +172,15 @@ struct cell *make_cell(size_t n, size_t n_stars, double *offset, double size,
cell
->
loc
[
1
]
=
offset
[
1
];
cell
->
loc
[
2
]
=
offset
[
2
];
cell
->
stars
.
ti_old_part
=
8
;
cell
->
stars
.
ti_end_min
=
8
;
cell
->
stars
.
ti_end_max
=
8
;
cell
->
hydro
.
ti_old_part
=
8
;
cell
->
hydro
.
ti_end_min
=
8
;
cell
->
hydro
.
ti_end_max
=
8
;
cell
->
grav
.
ti_old_part
=
8
;
cell
->
grav
.
ti_end_min
=
8
;
cell
->
grav
.
ti_end_max
=
8
;
cell
->
stars
.
ti_end_min
=
8
;
cell
->
nodeID
=
NODE_ID
;
shuffle_particles
(
cell
->
hydro
.
parts
,
cell
->
hydro
.
count
);
...
...
@@ -187,6 +189,9 @@ struct cell *make_cell(size_t n, size_t n_stars, double *offset, double size,
cell
->
hydro
.
sorted
=
0
;
for
(
int
k
=
0
;
k
<
13
;
k
++
)
cell
->
hydro
.
sort
[
k
]
=
NULL
;
cell
->
stars
.
sorted
=
0
;
for
(
int
k
=
0
;
k
<
13
;
k
++
)
cell
->
stars
.
sort
[
k
]
=
NULL
;
return
cell
;
}
...
...
@@ -415,6 +420,7 @@ int main(int argc, char *argv[]) {
perturbation
,
h_pert
);
runner_do_drift_part
(
&
runner
,
cells
[
i
*
9
+
j
*
3
+
k
],
0
);
runner_do_drift_spart
(
&
runner
,
cells
[
i
*
9
+
j
*
3
+
k
],
0
);
runner_do_hydro_sort
(
&
runner
,
cells
[
i
*
9
+
j
*
3
+
k
],
0x1FFF
,
0
,
0
);
runner_do_stars_sort
(
&
runner
,
cells
[
i
*
9
+
j
*
3
+
k
],
0x1FFF
,
0
,
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