#5316 Prototype of results mapping on native surface nodes only

This commit is contained in:
Jacob Støren
2020-01-09 14:20:10 +01:00
parent 17f2c71a11
commit 5b1b7e630a
7 changed files with 279 additions and 9 deletions

View File

@@ -21,6 +21,10 @@
#include "RimGridView.h"
#include "RimSurface.h"
#include "RigFemPartCollection.h"
#include "RimEclipseView.h"
#include "RimGeoMechView.h"
#include "RivHexGridIntersectionTools.h"
#include "RivSurfacePartMgr.h"
CAF_PDM_SOURCE_INIT( RimSurfaceInView, "SurfaceInView" );
@@ -134,3 +138,53 @@ caf::PdmFieldHandle* RimSurfaceInView::objectToggleField()
{
return &m_isActive;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::ref<RivIntersectionHexGridInterface> RimSurfaceInView::createHexGridInterface()
{
// RimIntersectionResultDefinition* resDef = activeSeparateResultDefinition();
// if ( resDef && resDef->activeCase() )
//{
// // Eclipse case
//
// RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>( resDef->activeCase() );
// if ( eclipseCase && eclipseCase->eclipseCaseData() )
// {
// return new RivEclipseIntersectionGrid( eclipseCase->eclipseCaseData()->mainGrid(),
// eclipseCase->eclipseCaseData()->activeCellInfo(
// resDef->eclipseResultDefinition()->porosityModel() ),
// this->isInactiveCellsVisible() );
// }
//
// // Geomech case
//
// RimGeoMechCase* geomCase = dynamic_cast<RimGeoMechCase*>( resDef->activeCase() );
//
// if ( geomCase && geomCase->geoMechData() && geomCase->geoMechData()->femParts() )
// {
// RigFemPart* femPart = geomCase->geoMechData()->femParts()->part( 0 );
// return new RivFemIntersectionGrid( femPart );
// }
//}
RimEclipseView* eclipseView;
this->firstAncestorOrThisOfType( eclipseView );
if ( eclipseView )
{
RigMainGrid* grid = eclipseView->mainGrid();
return new RivEclipseIntersectionGrid( grid, eclipseView->currentActiveCellInfo(), true );
}
RimGeoMechView* geoView;
this->firstAncestorOrThisOfType( geoView );
if ( geoView && geoView->femParts() && geoView->femParts()->partCount() )
{
RigFemPart* femPart = geoView->femParts()->part( 0 );
return new RivFemIntersectionGrid( femPart );
}
return nullptr;
}