2016-12-16 07:17:56 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2016- 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.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#pragma once
|
|
|
|
|
2017-08-10 08:08:30 -05:00
|
|
|
#include "cafAppEnum.h"
|
|
|
|
|
2016-12-16 07:17:56 -06:00
|
|
|
#include <string>
|
|
|
|
#include <set>
|
|
|
|
|
|
|
|
#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"
|
2017-12-19 08:30:37 -06:00
|
|
|
#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,
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef caf::AppEnum<PhaseSelection> PhaseSelectionEnum;
|
2016-12-16 07:17:56 -06:00
|
|
|
|
2017-08-10 08:08:30 -05:00
|
|
|
RigFlowDiagResultAddress(const std::string& aVariableName, PhaseSelection phaseSelection, const std::set<std::string>& someSelectedTracerNames)
|
|
|
|
: variableName(aVariableName),
|
|
|
|
phaseSelection(phaseSelection),
|
|
|
|
selectedTracerNames(someSelectedTracerNames) {}
|
|
|
|
|
|
|
|
RigFlowDiagResultAddress(const std::string& aVariableName, PhaseSelection phaseSelection, const std::string& tracerName)
|
|
|
|
: variableName(aVariableName),
|
|
|
|
phaseSelection(phaseSelection)
|
2016-12-16 07:17:56 -06:00
|
|
|
{
|
|
|
|
selectedTracerNames.insert(tracerName);
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
|
|
|
bool operator< (const RigFlowDiagResultAddress& other) const
|
|
|
|
{
|
|
|
|
if ( selectedTracerNames != other.selectedTracerNames )
|
|
|
|
{
|
|
|
|
return selectedTracerNames < other.selectedTracerNames;
|
|
|
|
}
|
2017-08-10 08:08:30 -05:00
|
|
|
if (phaseSelection != other.phaseSelection)
|
|
|
|
{
|
|
|
|
return phaseSelection < other.phaseSelection;
|
|
|
|
}
|
2016-12-16 07:17:56 -06:00
|
|
|
|
|
|
|
return variableName < other.variableName;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|