mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7716 Ensemble Well Logs: load data when project is opened.
This commit is contained in:
parent
e6043fa329
commit
4bd2a7b6fd
@ -46,6 +46,7 @@
|
||||
#include "RimCompletionTemplateCollection.h"
|
||||
#include "RimEclipseCaseCollection.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimEnsembleWellLogsCollection.h"
|
||||
#include "RimFormationNamesCollection.h"
|
||||
#include "RimFractureTemplateCollection.h"
|
||||
#include "RimGeoMechCase.h"
|
||||
@ -499,6 +500,7 @@ bool RiaApplication::loadProject( const QString& projectFileName,
|
||||
}
|
||||
|
||||
oilField->wellPathCollection->loadDataAndUpdate();
|
||||
oilField->ensembleWellLogsCollection->loadDataAndUpdate();
|
||||
}
|
||||
|
||||
{
|
||||
|
@ -831,7 +831,15 @@ void RimEnsembleWellLogCurveSet::updateEnsembleCurves( const std::vector<RimWell
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEnsembleWellLogCurveSet::updateStatisticsCurves( const std::vector<RimWellLogFile*>& sumCases )
|
||||
void RimEnsembleWellLogCurveSet::updateStatistics()
|
||||
{
|
||||
updateStatistics( std::vector<RimWellLogFile*>() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEnsembleWellLogCurveSet::updateStatistics( const std::vector<RimWellLogFile*>& sumCases )
|
||||
{
|
||||
RimEnsembleWellLogs* ensembleWellLogs = m_ensembleWellLogs;
|
||||
QString wellLogChannelName = m_wellLogChannelName();
|
||||
@ -839,19 +847,25 @@ void RimEnsembleWellLogCurveSet::updateStatisticsCurves( const std::vector<RimWe
|
||||
if ( !isCurvesVisible() || m_disableStatisticCurves || !ensembleWellLogs || wellLogChannelName == "None" ) return;
|
||||
|
||||
// Calculate
|
||||
std::vector<RimWellLogFile*> wellLogFiles = sumCases;
|
||||
if ( wellLogFiles.empty() )
|
||||
{
|
||||
std::vector<RimWellLogFile*> wellLogFiles = sumCases;
|
||||
if ( wellLogFiles.empty() )
|
||||
{
|
||||
if ( m_statistics->basedOnFilteredCases() )
|
||||
wellLogFiles = filterEnsembleCases( ensembleWellLogs->wellLogFiles() );
|
||||
else
|
||||
wellLogFiles = ensembleWellLogs->wellLogFiles();
|
||||
}
|
||||
|
||||
m_ensembleWellLogStatistics->calculate( wellLogFiles, wellLogChannelName );
|
||||
if ( m_statistics->basedOnFilteredCases() )
|
||||
wellLogFiles = filterEnsembleCases( ensembleWellLogs->wellLogFiles() );
|
||||
else
|
||||
wellLogFiles = ensembleWellLogs->wellLogFiles();
|
||||
}
|
||||
|
||||
m_ensembleWellLogStatistics->calculate( wellLogFiles, wellLogChannelName );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEnsembleWellLogCurveSet::updateStatisticsCurves( const std::vector<RimWellLogFile*>& sumCases )
|
||||
{
|
||||
updateStatistics( sumCases );
|
||||
|
||||
RimWellLogPlot* plot = nullptr;
|
||||
firstAncestorOrThisOfType( plot );
|
||||
CVF_ASSERT( plot );
|
||||
|
@ -123,9 +123,12 @@ public:
|
||||
|
||||
const RimEnsembleWellLogStatistics* ensembleWellLogStatistics() const;
|
||||
|
||||
void updateStatistics();
|
||||
|
||||
private:
|
||||
void updateEnsembleCurves( const std::vector<RimWellLogFile*>& curves );
|
||||
void updateStatisticsCurves( const std::vector<RimWellLogFile*>& curves );
|
||||
void updateStatistics( const std::vector<RimWellLogFile*>& sumCases );
|
||||
|
||||
caf::PdmFieldHandle* userDescriptionField() override;
|
||||
caf::PdmFieldHandle* objectToggleField() override;
|
||||
|
@ -90,6 +90,10 @@ void RimEnsembleWellLogStatistics::calculate( const std::vector<RimWellLogFile*>
|
||||
curveMerger.addCurveData( depths, values );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::error( errorMessage );
|
||||
}
|
||||
}
|
||||
curveMerger.computeInterpolatedValues( true );
|
||||
|
||||
|
@ -99,6 +99,8 @@ void RimEnsembleWellLogStatisticsCurve::performDataExtraction( bool* isUsingPseu
|
||||
const RimEnsembleWellLogStatistics* ensembleWellLogStatistics =
|
||||
m_ensembleWellLogCurveSet->ensembleWellLogStatistics();
|
||||
|
||||
m_ensembleWellLogCurveSet->updateStatistics();
|
||||
|
||||
RiaDefines::DepthUnitType depthUnit = ensembleWellLogStatistics->depthUnitType();
|
||||
QString xUnits = ensembleWellLogStatistics->logChannelUnitString();
|
||||
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
#include "RimEnsembleWellLogs.h"
|
||||
|
||||
#include "RiaLogging.h"
|
||||
|
||||
#include "RimWellLogFile.h"
|
||||
|
||||
#include "cafPdmFieldScriptingCapability.h"
|
||||
@ -63,7 +65,14 @@ std::vector<RimWellLogFile*> RimEnsembleWellLogs::wellLogFiles() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimEnsembleWellLogs::hasEnsembleParameters() const
|
||||
void RimEnsembleWellLogs::loadDataAndUpdate()
|
||||
{
|
||||
return false;
|
||||
for ( auto& w : m_wellLogFiles )
|
||||
{
|
||||
QString errorMessage;
|
||||
if ( !w->readFile( &errorMessage ) )
|
||||
{
|
||||
RiaLogging::warning( errorMessage );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -38,10 +38,7 @@ public:
|
||||
|
||||
std::vector<RimWellLogFile*> wellLogFiles() const;
|
||||
|
||||
bool hasEnsembleParameters() const;
|
||||
|
||||
protected:
|
||||
void updateReferringCurveSets();
|
||||
void loadDataAndUpdate();
|
||||
|
||||
private:
|
||||
caf::PdmChildArrayField<RimWellLogFile*> m_wellLogFiles;
|
||||
|
@ -63,3 +63,14 @@ std::vector<RimEnsembleWellLogs*> RimEnsembleWellLogsCollection::ensembleWellLog
|
||||
}
|
||||
return ensembleWellLogs;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEnsembleWellLogsCollection::loadDataAndUpdate()
|
||||
{
|
||||
for ( const auto& e : m_ensembleWellLogs )
|
||||
{
|
||||
e->loadDataAndUpdate();
|
||||
}
|
||||
}
|
||||
|
@ -36,6 +36,7 @@ public:
|
||||
std::vector<RimEnsembleWellLogs*> ensembleWellLogs() const;
|
||||
|
||||
void addEnsembleWellLogs( RimEnsembleWellLogs* ensembleWellLogs );
|
||||
void loadDataAndUpdate();
|
||||
|
||||
private:
|
||||
caf::PdmChildArrayField<RimEnsembleWellLogs*> m_ensembleWellLogs;
|
||||
|
Loading…
Reference in New Issue
Block a user