Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
SWIFTsim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
70
Issues
70
List
Boards
Labels
Milestones
Merge Requests
13
Merge Requests
13
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
SWIFT
SWIFTsim
Commits
106624ab
Commit
106624ab
authored
May 09, 2017
by
Matthieu Schaller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed SPH tests to use the new dx_max nomenclature
parent
d7a357f9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
14 deletions
+16
-14
src/runner.h
src/runner.h
+2
-1
tests/test125cells.c
tests/test125cells.c
+3
-4
tests/test27cells.c
tests/test27cells.c
+3
-3
tests/testKernel.c
tests/testKernel.c
+3
-3
tests/testPair.c
tests/testPair.c
+3
-2
tests/testSPHStep.c
tests/testSPHStep.c
+2
-1
No files found.
src/runner.h
View file @
106624ab
...
...
@@ -62,7 +62,8 @@ struct runner {
void
runner_do_ghost
(
struct
runner
*
r
,
struct
cell
*
c
,
int
timer
);
void
runner_do_extra_ghost
(
struct
runner
*
r
,
struct
cell
*
c
,
int
timer
);
void
runner_do_sort
(
struct
runner
*
r
,
struct
cell
*
c
,
int
flag
,
int
clock
);
void
runner_do_drift_particles
(
struct
runner
*
r
,
struct
cell
*
c
,
int
timer
);
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_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_force
(
struct
runner
*
r
,
struct
cell
*
c
,
int
timer
);
...
...
tests/test125cells.c
View file @
106624ab
...
...
@@ -315,7 +315,7 @@ struct cell *make_cell(size_t n, const double offset[3], double size, double h,
cell
->
h_max
=
h
;
cell
->
count
=
count
;
cell
->
gcount
=
0
;
cell
->
dx_max
=
0
.;
cell
->
dx_max
_part
=
0
.;
cell
->
dx_max_sort
=
0
.;
cell
->
width
[
0
]
=
size
;
cell
->
width
[
1
]
=
size
;
...
...
@@ -324,7 +324,7 @@ struct cell *make_cell(size_t n, const double offset[3], double size, double h,
cell
->
loc
[
1
]
=
offset
[
1
];
cell
->
loc
[
2
]
=
offset
[
2
];
cell
->
ti_old
=
8
;
cell
->
ti_old
_part
=
8
;
cell
->
ti_end_min
=
8
;
cell
->
ti_end_max
=
8
;
cell
->
ti_sort
=
0
;
...
...
@@ -592,8 +592,7 @@ int main(int argc, char *argv[]) {
const
ticks
tic
=
getticks
();
/* Initialise the particles */
for
(
int
j
=
0
;
j
<
125
;
++
j
)
runner_do_drift_particles
(
&
runner
,
cells
[
j
],
0
);
for
(
int
j
=
0
;
j
<
125
;
++
j
)
runner_do_drift_part
(
&
runner
,
cells
[
j
],
0
);
/* First, sort stuff */
for
(
int
j
=
0
;
j
<
125
;
++
j
)
runner_do_sort
(
&
runner
,
cells
[
j
],
0x1FFF
,
0
);
...
...
tests/test27cells.c
View file @
106624ab
...
...
@@ -158,7 +158,7 @@ struct cell *make_cell(size_t n, double *offset, double size, double h,
cell
->
split
=
0
;
cell
->
h_max
=
h
;
cell
->
count
=
count
;
cell
->
dx_max
=
0
.;
cell
->
dx_max
_part
=
0
.;
cell
->
dx_max_sort
=
0
.;
cell
->
width
[
0
]
=
size
;
cell
->
width
[
1
]
=
size
;
...
...
@@ -167,7 +167,7 @@ struct cell *make_cell(size_t n, double *offset, double size, double h,
cell
->
loc
[
1
]
=
offset
[
1
];
cell
->
loc
[
2
]
=
offset
[
2
];
cell
->
ti_old
=
8
;
cell
->
ti_old
_part
=
8
;
cell
->
ti_end_min
=
8
;
cell
->
ti_end_max
=
8
;
cell
->
ti_sort
=
8
;
...
...
@@ -438,7 +438,7 @@ int main(int argc, char *argv[]) {
cells
[
i
*
9
+
j
*
3
+
k
]
=
make_cell
(
particles
,
offset
,
size
,
h
,
rho
,
&
partId
,
perturbation
,
vel
);
runner_do_drift_part
icles
(
&
runner
,
cells
[
i
*
9
+
j
*
3
+
k
],
0
);
runner_do_drift_part
(
&
runner
,
cells
[
i
*
9
+
j
*
3
+
k
],
0
);
runner_do_sort
(
&
runner
,
cells
[
i
*
9
+
j
*
3
+
k
],
0x1FFF
,
0
);
}
...
...
tests/testKernel.c
View file @
106624ab
...
...
@@ -91,7 +91,7 @@ int main() {
printf
(
"
\n
Vector Output for kernel_deval_2_vec
\n
"
);
printf
(
"-------------
\n
"
);
/* Test vectorised kernel that uses two vectors. */
for
(
int
i
=
0
;
i
<
numPoints
;
i
+=
VEC_SIZE
)
{
...
...
@@ -100,7 +100,7 @@ int main() {
vector
vx_2
,
vx_h_2
;
vector
W_vec_2
,
dW_vec_2
;
for
(
int
j
=
0
;
j
<
VEC_SIZE
;
j
++
)
{
vx
.
f
[
j
]
=
(
i
+
j
)
*
2
.
25
f
/
numPoints
;
vx_2
.
f
[
j
]
=
(
i
+
j
)
*
2
.
25
f
/
numPoints
;
...
...
@@ -127,7 +127,7 @@ int main() {
return
1
;
}
}
/* Check second vector results. */
for
(
int
j
=
0
;
j
<
VEC_SIZE
;
j
++
)
{
printf
(
"%2d: h= %f H= %f x=%f W(x,h)=%f dW(x,h)=%f
\n
"
,
i
+
j
,
h
,
...
...
tests/testPair.c
View file @
106624ab
...
...
@@ -84,7 +84,8 @@ struct cell *make_cell(size_t n, double *offset, double size, double h,
cell
->
split
=
0
;
cell
->
h_max
=
h
;
cell
->
count
=
count
;
cell
->
dx_max
=
0
.;
cell
->
dx_max_part
=
0
.;
cell
->
dx_max_sort
=
0
.;
cell
->
width
[
0
]
=
n
;
cell
->
width
[
1
]
=
n
;
cell
->
width
[
2
]
=
n
;
...
...
@@ -92,7 +93,7 @@ struct cell *make_cell(size_t n, double *offset, double size, double h,
cell
->
loc
[
1
]
=
offset
[
1
];
cell
->
loc
[
2
]
=
offset
[
2
];
cell
->
ti_old
=
8
;
cell
->
ti_old
_part
=
8
;
cell
->
ti_end_min
=
8
;
cell
->
ti_end_max
=
8
;
...
...
tests/testSPHStep.c
View file @
106624ab
...
...
@@ -71,7 +71,8 @@ struct cell *make_cell(size_t N, float cellSize, int offset[3], int id_offset) {
cell
->
h_max
=
h
;
cell
->
count
=
count
;
cell
->
gcount
=
0
;
cell
->
dx_max
=
0
.;
cell
->
dx_max_part
=
0
.;
cell
->
dx_max_sort
=
0
.;
cell
->
width
[
0
]
=
cellSize
;
cell
->
width
[
1
]
=
cellSize
;
cell
->
width
[
2
]
=
cellSize
;
...
...
Write
Preview
Markdown
is supported
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