diff --git a/MeshGeoToolsLib/BoundaryElementsOnSurface.cpp b/MeshGeoToolsLib/BoundaryElementsOnSurface.cpp index 63b0b5814095b152ef72426fa722be5e29221de9..fd7438d026edf42ae0402cf3ff055c27981e5fcd 100644 --- a/MeshGeoToolsLib/BoundaryElementsOnSurface.cpp +++ b/MeshGeoToolsLib/BoundaryElementsOnSurface.cpp @@ -40,19 +40,19 @@ BoundaryElementsOnSurface::BoundaryElementsOnSurface(MeshLib::Mesh const& mesh, if (!isOuterElement) continue; // find faces on surface - for (unsigned i=0; i<e->getNEdges(); i++) { - auto* edge = e->getEdge(i); + for (unsigned i=0; i<e->getNFaces(); i++) { + auto* face = e->getFace(i); // check size_t cnt_match = 0; - for (size_t j=0; j<edge->getNNodes(); j++) { - if (std::find(node_ids_on_sfc.begin(), node_ids_on_sfc.end(), edge->getNodeIndex(j)) != node_ids_on_sfc.end()) + for (size_t j=0; j<face->getNNodes(); j++) { + if (std::find(node_ids_on_sfc.begin(), node_ids_on_sfc.end(), face->getNodeIndex(j)) != node_ids_on_sfc.end()) cnt_match++; else break; } // update the list - if (cnt_match==edge->getNNodes()) - _boundary_elements.push_back(const_cast<MeshLib::Element*>(edge)); + if (cnt_match==face->getNNodes()) + _boundary_elements.push_back(const_cast<MeshLib::Element*>(face)); } } } diff --git a/MeshGeoToolsLib/BoundaryElementsOnSurface.h b/MeshGeoToolsLib/BoundaryElementsOnSurface.h index 00044120f3ecc85f48e4c70a0a1c2a352284ac48..8e77d96b92d65607ab357c54890ea70da2c0c26b 100644 --- a/MeshGeoToolsLib/BoundaryElementsOnSurface.h +++ b/MeshGeoToolsLib/BoundaryElementsOnSurface.h @@ -54,7 +54,7 @@ public: GeoLib::Surface const& getSurface() const {return _sfc;} /** - * Return the vector of boundary elements + * Return the vector of boundary elements (i.e. faces). The elements are unsorted. */ std::vector<MeshLib::Element*> const& getBoundaryElements() const {return _boundary_elements;}