mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
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:
@@ -18,7 +18,7 @@
|
||||
|
||||
#include "RiuGeoMechXfTensorResultAccessor.h"
|
||||
#include "RigFemPartResultsCollection.h"
|
||||
#include "RivHexGridIntersectionTools.h"
|
||||
#include "RivIntersectionVertexWeights.h"
|
||||
#include "cvfAssert.h"
|
||||
#include "cvfGeometryTools.h"
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user