mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1971 WLP: Context command to create a new well log RFT curve from a selected well
This commit is contained in:
@@ -134,6 +134,37 @@ RifEclipseRftAddress RimWellLogRftCurve::rftAddress() const
|
||||
return RifEclipseRftAddress(m_wellName, m_timeStep, m_wellLogChannelName());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogRftCurve::setDefaultAddress(QString wellName)
|
||||
{
|
||||
RifReaderEclipseRft* reader = rftReader();
|
||||
if (!reader) return;
|
||||
|
||||
bool wellNameHasRftData = false;
|
||||
std::set<QString> wellNames = reader->wellNames();
|
||||
for (const QString& wellNameWithRft : wellNames)
|
||||
{
|
||||
if (wellName == wellNameWithRft)
|
||||
{
|
||||
wellNameHasRftData = true;
|
||||
m_wellName = wellName;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!wellNameHasRftData) return;
|
||||
|
||||
m_wellLogChannelName = RifEclipseRftAddress::PRESSURE;
|
||||
|
||||
std::vector<QDateTime> timeSteps = reader->availableTimeSteps(m_wellName, m_wellLogChannelName());
|
||||
if (timeSteps.size() > 0)
|
||||
{
|
||||
m_timeStep = timeSteps[0];
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user