From e2824599ba097fb58de497881c0b5122d436b26a Mon Sep 17 00:00:00 2001 From: aprilnovak Date: Thu, 8 Oct 2020 11:35:51 -0500 Subject: [PATCH] Remove redundant error check that the Position is in the mesh that is already performed in get_indices. --- src/mesh.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/mesh.cpp b/src/mesh.cpp index c7d6ba7b4..54d99250c 100644 --- a/src/mesh.cpp +++ b/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 ijk(n_dimension_); bool in_mesh;