2016-12-16 07:17:56 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2016- Statoil ASA
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2016-12-16 07:17:56 -06: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-09-06 03:40:57 -05:00
|
|
|
//
|
2016-12-16 07:17:56 -06: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-09-06 03:40:57 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2016-12-16 07:17:56 -06:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#pragma once
|
|
|
|
|
2017-08-10 08:08:30 -05:00
|
|
|
#include "cafAppEnum.h"
|
|
|
|
|
2016-12-16 07:17:56 -06:00
|
|
|
#include <set>
|
2019-09-06 03:40:57 -05:00
|
|
|
#include <string>
|
2016-12-16 07:17:56 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
#define RIG_FLD_TOF_RESNAME "TOF"
|
|
|
|
#define RIG_FLD_CELL_FRACTION_RESNAME "Fraction"
|
|
|
|
#define RIG_FLD_MAX_FRACTION_TRACER_RESNAME "MaxFractionTracer"
|
|
|
|
#define RIG_FLD_COMMUNICATION_RESNAME "Communication"
|
|
|
|
#define RIG_NUM_FLOODED_PV "Water Flooded PV"
|
2016-12-16 07:17:56 -06:00
|
|
|
|
2017-02-17 04:13:27 -06:00
|
|
|
#define RIG_FLOW_TOTAL_NAME "Total"
|
2017-04-18 09:47:37 -05:00
|
|
|
#define RIG_FLOW_OIL_NAME "Oil"
|
|
|
|
#define RIG_FLOW_GAS_NAME "Gas"
|
|
|
|
#define RIG_FLOW_WATER_NAME "Water"
|
|
|
|
|
2017-02-17 04:13:27 -06:00
|
|
|
#define RIG_RESERVOIR_TRACER_NAME "Reservoir"
|
|
|
|
#define RIG_TINY_TRACER_GROUP_NAME "Other"
|
|
|
|
|
2016-12-16 07:17:56 -06:00
|
|
|
class RigFlowDiagResultAddress
|
|
|
|
{
|
|
|
|
public:
|
2017-08-10 08:08:30 -05:00
|
|
|
enum PhaseSelection
|
|
|
|
{
|
|
|
|
PHASE_ALL = 0b111,
|
|
|
|
PHASE_OIL = 0b001,
|
|
|
|
PHASE_GAS = 0b010,
|
|
|
|
PHASE_WAT = 0b100,
|
|
|
|
};
|
|
|
|
|
2023-04-14 07:07:45 -05:00
|
|
|
using PhaseSelectionEnum = caf::AppEnum<PhaseSelection>;
|
2016-12-16 07:17:56 -06:00
|
|
|
|
2023-02-26 03:48:40 -06:00
|
|
|
RigFlowDiagResultAddress( const std::string& aVariableName, PhaseSelection phaseSelection, const std::set<std::string>& someSelectedTracerNames )
|
2019-09-06 03:40:57 -05:00
|
|
|
: variableName( aVariableName )
|
|
|
|
, selectedTracerNames( someSelectedTracerNames )
|
|
|
|
, phaseSelection( phaseSelection )
|
|
|
|
{
|
|
|
|
}
|
2017-08-10 08:08:30 -05:00
|
|
|
|
2020-02-12 04:43:15 -06:00
|
|
|
RigFlowDiagResultAddress( const std::string& aVariableName, PhaseSelection phaseSelection, const std::string& tracerName )
|
2019-09-06 03:40:57 -05:00
|
|
|
: variableName( aVariableName )
|
|
|
|
, phaseSelection( phaseSelection )
|
2016-12-16 07:17:56 -06:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
selectedTracerNames.insert( tracerName );
|
2016-12-16 07:17:56 -06:00
|
|
|
}
|
|
|
|
|
2017-01-03 06:14:07 -06:00
|
|
|
bool isNativeResult() const;
|
2016-12-16 07:17:56 -06:00
|
|
|
|
2017-01-12 08:00:18 -06:00
|
|
|
std::string uiText() const;
|
|
|
|
std::string uiShortText() const;
|
|
|
|
|
2016-12-16 07:17:56 -06:00
|
|
|
std::string variableName;
|
|
|
|
std::set<std::string> selectedTracerNames;
|
2017-08-10 08:08:30 -05:00
|
|
|
PhaseSelection phaseSelection;
|
2016-12-16 07:17:56 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
bool operator<( const RigFlowDiagResultAddress& other ) const
|
2016-12-16 07:17:56 -06:00
|
|
|
{
|
|
|
|
if ( selectedTracerNames != other.selectedTracerNames )
|
|
|
|
{
|
|
|
|
return selectedTracerNames < other.selectedTracerNames;
|
|
|
|
}
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( phaseSelection != other.phaseSelection )
|
2017-08-10 08:08:30 -05:00
|
|
|
{
|
|
|
|
return phaseSelection < other.phaseSelection;
|
|
|
|
}
|
2016-12-16 07:17:56 -06:00
|
|
|
|
|
|
|
return variableName < other.variableName;
|
|
|
|
}
|
|
|
|
};
|