-
Notifications
You must be signed in to change notification settings - Fork 102
Expand file tree
/
Copy pathRifEclipseRftAddress.cpp
More file actions
184 lines (164 loc) · 8.74 KB
/
Copy pathRifEclipseRftAddress.cpp
File metadata and controls
184 lines (164 loc) · 8.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2017 Statoil ASA
//
// 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.
//
// 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.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#include "RifEclipseRftAddress.h"
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RifEclipseRftAddress::RifEclipseRftAddress( const QString& wellName,
const QDateTime& timeStep,
RftWellLogChannelType wellLogChannelName,
const QString& segmentResultName,
int segmentBranchIndex,
RiaDefines::RftBranchType segmentBranchType )
: m_wellName( wellName )
, m_timeStep( timeStep )
, m_wellLogChannel( wellLogChannelName )
, m_segmentResultName( segmentResultName )
, m_segmentBranchIndex( segmentBranchIndex )
, m_segmentBranchType( segmentBranchType )
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RifEclipseRftAddress
RifEclipseRftAddress::createAddress( const QString& wellName, const QDateTime& timeStep, RftWellLogChannelType wellLogChannel )
{
auto segmentResultName = "";
auto segmentBranchNumber = -1;
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 );
return adr;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RifEclipseRftAddress RifEclipseRftAddress::createSegmentAddress( const QString& wellName, const QDateTime& dateTime, const QString& resultName )
{
auto adr = RifEclipseRftAddress( wellName,
dateTime,
RifEclipseRftAddress::RftWellLogChannelType::SEGMENT_VALUES,
resultName,
-1,
RiaDefines::RftBranchType::RFT_UNKNOWN );
return adr;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RifEclipseRftAddress::segmentResultName() const
{
return m_segmentResultName;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
int RifEclipseRftAddress::segmentBranchIndex() const
{
return m_segmentBranchIndex;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiaDefines::RftBranchType RifEclipseRftAddress::segmentBranchType() const
{
return m_segmentBranchType;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
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 };
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool operator==( const RifEclipseRftAddress& first, const RifEclipseRftAddress& second )
{
if ( first.wellName() != second.wellName() ) return false;
if ( first.timeStep() != second.timeStep() ) return false;
if ( first.wellLogChannel() != second.wellLogChannel() ) return false;
if ( first.segmentResultName() != second.segmentResultName() ) return false;
if ( first.segmentBranchIndex() != second.segmentBranchIndex() ) return false;
return true;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool operator<( const RifEclipseRftAddress& first, const RifEclipseRftAddress& second )
{
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() );
if ( first.segmentResultName() != second.segmentResultName() ) return first.segmentResultName() < second.segmentResultName();
if ( first.segmentBranchIndex() != second.segmentBranchIndex() ) return first.segmentBranchIndex() < second.segmentBranchIndex();
return false;
}