mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 06:38:13 -05:00
* Skip deleted plot widgets in RiuMultiPlotBook::visiblePlotWidgets * Guard missing calculation in detectCyclicCalculation * Guard invalid node index in RigFemPart node lookups * Guard null well path in RimWellLogExtractionCurve::extractGeomData * Guard unopened case in RimGridCalculation::removeDependentObjects * Guard empty subset in createLateralAtMeasuredDepth
25 lines
1.0 KiB
C++
25 lines
1.0 KiB
C++
#include "gtest/gtest.h"
|
|
|
|
#include "RigFemPart.h"
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
/// A part with elements but no nodes, as read from a malformed model, gives connectivities that are
|
|
/// outside the node list. Calculating neighbors must not read outside the node to element references.
|
|
//--------------------------------------------------------------------------------------------------
|
|
TEST( RigFemPart, ElmNeighbors_ElementsWithoutNodes )
|
|
{
|
|
RigFemPart part;
|
|
|
|
const int connectivities[8] = { 0, 1, 2, 3, 4, 5, 6, 7 };
|
|
part.preAllocateElementStorage( 1 );
|
|
part.appendElement( RigElementType::HEX8, 1, connectivities );
|
|
|
|
part.assertNodeToElmIndicesIsCalculated();
|
|
part.assertElmNeighborsIsCalculated();
|
|
|
|
EXPECT_TRUE( part.elementsUsingNode( 0 ).empty() );
|
|
EXPECT_TRUE( part.elementsUsingNode( -1 ).empty() );
|
|
EXPECT_TRUE( part.elementLocalIndicesForNode( 0 ).empty() );
|
|
EXPECT_TRUE( part.elementLocalIndicesForNode( -1 ).empty() );
|
|
}
|