mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-04 12:40:58 -06:00
#6234 Use facies definition from template (no more OPERNUM_1 magic)
This commit is contained in:
parent
a7b2a28df7
commit
48bc8ce117
@ -31,6 +31,7 @@
|
||||
#include "RimColorLegend.h"
|
||||
#include "RimColorLegendCollection.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseResultDefinition.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimElasticPropertiesCurve.h"
|
||||
#include "RimFaciesProperties.h"
|
||||
@ -260,16 +261,6 @@ void RicNewFractureModelPlotFeature::createFaciesTrack( RimFractureModelPlot* pl
|
||||
RimFractureModel* fractureModel,
|
||||
RimEclipseCase* eclipseCase )
|
||||
{
|
||||
QString defaultProperty = "OPERNUM_1";
|
||||
|
||||
RimWellLogTrack* faciesTrack = RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack( false, "Facies", plot );
|
||||
faciesTrack->setFormationWellPath( fractureModel->thicknessDirectionWellPath() );
|
||||
faciesTrack->setFormationCase( eclipseCase );
|
||||
faciesTrack->setAnnotationType( RiuPlotAnnotationTool::RegionAnnotationType::RESULT_PROPERTY_ANNOTATIONS );
|
||||
faciesTrack->setRegionPropertyResultType( RiaDefines::ResultCatType::INPUT_PROPERTY, defaultProperty );
|
||||
faciesTrack->setOverburdenHeight( fractureModel->overburdenHeight() );
|
||||
faciesTrack->setUnderburdenHeight( fractureModel->underburdenHeight() );
|
||||
|
||||
RimFractureModelTemplate* fractureModelTemplate = fractureModel->fractureModelTemplate();
|
||||
if ( !fractureModelTemplate )
|
||||
{
|
||||
@ -282,6 +273,20 @@ void RicNewFractureModelPlotFeature::createFaciesTrack( RimFractureModelPlot* pl
|
||||
return;
|
||||
}
|
||||
|
||||
const RimEclipseResultDefinition* faciesDefinition = faciesProperties->faciesDefinition();
|
||||
if ( !faciesDefinition )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
RimWellLogTrack* faciesTrack = RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack( false, "Facies", plot );
|
||||
faciesTrack->setFormationWellPath( fractureModel->thicknessDirectionWellPath() );
|
||||
faciesTrack->setFormationCase( eclipseCase );
|
||||
faciesTrack->setAnnotationType( RiuPlotAnnotationTool::RegionAnnotationType::RESULT_PROPERTY_ANNOTATIONS );
|
||||
faciesTrack->setRegionPropertyResultType( faciesDefinition->resultType(), faciesDefinition->resultVariable() );
|
||||
faciesTrack->setOverburdenHeight( fractureModel->overburdenHeight() );
|
||||
faciesTrack->setUnderburdenHeight( fractureModel->underburdenHeight() );
|
||||
|
||||
RimColorLegend* faciesColors = faciesProperties->colorLegend();
|
||||
if ( faciesColors )
|
||||
{
|
||||
@ -297,8 +302,8 @@ void RicNewFractureModelPlotFeature::createFaciesTrack( RimFractureModelPlot* pl
|
||||
curve->setFractureModel( fractureModel );
|
||||
curve->setCurveProperty( RiaDefines::CurveProperty::FACIES );
|
||||
curve->setCase( eclipseCase );
|
||||
curve->setEclipseResultCategory( RiaDefines::ResultCatType::INPUT_PROPERTY );
|
||||
curve->setEclipseResultVariable( defaultProperty );
|
||||
curve->setEclipseResultCategory( faciesDefinition->resultType() );
|
||||
curve->setEclipseResultVariable( faciesDefinition->resultVariable() );
|
||||
curve->setColor( colors.cycledColor3f( 0 ) );
|
||||
curve->setLineStyle( RiuQwtPlotCurve::STYLE_SOLID );
|
||||
curve->setLineThickness( 2 );
|
||||
@ -326,8 +331,6 @@ void RicNewFractureModelPlotFeature::createLayersTrack( RimFractureModelPlot* pl
|
||||
RimFractureModel* fractureModel,
|
||||
RimEclipseCase* eclipseCase )
|
||||
{
|
||||
QString defaultProperty = "OPERNUM_1";
|
||||
|
||||
RimWellLogTrack* faciesTrack = RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack( false, "Layers", plot );
|
||||
faciesTrack->setFormationWellPath( fractureModel->thicknessDirectionWellPath() );
|
||||
faciesTrack->setFormationCase( eclipseCase );
|
||||
|
@ -166,9 +166,25 @@ void RimElasticPropertiesCurve::performDataExtraction( bool* isUsingPseudoLength
|
||||
std::vector<std::pair<double, double>> yValues;
|
||||
std::vector<QString> formationNamesVector = RimWellLogTrack::formationNamesVector( eclipseCase );
|
||||
|
||||
RimFractureModelTemplate* fractureModelTemplate = m_fractureModel->fractureModelTemplate();
|
||||
if ( !fractureModelTemplate )
|
||||
{
|
||||
RiaLogging::error( QString( "No fracture model template found" ) );
|
||||
return;
|
||||
}
|
||||
|
||||
RimFaciesProperties* faciesProperties = fractureModelTemplate->faciesProperties();
|
||||
if ( !faciesProperties )
|
||||
{
|
||||
RiaLogging::error( QString( "No facies properties found when extracting elastic properties." ) );
|
||||
return;
|
||||
}
|
||||
|
||||
const RimEclipseResultDefinition* faciesDefinition = faciesProperties->faciesDefinition();
|
||||
|
||||
// Extract facies data
|
||||
m_eclipseResultDefinition->setResultVariable( "OPERNUM_1" );
|
||||
m_eclipseResultDefinition->setResultType( RiaDefines::ResultCatType::INPUT_PROPERTY );
|
||||
m_eclipseResultDefinition->setResultVariable( faciesDefinition->resultVariable() );
|
||||
m_eclipseResultDefinition->setResultType( faciesDefinition->resultType() );
|
||||
m_eclipseResultDefinition->setEclipseCase( eclipseCase );
|
||||
m_eclipseResultDefinition->loadResult();
|
||||
|
||||
@ -204,20 +220,6 @@ void RimElasticPropertiesCurve::performDataExtraction( bool* isUsingPseudoLength
|
||||
return;
|
||||
}
|
||||
|
||||
RimFractureModelTemplate* fractureModelTemplate = m_fractureModel->fractureModelTemplate();
|
||||
if ( !fractureModelTemplate )
|
||||
{
|
||||
RiaLogging::error( QString( "No fracture model template found" ) );
|
||||
return;
|
||||
}
|
||||
|
||||
RimFaciesProperties* faciesProperties = fractureModelTemplate->faciesProperties();
|
||||
if ( !faciesProperties )
|
||||
{
|
||||
RiaLogging::error( QString( "No facies properties found when extracting elastic properties." ) );
|
||||
return;
|
||||
}
|
||||
|
||||
RimColorLegend* colorLegend = faciesProperties->colorLegend();
|
||||
if ( !colorLegend )
|
||||
{
|
||||
|
@ -218,3 +218,11 @@ void RimFaciesProperties::setColorLegend( RimColorLegend* colorLegend )
|
||||
{
|
||||
m_colorLegend = colorLegend;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RimEclipseResultDefinition* RimFaciesProperties::faciesDefinition() const
|
||||
{
|
||||
return m_faciesDefinition.value();
|
||||
}
|
||||
|
@ -53,6 +53,8 @@ public:
|
||||
RimColorLegend* colorLegend() const;
|
||||
void setColorLegend( RimColorLegend* colorLegend );
|
||||
|
||||
const RimEclipseResultDefinition* faciesDefinition() const;
|
||||
|
||||
protected:
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
|
Loading…
Reference in New Issue
Block a user