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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 9 deletions

View File

@ -67,8 +67,6 @@
#include "RimMainPlotCollection.h"
#include "RimMudWeightWindowParameters.h"
#include "RimWellLogPlot.h"
#include "RimWellLogPlotCollection.h"
#include "Riu3DMainWindowTools.h"
@ -234,12 +232,6 @@ void RigFemPartResultsCollection::setActiveFormationNames( RigFormationNames* ac
{
m_activeFormationNamesData = activeFormationNames;
RimWellLogPlotCollection* plotCollection = RimMainPlotCollection::current()->wellLogPlotCollection();
for ( auto wellLogPlot : plotCollection->wellLogPlots() )
{
wellLogPlot->loadDataAndUpdate();
}
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() );
RigFemScalarResultFrames* scalarResults = findOrLoadScalarResult( partIndex, resVarAddr );
static std::vector<float> empty;
if ( scalarResults->frameCount( stepIndex ) == 0 ) return empty;
return scalarResults->frameData( stepIndex, frameIndex );
}

View File

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

View File

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