Skip to content

Commit

Permalink
Fix failing unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Jackson <[email protected]>
  • Loading branch information
imikejackson committed Jun 25, 2024
1 parent a38a297 commit 60f5101
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/simplnx/DataStructure/Geometry/EdgeGeom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,18 +181,22 @@ usize EdgeGeom::getNumberOfVerticesPerEdge() const

IGeometry::StatusCode EdgeGeom::findElementsContainingVert(bool recalculate)
{
auto* containsVert = getDataStructureRef().getDataAsUnsafe<ElementDynamicList>(m_CellContainingVertDataArrayId);
if(containsVert != nullptr && !recalculate)
auto* edgesContainingVert = getDataStructureRef().getDataAsUnsafe<ElementDynamicList>(m_CellContainingVertDataArrayId);
if(edgesContainingVert != nullptr && !recalculate)
{
return 0;
}
if(containsVert == nullptr)
if(edgesContainingVert == nullptr)
{
edgesContainingVert = DynamicListArray<uint16, MeshIndexType>::Create(*getDataStructure(), k_EltsContainingVert, getId());
}
if(edgesContainingVert == nullptr)
{
m_CellContainingVertDataArrayId.reset();
return -1;
}
GeometryHelpers::Connectivity::FindElementsContainingVert<uint16, MeshIndexType>(getEdges(), containsVert, getNumberOfVertices());
m_CellContainingVertDataArrayId = containsVert->getId();
GeometryHelpers::Connectivity::FindElementsContainingVert<uint16, MeshIndexType>(getEdges(), edgesContainingVert, getNumberOfVertices());
m_CellContainingVertDataArrayId = edgesContainingVert->getId();
return 1;
}

Expand Down

0 comments on commit 60f5101

Please sign in to comment.