2017-10-04 07:59:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2017 Statoil ASA
|
2019-03-12 03:13:48 -05:00
|
|
|
//
|
2017-10-04 07:59:38 -05:00
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
2019-03-12 03:13:48 -05:00
|
|
|
//
|
2017-10-04 07:59:38 -05:00
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
2019-03-12 03:13:48 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2017-10-04 07:59:38 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "RifEclipseRftAddress.h"
|
|
|
|
|
2017-10-05 06:49:49 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-03-12 03:13:48 -05:00
|
|
|
///
|
2017-10-05 06:49:49 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2022-08-16 05:40:25 -05:00
|
|
|
RifEclipseRftAddress::RifEclipseRftAddress( const QString& wellName,
|
|
|
|
const QDateTime& timeStep,
|
|
|
|
RftWellLogChannelType wellLogChannelName,
|
|
|
|
const QString& segmentResultName,
|
|
|
|
int segmentBranchIndex,
|
|
|
|
RiaDefines::RftBranchType segmentBranchType )
|
2019-09-06 03:40:57 -05:00
|
|
|
: m_wellName( wellName )
|
2022-02-23 06:57:02 -06:00
|
|
|
, m_timeStep( timeStep )
|
2019-09-06 03:40:57 -05:00
|
|
|
, m_wellLogChannel( wellLogChannelName )
|
2022-06-16 06:55:42 -05:00
|
|
|
, m_segmentResultName( segmentResultName )
|
2022-08-16 05:40:25 -05:00
|
|
|
, m_segmentBranchIndex( segmentBranchIndex )
|
|
|
|
, m_segmentBranchType( segmentBranchType )
|
2017-10-05 06:49:49 -05:00
|
|
|
{
|
2022-02-23 06:57:02 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2022-06-16 06:55:42 -05:00
|
|
|
RifEclipseRftAddress RifEclipseRftAddress::createAddress( const QString& wellName,
|
|
|
|
const QDateTime& timeStep,
|
|
|
|
RftWellLogChannelType wellLogChannel )
|
2022-02-23 06:57:02 -06:00
|
|
|
{
|
2022-06-16 06:55:42 -05:00
|
|
|
auto segmentResultName = "";
|
|
|
|
auto segmentBranchNumber = -1;
|
2022-08-16 05:40:25 -05:00
|
|
|
auto adr = RifEclipseRftAddress( wellName,
|
|
|
|
timeStep,
|
|
|
|
wellLogChannel,
|
|
|
|
segmentResultName,
|
|
|
|
segmentBranchNumber,
|
|
|
|
RiaDefines::RftBranchType::RFT_UNKNOWN );
|
|
|
|
|
|
|
|
return adr;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RifEclipseRftAddress RifEclipseRftAddress::createBranchSegmentAddress( const QString& wellName,
|
|
|
|
const QDateTime& dateTime,
|
|
|
|
const QString& resultName,
|
|
|
|
int segmentBranchIndex,
|
|
|
|
RiaDefines::RftBranchType segmentBranchType )
|
|
|
|
{
|
|
|
|
auto adr = RifEclipseRftAddress( wellName,
|
|
|
|
dateTime,
|
|
|
|
RifEclipseRftAddress::RftWellLogChannelType::SEGMENT_VALUES,
|
|
|
|
resultName,
|
|
|
|
segmentBranchIndex,
|
|
|
|
segmentBranchType );
|
2022-02-23 06:57:02 -06:00
|
|
|
|
|
|
|
return adr;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2022-06-16 06:55:42 -05:00
|
|
|
RifEclipseRftAddress RifEclipseRftAddress::createSegmentAddress( const QString& wellName,
|
|
|
|
const QDateTime& dateTime,
|
2022-08-16 05:40:25 -05:00
|
|
|
const QString& resultName )
|
2022-02-23 06:57:02 -06:00
|
|
|
{
|
2022-06-16 06:55:42 -05:00
|
|
|
auto adr = RifEclipseRftAddress( wellName,
|
|
|
|
dateTime,
|
|
|
|
RifEclipseRftAddress::RftWellLogChannelType::SEGMENT_VALUES,
|
|
|
|
resultName,
|
2022-08-16 05:40:25 -05:00
|
|
|
-1,
|
|
|
|
RiaDefines::RftBranchType::RFT_UNKNOWN );
|
2022-06-16 06:55:42 -05:00
|
|
|
|
|
|
|
return adr;
|
2022-02-23 06:57:02 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
QString RifEclipseRftAddress::segmentResultName() const
|
|
|
|
{
|
|
|
|
return m_segmentResultName;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2022-08-16 05:40:25 -05:00
|
|
|
int RifEclipseRftAddress::segmentBranchIndex() const
|
|
|
|
{
|
|
|
|
return m_segmentBranchIndex;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RiaDefines::RftBranchType RifEclipseRftAddress::segmentBranchType() const
|
2022-02-23 06:57:02 -06:00
|
|
|
{
|
2022-08-16 05:40:25 -05:00
|
|
|
return m_segmentBranchType;
|
2022-02-23 06:57:02 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
const QString& RifEclipseRftAddress::wellName() const
|
|
|
|
{
|
|
|
|
return m_wellName;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
QDateTime RifEclipseRftAddress::timeStep() const
|
|
|
|
{
|
|
|
|
return m_timeStep;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
const RifEclipseRftAddress::RifEclipseRftAddress::RftWellLogChannelType& RifEclipseRftAddress::wellLogChannel() const
|
|
|
|
{
|
|
|
|
return m_wellLogChannel;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
std::set<RifEclipseRftAddress::RftWellLogChannelType> RifEclipseRftAddress::rftPlotChannelTypes()
|
|
|
|
{
|
|
|
|
return { RifEclipseRftAddress::RftWellLogChannelType::PRESSURE,
|
|
|
|
RifEclipseRftAddress::RftWellLogChannelType::PRESSURE_ERROR,
|
|
|
|
RifEclipseRftAddress::RftWellLogChannelType::PRESSURE_MEAN,
|
|
|
|
RifEclipseRftAddress::RftWellLogChannelType::PRESSURE_P10,
|
|
|
|
RifEclipseRftAddress::RftWellLogChannelType::PRESSURE_P50,
|
|
|
|
RifEclipseRftAddress::RftWellLogChannelType::PRESSURE_P90 };
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
std::set<RifEclipseRftAddress::RifEclipseRftAddress::RftWellLogChannelType> RifEclipseRftAddress::pltPlotChannelTypes()
|
|
|
|
{
|
|
|
|
return { RifEclipseRftAddress::RftWellLogChannelType::ORAT,
|
|
|
|
RifEclipseRftAddress::RftWellLogChannelType::WRAT,
|
|
|
|
RifEclipseRftAddress::RftWellLogChannelType::GRAT };
|
2017-10-05 06:49:49 -05:00
|
|
|
}
|
|
|
|
|
2017-10-04 07:59:38 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-03-12 03:13:48 -05:00
|
|
|
///
|
2017-10-04 07:59:38 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
bool operator==( const RifEclipseRftAddress& first, const RifEclipseRftAddress& second )
|
2017-10-04 07:59:38 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( first.wellName() != second.wellName() ) return false;
|
|
|
|
if ( first.timeStep() != second.timeStep() ) return false;
|
|
|
|
if ( first.wellLogChannel() != second.wellLogChannel() ) return false;
|
2022-02-23 06:57:02 -06:00
|
|
|
if ( first.segmentResultName() != second.segmentResultName() ) return false;
|
2022-08-16 05:40:25 -05:00
|
|
|
if ( first.segmentBranchIndex() != second.segmentBranchIndex() ) return false;
|
2019-03-12 03:13:48 -05:00
|
|
|
|
2017-10-04 07:59:38 -05:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-03-12 03:13:48 -05:00
|
|
|
///
|
2017-10-04 07:59:38 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
bool operator<( const RifEclipseRftAddress& first, const RifEclipseRftAddress& second )
|
2017-10-04 07:59:38 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( first.wellName() != second.wellName() ) return ( first.wellName() < second.wellName() );
|
|
|
|
if ( first.timeStep() != second.timeStep() ) return ( first.timeStep() < second.timeStep() );
|
|
|
|
if ( first.wellLogChannel() != second.wellLogChannel() )
|
|
|
|
return ( first.wellLogChannel() < second.wellLogChannel() );
|
2022-02-23 06:57:02 -06:00
|
|
|
if ( first.segmentResultName() != second.segmentResultName() )
|
|
|
|
return first.segmentResultName() < second.segmentResultName();
|
2022-08-16 05:40:25 -05:00
|
|
|
if ( first.segmentBranchIndex() != second.segmentBranchIndex() )
|
|
|
|
return first.segmentBranchIndex() < second.segmentBranchIndex();
|
2017-10-04 07:59:38 -05:00
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|