Skip to content

Commit

Permalink
Clear the point locator after displacing the mesh
Browse files Browse the repository at this point in the history
Displacing the mesh invalidates all the bounding boxes on the
point locator, so we need to make sure we clear the locator so
we don't use bad bounding box data

Closes idaholab#22534
  • Loading branch information
lindsayad committed Nov 1, 2022
1 parent c2c6059 commit 0c5b2a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions framework/include/loops/UpdateDisplacedMeshThread.h
Expand Up @@ -34,6 +34,7 @@ class UpdateDisplacedMeshThread : public ThreadedNodeLoop<NodeRange, NodeRange::
virtual void onNode(NodeRange::const_iterator & nd) override;

void join(const UpdateDisplacedMeshThread & /*y*/);
void post() override;

protected:
void init();
Expand Down
7 changes: 7 additions & 0 deletions framework/src/loops/UpdateDisplacedMeshThread.C
Expand Up @@ -13,6 +13,7 @@
#include "DisplacedProblem.h"
#include "MooseMesh.h"

#include "libmesh/mesh_base.h"
#include "libmesh/numeric_vector.h"
#include "libmesh/transient_system.h"
#include "libmesh/explicit_system.h"
Expand Down Expand Up @@ -142,6 +143,12 @@ UpdateDisplacedMeshThread::onNode(NodeRange::const_iterator & nd)
}
}

void
UpdateDisplacedMeshThread::post()
{
_displaced_problem.mesh().getMesh().clear_point_locator();
}

void
UpdateDisplacedMeshThread::join(const UpdateDisplacedMeshThread & /*y*/)
{
Expand Down

0 comments on commit 0c5b2a1

Please sign in to comment.