GeoMech Intersection updates: support multiple parts (#8160)

* Rearrange intersection classes, split single file into one-per-class

* Support multi-part geomech case intersections
This commit is contained in:
jonjenssen
2021-10-15 16:57:18 +02:00
committed by GitHub
parent afadaf27d5
commit b169900c41
44 changed files with 741 additions and 397 deletions

View File

@@ -18,7 +18,7 @@
#include "RiuGeoMechXfTensorResultAccessor.h"
#include "RigFemPartResultsCollection.h"
#include "RivHexGridIntersectionTools.h"
#include "RivIntersectionVertexWeights.h"
#include "cvfAssert.h"
#include "cvfGeometryTools.h"

View File

@@ -1077,6 +1077,7 @@ void RiuViewerCommands::findCellAndGridIndex( Rim3dView* m
{
CVF_ASSERT( cellIndex && gridIndex );
RimEclipseCase* eclipseCase = nullptr;
RimGeoMechCase* geomechCase = dynamic_cast<RimGeoMechCase*>( mainOrComparisonView->ownerCase() );
if ( sepInterResDef )
{
@@ -1096,6 +1097,13 @@ void RiuViewerCommands::findCellAndGridIndex( Rim3dView* m
*cellIndex = cell.gridLocalCellIndex();
*gridIndex = cell.hostGrid()->gridIndex();
}
else if ( geomechCase )
{
RigFemPartCollection* parts = geomechCase->geoMechData()->femParts();
auto [partId, elementIdx] = parts->partIdAndElementIndex( globalCellIndex );
*cellIndex = elementIdx;
*gridIndex = (size_t)partId;
}
else
{
*cellIndex = globalCellIndex;