mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Support filtering by formation/polygon when calculating statistics (#12086)
* Support loading formation names when importing an ensemble * Enable support for formation filtering when calculating contour map * Add option to limit calculation area to a selection of polygons
This commit is contained in:
@@ -44,7 +44,10 @@
|
||||
#include "RigFlowDiagSolverInterface.h"
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
#include "Formations/RimFormationNames.h"
|
||||
#include "Formations/RimFormationTools.h"
|
||||
#include "RimDialogData.h"
|
||||
#include "RimEclipseCaseEnsemble.h"
|
||||
#include "RimEclipseCellColors.h"
|
||||
#include "RimEclipseInputProperty.h"
|
||||
#include "RimEclipseInputPropertyCollection.h"
|
||||
@@ -110,6 +113,21 @@ bool RimEclipseResultCase::openEclipseGridFile()
|
||||
return importGridAndResultMetaData( false );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseResultCase::initAfterRead()
|
||||
{
|
||||
RimEclipseCase::initAfterRead();
|
||||
|
||||
// handle special formations for ensembles
|
||||
if ( firstAncestorOrThisOfType<RimEclipseCaseEnsemble>() != nullptr )
|
||||
{
|
||||
auto folderName = RimFormationTools::formationFolderFromCaseFileName( m_caseFileName().path() );
|
||||
m_activeFormationNames = RimFormationTools::loadFormationNamesFromFolder( folderName );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -695,3 +713,30 @@ void RimEclipseResultCase::defineEditorAttribute( const caf::PdmFieldHandle* fie
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo> RimEclipseResultCase::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions )
|
||||
{
|
||||
// if this is part of an ensemble, use lyr file set during ensemble creating
|
||||
if ( fieldNeedingOptions == &m_activeFormationNames )
|
||||
{
|
||||
auto ensemble = firstAncestorOrThisOfType<RimEclipseCaseEnsemble>();
|
||||
if ( ensemble != nullptr )
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
if ( m_activeFormationNames() )
|
||||
{
|
||||
options.push_back( caf::PdmOptionItemInfo( m_activeFormationNames->fileNameWoPath(), m_activeFormationNames(), false ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
options.push_back( caf::PdmOptionItemInfo( "None", nullptr ) );
|
||||
}
|
||||
return options;
|
||||
}
|
||||
}
|
||||
|
||||
return RimEclipseCase::calculateValueOptions( fieldNeedingOptions );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user