Skip to content

Commit

Permalink
Make PointLocatorTree threadsafe again (#1612)
Browse files Browse the repository at this point in the history
Refs #1593.
  • Loading branch information
dschwen authored and jwpeterson committed Mar 7, 2018
1 parent c24f08e commit 029a711
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 0 additions & 5 deletions include/utils/tree_node.h
Expand Up @@ -220,11 +220,6 @@ class TreeNode
* Does this node contain any infinite elements.
*/
bool contains_ifems;

/**
* Used in find_element_in_children
*/
mutable std::vector<bool> searched_child;
};


Expand Down
4 changes: 3 additions & 1 deletion src/utils/tree_node.C
Expand Up @@ -19,6 +19,7 @@

// C++ includes
#include <set>
#include <array>

// Local includes
#include "libmesh/libmesh_config.h"
Expand Down Expand Up @@ -498,7 +499,8 @@ const Elem * TreeNode<N>::find_element_in_children (const Point & p,
{
libmesh_assert (!this->active());

searched_child.assign(children.size(), false);
// value-initialization sets all array members to false
std::array<bool,N> searched_child{};

// First only look in the children whose bounding box
// contain the point p.
Expand Down

0 comments on commit 029a711

Please sign in to comment.