Fix issues related to well bore stability plots

* Check if data is present
* Move plot update to geomech case
* Return empty vector if no data is present
This commit is contained in:
Magne Sjaastad
2023-01-23 12:38:55 +01:00
committed by GitHub
parent 56dd33e762
commit ab165b0d72
3 changed files with 8 additions and 9 deletions

View File

@@ -67,8 +67,6 @@
#include "RimMainPlotCollection.h" #include "RimMainPlotCollection.h"
#include "RimMudWeightWindowParameters.h" #include "RimMudWeightWindowParameters.h"
#include "RimWellLogPlot.h"
#include "RimWellLogPlotCollection.h"
#include "Riu3DMainWindowTools.h" #include "Riu3DMainWindowTools.h"
@@ -234,12 +232,6 @@ void RigFemPartResultsCollection::setActiveFormationNames( RigFormationNames* ac
{ {
m_activeFormationNamesData = activeFormationNames; m_activeFormationNamesData = activeFormationNames;
RimWellLogPlotCollection* plotCollection = RimMainPlotCollection::current()->wellLogPlotCollection();
for ( auto wellLogPlot : plotCollection->wellLogPlots() )
{
wellLogPlot->loadDataAndUpdate();
}
this->deleteResult( RigFemResultAddress( RIG_FORMATION_NAMES, "Active Formation Names", "" ) ); this->deleteResult( RigFemResultAddress( RIG_FORMATION_NAMES, "Active Formation Names", "" ) );
} }
@@ -1122,6 +1114,10 @@ const std::vector<float>& RigFemPartResultsCollection::resultValues( const RigFe
CVF_ASSERT( resVarAddr.isValid() ); CVF_ASSERT( resVarAddr.isValid() );
RigFemScalarResultFrames* scalarResults = findOrLoadScalarResult( partIndex, resVarAddr ); RigFemScalarResultFrames* scalarResults = findOrLoadScalarResult( partIndex, resVarAddr );
static std::vector<float> empty;
if ( scalarResults->frameCount( stepIndex ) == 0 ) return empty;
return scalarResults->frameData( stepIndex, frameIndex ); return scalarResults->frameData( stepIndex, frameIndex );
} }

View File

@@ -924,6 +924,9 @@ void RimGeoMechCase::updateFormationNamesData()
rigCaseData->femPartResults()->setActiveFormationNames( nullptr ); rigCaseData->femPartResults()->setActiveFormationNames( nullptr );
} }
RimWellLogPlotCollection* plotCollection = RimMainPlotCollection::current()->wellLogPlotCollection();
plotCollection->loadDataAndUpdateAllPlots();
std::vector<Rim3dView*> views = this->views(); std::vector<Rim3dView*> views = this->views();
for ( Rim3dView* view : views ) for ( Rim3dView* view : views )
{ {

View File

@@ -444,7 +444,7 @@ void RimWellLogExtractionCurve::extractData( bool* isUsingPseudoLength,
{ {
curveData = extractEclipseData( eclipseCase, isUsingPseudoLength ); curveData = extractEclipseData( eclipseCase, isUsingPseudoLength );
} }
else if ( geomCase ) else if ( geomCase && geomCase->geoMechData() )
{ {
curveData = extractGeomData( geomCase, isUsingPseudoLength, performDataSmoothing, smoothingThreshold ); curveData = extractGeomData( geomCase, isUsingPseudoLength, performDataSmoothing, smoothingThreshold );
} }