Skip to content

Commit

Permalink
Address comments, fix test (#24645)
Browse files Browse the repository at this point in the history
  • Loading branch information
dschwen committed Jun 20, 2023
1 parent d173f3e commit 506b041
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions framework/src/markers/BoundaryMarker.C
Expand Up @@ -44,6 +44,7 @@ BoundaryMarker::computeElementMarker()
{
if (_distance == 0.0)
{
// is the current element member of any selected boundary element set?
for (const auto boundary : _boundary_ids)
if (_mesh.isBoundaryElem(_current_elem->id(), boundary))
return _mark;
Expand All @@ -58,6 +59,11 @@ BoundaryMarker::computeElementMarker()
if (it != _bnd_elem_ids.end())
for (const auto id : it->second)
{
// shortcut if we are checing the current element itself
if (id == _current_elem->id())
return _mark;

// otherwise compute distance to the boundary elements
const auto elem = _mesh.elemPtr(id);
const auto r = _current_elem->vertex_average() - elem->vertex_average();
if (r.norm() < _distance)
Expand Down
2 changes: 1 addition & 1 deletion test/tests/userobjects/geometry_snap/tests
Expand Up @@ -12,7 +12,7 @@
[block]
type = 'Exodiff'
input = 'block.i'
exodiff = 'block.e-s004'
exodiff = 'block_out.e-s004'
issues = '#24645'
requirement = "The system shall support 'snapping' or moving new nodes in lower dimensioanl "
"subdomains created by mesh adaptivity to the surface of a geometric sphere to "
Expand Down

0 comments on commit 506b041

Please sign in to comment.