#10663 WBS Plot: Import well log from CSV file.

Also compute SH_MK_MIN/EXP/MAX and FG_MK_MIN/EXP results.
This commit is contained in:
Kristian Bendiksen
2023-10-02 10:38:51 +02:00
parent e83b2e92f3
commit a8c719b289
45 changed files with 1361 additions and 259 deletions

View File

@@ -578,18 +578,18 @@ void RimWellPath::setNameNoUpdateOfExportName( const QString& name )
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RimWellLogLasFile*> RimWellPath::wellLogFiles() const
std::vector<RimWellLogFile*> RimWellPath::wellLogFiles() const
{
return std::vector<RimWellLogLasFile*>( m_wellLogFiles.begin(), m_wellLogFiles.end() );
return std::vector<RimWellLogFile*>( m_wellLogFiles.begin(), m_wellLogFiles.end() );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimWellLogLasFile* RimWellPath::firstWellLogFileMatchingChannelName( const QString& channelName ) const
RimWellLogFile* RimWellPath::firstWellLogFileMatchingChannelName( const QString& channelName ) const
{
std::vector<RimWellLogLasFile*> allWellLogFiles = wellLogFiles();
for ( RimWellLogLasFile* logFile : allWellLogFiles )
std::vector<RimWellLogFile*> allWellLogFiles = wellLogFiles();
for ( RimWellLogFile* logFile : allWellLogFiles )
{
std::vector<RimWellLogFileChannel*> channels = logFile->wellLogChannels();
for ( RimWellLogFileChannel* channel : channels )
@@ -895,12 +895,12 @@ double RimWellPath::datumElevation() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellPath::addWellLogFile( RimWellLogLasFile* logFileInfo )
void RimWellPath::addWellLogFile( RimWellLogFile* logFileInfo )
{
// Prevent the same file from being loaded more than once
auto itr = std::find_if( m_wellLogFiles.begin(),
m_wellLogFiles.end(),
[&]( const RimWellLogLasFile* file )
[&]( const RimWellLogFile* file )
{ return QString::compare( file->fileName(), logFileInfo->fileName(), Qt::CaseInsensitive ) == 0; } );
// Todo: Verify well name to ensure all well log files having the same well name
@@ -919,7 +919,7 @@ void RimWellPath::addWellLogFile( RimWellLogLasFile* logFileInfo )
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellPath::deleteWellLogFile( RimWellLogLasFile* logFileInfo )
void RimWellPath::deleteWellLogFile( RimWellLogFile* logFileInfo )
{
detachWellLogFile( logFileInfo );
delete logFileInfo;
@@ -928,7 +928,7 @@ void RimWellPath::deleteWellLogFile( RimWellLogLasFile* logFileInfo )
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellPath::detachWellLogFile( RimWellLogLasFile* logFileInfo )
void RimWellPath::detachWellLogFile( RimWellLogFile* logFileInfo )
{
auto pdmObject = dynamic_cast<caf::PdmObjectHandle*>( logFileInfo );
for ( size_t i = 0; i < m_wellLogFiles.size(); i++ )

View File

@@ -47,7 +47,7 @@ class RigWellPath;
class RigWellPathFormations;
class RimProject;
class RimWellLogLasFile;
class RimWellLogFile;
class RimFractureTemplateCollection;
class RimStimPlanModelCollection;
class RimFishbonesCollection;
@@ -61,6 +61,7 @@ class Rim3dWellLogCurveCollection;
class RimWellPathTieIn;
class RimMswCompletionParameters;
class RimWellIASettingsCollection;
class RimWellLogFile;
//==================================================================================================
///
@@ -104,11 +105,11 @@ public:
double uniqueStartMD() const;
double uniqueEndMD() const;
void addWellLogFile( RimWellLogLasFile* logFileInfo );
void deleteWellLogFile( RimWellLogLasFile* logFileInfo );
void detachWellLogFile( RimWellLogLasFile* logFileInfo );
std::vector<RimWellLogLasFile*> wellLogFiles() const;
RimWellLogLasFile* firstWellLogFileMatchingChannelName( const QString& channelName ) const;
void addWellLogFile( RimWellLogFile* logFileInfo );
void deleteWellLogFile( RimWellLogFile* logFileInfo );
void detachWellLogFile( RimWellLogFile* logFileInfo );
std::vector<RimWellLogFile*> wellLogFiles() const;
RimWellLogFile* firstWellLogFileMatchingChannelName( const QString& channelName ) const;
void setFormationsGeometry( cvf::ref<RigWellPathFormations> wellPathFormations );
bool readWellPathFormationsFile( QString* errorMessage, RifWellPathFormationsImporter* wellPathFormationsImporter );
@@ -209,7 +210,7 @@ private:
caf::PdmField<double> m_wellPathRadiusScaleFactor;
caf::PdmField<cvf::Color3f> m_wellPathColor;
caf::PdmChildArrayField<RimWellLogLasFile*> m_wellLogFiles;
caf::PdmChildArrayField<RimWellLogFile*> m_wellLogFiles;
caf::PdmChildField<Rim3dWellLogCurveCollection*> m_3dWellLogCurves;
caf::PdmChildField<RimWellPathCompletionSettings*> m_completionSettings;
caf::PdmChildField<RimWellPathCompletions*> m_completions;

View File

@@ -169,7 +169,7 @@ void RimWellPathCollection::loadDataAndUpdate()
if ( wellPath )
{
for ( RimWellLogLasFile* const wellLogFile : wellPath->wellLogFiles() )
for ( RimWellLogFile* const wellLogFile : wellPath->wellLogFiles() )
{
if ( wellLogFile )
{
@@ -386,6 +386,16 @@ std::vector<RimWellLogLasFile*> RimWellPathCollection::addWellLogs( const QStrin
return logFileInfos;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellPathCollection::addWellLog( RimWellLogFile* wellLogFile, RimWellPath* wellPath )
{
wellPath->addWellLogFile( wellLogFile );
sortWellsByName();
updateAllRequiredEditors();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -44,6 +44,7 @@ class RimFileWellPath;
class RimEclipseView;
class RimProject;
class RimWellLogLasFile;
class RimWellLogFile;
class RimWellPath;
class RifWellPathFormationsImporter;
class RimWellMeasurementCollection;
@@ -116,6 +117,7 @@ public:
std::vector<RimWellLogLasFile*> addWellLogs( const QStringList& filePaths, QStringList* errorMessages );
void addWellPathFormations( const QStringList& filePaths );
void addWellLog( RimWellLogFile* wellLogFile, RimWellPath* wellPath );
void scheduleRedrawAffectedViews();