Merge pull request #1172 from paulromano/cell-distance-bugfix

Fix bug in calculating distance to boundary in complex cells
This commit is contained in:
Sterling Harper 2019-02-25 14:02:16 -05:00 committed by GitHub
commit 07aad53e6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 8 deletions

View file

@ -424,7 +424,7 @@ CSGCell::distance(Position r, Direction u, int32_t on_surface) const
// Calculate the distance to this surface.
// Note the off-by-one indexing
bool coincident {token == on_surface};
bool coincident {std::abs(token) == std::abs(on_surface)};
double d {model::surfaces[abs(token)-1]->distance(r, u, coincident)};
// Check if this distance is the new minimum.

View file

@ -22,13 +22,8 @@ fi
# Build and install OpenMC executable
python tools/ci/travis-install.py
if [[ $TRAVIS_PYTHON_VERSION == "3.7" ]]; then
# Install Python API in editable mode
pip install -e .[test]
else
# Conditionally install vtk
pip install -e .[test,vtk]
fi
# Install Python API in editable mode
pip install -e .[test,vtk]
# For uploading to coveralls
pip install coveralls