Skip to content

Commit

Permalink
Address comments, fix test (idaholab#24645)
Browse files Browse the repository at this point in the history
  • Loading branch information
dschwen committed Jun 20, 2023
1 parent d173f3e commit 38e9f82
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 29 deletions.
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
9 changes: 0 additions & 9 deletions test/tests/markers/boundary_marker/adjacent.i
@@ -1,12 +1,3 @@
###########################################################
# This is a test of the Mesh Marker System. It marks
# elements with flags indicating whether they should be
# refined, coarsened, or left alone. This system
# has the ability to use the Mesh Indicator System.
#
# @Requirement F2.50
###########################################################

[Mesh]
type = GeneratedMesh
dim = 2
Expand Down
9 changes: 0 additions & 9 deletions test/tests/markers/boundary_marker/distance.i
@@ -1,12 +1,3 @@
###########################################################
# This is a test of the Mesh Marker System. It marks
# elements with flags indicating whether they should be
# refined, coarsened, or left alone. This system
# has the ability to use the Mesh Indicator System.
#
# @Requirement F2.50
###########################################################

[Mesh]
type = GeneratedMesh
dim = 2
Expand Down
9 changes: 0 additions & 9 deletions test/tests/markers/boundary_marker/multiple.i
@@ -1,12 +1,3 @@
###########################################################
# This is a test of the Mesh Marker System. It marks
# elements with flags indicating whether they should be
# refined, coarsened, or left alone. This system
# has the ability to use the Mesh Indicator System.
#
# @Requirement F2.50
###########################################################

[Mesh]
type = GeneratedMesh
dim = 2
Expand Down
4 changes: 2 additions & 2 deletions test/tests/userobjects/geometry_snap/tests
Expand Up @@ -12,9 +12,9 @@
[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 "
requirement = "The system shall support 'snapping' or moving new nodes in lower dimensional "
"subdomains created by mesh adaptivity to the surface of a geometric sphere to "
"capture high fidelity features on curved geometries."
[]
Expand Down

0 comments on commit 38e9f82

Please sign in to comment.