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
ce5ec3f8
Commit
ce5ec3f8
authored
Apr 03, 2018
by
Matthieu Schaller
Browse files
Set the time-bins to a valid state in the testSymmetry.
parent
5b055e8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/testSymmetry.c
View file @
ce5ec3f8
...
...
@@ -59,6 +59,8 @@ void test() {
pj
.
h
=
2
.
f
;
pi
.
id
=
1ll
;
pj
.
id
=
2ll
;
pi
.
time_bin
=
1
;
pj
.
time_bin
=
1
;
#if defined(GIZMO_SPH) || defined(SHADOWFAX_SPH)
/* Give the primitive variables sensible values, since the Riemann solver does
...
...
@@ -157,8 +159,20 @@ void test() {
i_not_ok
=
memcmp
(
&
pi
,
&
pi2
,
sizeof
(
struct
part
));
j_not_ok
=
memcmp
(
&
pj
,
&
pj2
,
sizeof
(
struct
part
));
if
(
i_not_ok
)
error
(
"Particles 'pi' do not match after density"
);
if
(
j_not_ok
)
error
(
"Particles 'pj' do not match after density"
);
if
(
i_not_ok
)
{
printParticle_single
(
&
pi
,
&
xpi
);
printParticle_single
(
&
pi2
,
&
xpi
);
print_bytes
(
&
pj
,
sizeof
(
struct
part
));
print_bytes
(
&
pj2
,
sizeof
(
struct
part
));
error
(
"Particles 'pi' do not match after force (byte = %d)"
,
i_not_ok
);
}
if
(
j_not_ok
)
{
printParticle_single
(
&
pj
,
&
xpj
);
printParticle_single
(
&
pj2
,
&
xpj
);
print_bytes
(
&
pj
,
sizeof
(
struct
part
));
print_bytes
(
&
pj2
,
sizeof
(
struct
part
));
error
(
"Particles 'pj' do not match after force (byte = %d)"
,
j_not_ok
);
}
/* --- Test the force loop --- */
...
...
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