Skip to content
GitLab
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
774acb3f
Commit
774acb3f
authored
Dec 17, 2016
by
Pedro Gonnet
Browse files
check part positions as doubles, not floats.
parent
1a500878
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cell.c
View file @
774acb3f
...
...
@@ -484,9 +484,9 @@ void cell_split(struct cell *c, ptrdiff_t parts_offset, struct cell_buff *buff,
#ifdef SWIFT_DEBUG_CHECKS
/* Check that the buffs are OK. */
for
(
int
k
=
0
;
k
<
count
;
k
++
)
{
if
(
buff
[
k
].
x
[
0
]
!=
(
float
)
parts
[
k
].
x
[
0
]
||
buff
[
k
].
x
[
1
]
!=
(
float
)
parts
[
k
].
x
[
1
]
||
buff
[
k
].
x
[
2
]
!=
(
float
)
parts
[
k
].
x
[
2
])
if
(
buff
[
k
].
x
[
0
]
!=
parts
[
k
].
x
[
0
]
||
buff
[
k
].
x
[
1
]
!=
parts
[
k
].
x
[
1
]
||
buff
[
k
].
x
[
2
]
!=
parts
[
k
].
x
[
2
])
error
(
"Inconsistent buff contents."
);
}
#endif
/* SWIFT_DEBUG_CHECKS */
...
...
@@ -546,10 +546,12 @@ void cell_split(struct cell *c, ptrdiff_t parts_offset, struct cell_buff *buff,
#ifdef SWIFT_DEBUG_CHECKS
/* Check that the buffs are OK. */
for
(
int
k
=
0
;
k
<
count
;
k
++
)
{
if
(
buff
[
k
].
x
[
0
]
!=
(
float
)
parts
[
k
].
x
[
0
]
||
buff
[
k
].
x
[
1
]
!=
(
float
)
parts
[
k
].
x
[
1
]
||
buff
[
k
].
x
[
2
]
!=
(
float
)
parts
[
k
].
x
[
2
])
for
(
int
k
=
1
;
k
<
count
;
k
++
)
{
if
(
buff
[
k
].
ind
<
buff
[
k
-
1
].
ind
)
error
(
"Buff not sorted."
);
if
(
buff
[
k
].
x
[
0
]
!=
parts
[
k
].
x
[
0
]
||
buff
[
k
].
x
[
1
]
!=
parts
[
k
].
x
[
1
]
||
buff
[
k
].
x
[
2
]
!=
parts
[
k
].
x
[
2
])
error
(
"Inconsistent buff contents (k=%i)."
,
k
);
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment