#3014 and #3022 Well Bore Stability: LAS and element table input and cleaned up extraction code.

This commit is contained in:
Gaute Lindkvist
2018-09-03 11:24:35 +02:00
parent b4e2a58327
commit 4c84bbb8a3
11 changed files with 392 additions and 59 deletions

View File

@@ -259,6 +259,33 @@ void RimWellLogFile::updateFilePathsFromProjectPath(const QString& newProjectPat
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<std::pair<double, double>> RimWellLogFile::findMdAndChannelValuesForWellPath(const RimWellPath* wellPath, const QString& channelName)
{
CVF_ASSERT(wellPath);
std::vector<RimWellLogFile*> wellLogFiles;
wellPath->descendantsIncludingThisOfType(wellLogFiles);
for (RimWellLogFile* wellLogFile : wellLogFiles)
{
RigWellLogFile* fileData = wellLogFile->wellLogFileData();
std::vector<double> channelValues = fileData->values(channelName);
if (!channelValues.empty())
{
std::vector<double> depthValues = fileData->depthValues();
CVF_ASSERT(depthValues.size() == channelValues.size());
std::vector<std::pair<double, double>> depthValuePairs;
for (size_t i = 0; i < depthValues.size(); ++i)
{
depthValuePairs.push_back(std::make_pair(depthValues[i], channelValues[i]));
}
return depthValuePairs;
}
}
return std::vector<std::pair<double, double>>();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------