Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
ba62a938
Unverified
Commit
ba62a938
authored
Nov 01, 2019
by
peastman
Committed by
GitHub
Nov 01, 2019
Browse files
Merge pull request #2461 from peastman/voxellimit
Prevent memory from exploding when particles get too spread out
parents
5312c2fe
9930e6f6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
platforms/cpu/src/CpuNeighborList.cpp
platforms/cpu/src/CpuNeighborList.cpp
+2
-2
No files found.
platforms/cpu/src/CpuNeighborList.cpp
View file @
ba62a938
...
@@ -80,8 +80,8 @@ public:
...
@@ -80,8 +80,8 @@ public:
voxelSizeZ
=
boxVectors
[
2
][
2
]
/
nz
;
voxelSizeZ
=
boxVectors
[
2
][
2
]
/
nz
;
}
}
else
{
else
{
ny
=
max
(
1
,
(
int
)
floorf
((
maxy
-
miny
)
/
voxelSizeY
+
0.5
f
));
ny
=
max
(
1
,
min
(
500
,
(
int
)
floorf
((
maxy
-
miny
)
/
voxelSizeY
+
0.5
f
))
)
;
nz
=
max
(
1
,
(
int
)
floorf
((
maxz
-
minz
)
/
voxelSizeZ
+
0.5
f
));
nz
=
max
(
1
,
min
(
500
,
(
int
)
floorf
((
maxz
-
minz
)
/
voxelSizeZ
+
0.5
f
))
)
;
if
(
maxy
>
miny
)
if
(
maxy
>
miny
)
voxelSizeY
=
(
maxy
-
miny
)
/
ny
;
voxelSizeY
=
(
maxy
-
miny
)
/
ny
;
if
(
maxz
>
minz
)
if
(
maxz
>
minz
)
...
...
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