Skip to content

Conversation

@pshriwise
Copy link
Contributor

I discovered today that particles moving from a rotated to an unrotated cell cause a seg fault because the LocalCoord::rotated property isn't updated correctly. I originally updated the LocalCoords::rotate method to always update this property in find_cell_innder, but I think it's best to ensure that the lower level coordinates always get reset in neighbor_list_find_cell in case there are other properties of LocalCoord that might cause problems if they aren't updated.

I've added a test that fails for this reason (failing CI run in my fork) and added a loop that resets the particle's lower level coordinates in neighbor_list_find_cell to fix the problem.

@gridley
Copy link
Contributor

gridley commented Apr 1, 2021

Oops, sorry to introduce this regression. Good thing the test is in place now! I had taken those lines out because they appeared to not influence correctness, judging from the results of regression tests.

@gridley gridley merged commit 93b379b into openmc-dev:develop Apr 1, 2021
pshriwise pushed a commit to pshriwise/openmc that referenced this pull request Apr 24, 2021
Fix segfault from unreset particle coordinates in `neighbor_list_find_cell`
pshriwise pushed a commit to pshriwise/openmc that referenced this pull request Apr 24, 2021
Fix segfault from unreset particle coordinates in `neighbor_list_find_cell`
pshriwise pushed a commit to pshriwise/openmc that referenced this pull request Apr 24, 2021
Fix segfault from unreset particle coordinates in `neighbor_list_find_cell`
pshriwise pushed a commit to pshriwise/openmc that referenced this pull request Apr 26, 2021
Fix segfault from unreset particle coordinates in `neighbor_list_find_cell`
paulromano pushed a commit that referenced this pull request Apr 26, 2021
Fix segfault from unreset particle coordinates in `neighbor_list_find_cell`
@paulromano paulromano mentioned this pull request Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants