mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Merge pull request #1685 from aprilnovak/simplify-mesh
Remove redundant error check that the Position is in the mesh
This commit is contained in:
commit
fb5ee52450
1 changed files with 0 additions and 10 deletions
10
src/mesh.cpp
10
src/mesh.cpp
|
|
@ -193,16 +193,6 @@ RegularMesh::RegularMesh(pugi::xml_node node)
|
|||
|
||||
int RegularMesh::get_bin(Position r) const
|
||||
{
|
||||
// Loop over the dimensions of the mesh
|
||||
for (int i = 0; i < n_dimension_; ++i) {
|
||||
// Check for cases where particle is outside of mesh
|
||||
if (r[i] < lower_left_[i]) {
|
||||
return -1;
|
||||
} else if (r[i] > upper_right_[i]) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
// Determine indices
|
||||
std::vector<int> ijk(n_dimension_);
|
||||
bool in_mesh;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue