mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -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 "RimColorLegend.h"
|
||||||
#include "RimColorLegendCollection.h"
|
#include "RimColorLegendCollection.h"
|
||||||
#include "RimEclipseCase.h"
|
#include "RimEclipseCase.h"
|
||||||
|
#include "RimEclipseResultDefinition.h"
|
||||||
#include "RimEclipseView.h"
|
#include "RimEclipseView.h"
|
||||||
#include "RimElasticPropertiesCurve.h"
|
#include "RimElasticPropertiesCurve.h"
|
||||||
#include "RimFaciesProperties.h"
|
#include "RimFaciesProperties.h"
|
||||||
@ -260,16 +261,6 @@ void RicNewFractureModelPlotFeature::createFaciesTrack( RimFractureModelPlot* pl
|
|||||||
RimFractureModel* fractureModel,
|
RimFractureModel* fractureModel,
|
||||||
RimEclipseCase* eclipseCase )
|
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();
|
RimFractureModelTemplate* fractureModelTemplate = fractureModel->fractureModelTemplate();
|
||||||
if ( !fractureModelTemplate )
|
if ( !fractureModelTemplate )
|
||||||
{
|
{
|
||||||
@ -282,6 +273,20 @@ void RicNewFractureModelPlotFeature::createFaciesTrack( RimFractureModelPlot* pl
|
|||||||
return;
|
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();
|
RimColorLegend* faciesColors = faciesProperties->colorLegend();
|
||||||
if ( faciesColors )
|
if ( faciesColors )
|
||||||
{
|
{
|
||||||
@ -297,8 +302,8 @@ void RicNewFractureModelPlotFeature::createFaciesTrack( RimFractureModelPlot* pl
|
|||||||
curve->setFractureModel( fractureModel );
|
curve->setFractureModel( fractureModel );
|
||||||
curve->setCurveProperty( RiaDefines::CurveProperty::FACIES );
|
curve->setCurveProperty( RiaDefines::CurveProperty::FACIES );
|
||||||
curve->setCase( eclipseCase );
|
curve->setCase( eclipseCase );
|
||||||
curve->setEclipseResultCategory( RiaDefines::ResultCatType::INPUT_PROPERTY );
|
curve->setEclipseResultCategory( faciesDefinition->resultType() );
|
||||||
curve->setEclipseResultVariable( defaultProperty );
|
curve->setEclipseResultVariable( faciesDefinition->resultVariable() );
|
||||||
curve->setColor( colors.cycledColor3f( 0 ) );
|
curve->setColor( colors.cycledColor3f( 0 ) );
|
||||||
curve->setLineStyle( RiuQwtPlotCurve::STYLE_SOLID );
|
curve->setLineStyle( RiuQwtPlotCurve::STYLE_SOLID );
|
||||||
curve->setLineThickness( 2 );
|
curve->setLineThickness( 2 );
|
||||||
@ -326,8 +331,6 @@ void RicNewFractureModelPlotFeature::createLayersTrack( RimFractureModelPlot* pl
|
|||||||
RimFractureModel* fractureModel,
|
RimFractureModel* fractureModel,
|
||||||
RimEclipseCase* eclipseCase )
|
RimEclipseCase* eclipseCase )
|
||||||
{
|
{
|
||||||
QString defaultProperty = "OPERNUM_1";
|
|
||||||
|
|
||||||
RimWellLogTrack* faciesTrack = RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack( false, "Layers", plot );
|
RimWellLogTrack* faciesTrack = RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack( false, "Layers", plot );
|
||||||
faciesTrack->setFormationWellPath( fractureModel->thicknessDirectionWellPath() );
|
faciesTrack->setFormationWellPath( fractureModel->thicknessDirectionWellPath() );
|
||||||
faciesTrack->setFormationCase( eclipseCase );
|
faciesTrack->setFormationCase( eclipseCase );
|
||||||
|
@ -166,9 +166,25 @@ void RimElasticPropertiesCurve::performDataExtraction( bool* isUsingPseudoLength
|
|||||||
std::vector<std::pair<double, double>> yValues;
|
std::vector<std::pair<double, double>> yValues;
|
||||||
std::vector<QString> formationNamesVector = RimWellLogTrack::formationNamesVector( eclipseCase );
|
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
|
// Extract facies data
|
||||||
m_eclipseResultDefinition->setResultVariable( "OPERNUM_1" );
|
m_eclipseResultDefinition->setResultVariable( faciesDefinition->resultVariable() );
|
||||||
m_eclipseResultDefinition->setResultType( RiaDefines::ResultCatType::INPUT_PROPERTY );
|
m_eclipseResultDefinition->setResultType( faciesDefinition->resultType() );
|
||||||
m_eclipseResultDefinition->setEclipseCase( eclipseCase );
|
m_eclipseResultDefinition->setEclipseCase( eclipseCase );
|
||||||
m_eclipseResultDefinition->loadResult();
|
m_eclipseResultDefinition->loadResult();
|
||||||
|
|
||||||
@ -204,20 +220,6 @@ void RimElasticPropertiesCurve::performDataExtraction( bool* isUsingPseudoLength
|
|||||||
return;
|
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();
|
RimColorLegend* colorLegend = faciesProperties->colorLegend();
|
||||||
if ( !colorLegend )
|
if ( !colorLegend )
|
||||||
{
|
{
|
||||||
|
@ -218,3 +218,11 @@ void RimFaciesProperties::setColorLegend( RimColorLegend* colorLegend )
|
|||||||
{
|
{
|
||||||
m_colorLegend = colorLegend;
|
m_colorLegend = colorLegend;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
const RimEclipseResultDefinition* RimFaciesProperties::faciesDefinition() const
|
||||||
|
{
|
||||||
|
return m_faciesDefinition.value();
|
||||||
|
}
|
||||||
|
@ -53,6 +53,8 @@ public:
|
|||||||
RimColorLegend* colorLegend() const;
|
RimColorLegend* colorLegend() const;
|
||||||
void setColorLegend( RimColorLegend* colorLegend );
|
void setColorLegend( RimColorLegend* colorLegend );
|
||||||
|
|
||||||
|
const RimEclipseResultDefinition* faciesDefinition() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||||
QString uiConfigName,
|
QString uiConfigName,
|
||||||
|
Loading…
Reference in New Issue
Block a user