2012-05-18 09:45:23 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
2014-09-23 15:04:57 +02:00
|
|
|
// Copyright (C) 2011- Statoil ASA
|
|
|
|
|
// Copyright (C) 2013- Ceetron Solutions AS
|
|
|
|
|
// Copyright (C) 2011-2012 Ceetron AS
|
2012-05-18 09:45:23 +02: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.
|
|
|
|
|
//
|
|
|
|
|
// 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-06-13 15:41:52 +02:00
|
|
|
#include "RiaDefines.h"
|
2017-08-11 10:25:33 +02:00
|
|
|
#include "RiaPorosityModel.h"
|
2014-07-24 10:11:43 +02:00
|
|
|
|
2017-08-10 15:08:30 +02:00
|
|
|
#include "RigFlowDiagResultAddress.h"
|
|
|
|
|
|
2012-05-18 09:45:23 +02:00
|
|
|
#include "cafAppEnum.h"
|
|
|
|
|
#include "cafPdmField.h"
|
2014-07-24 10:11:43 +02:00
|
|
|
#include "cafPdmObject.h"
|
2012-05-18 09:45:23 +02:00
|
|
|
#include "cafPdmPointer.h"
|
2016-12-14 09:50:30 +01:00
|
|
|
#include "cafPdmPtrField.h"
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2013-03-22 15:43:42 +01:00
|
|
|
class RigCaseCellResultsData;
|
2015-09-01 13:56:35 +02:00
|
|
|
class RimEclipseCase;
|
2016-10-21 14:02:06 +02:00
|
|
|
class RimEclipseView;
|
|
|
|
|
class RimReservoirCellResultsStorage;
|
2016-12-14 09:50:30 +01:00
|
|
|
class RimFlowDiagSolution;
|
2016-10-21 14:02:06 +02:00
|
|
|
|
2017-01-12 11:13:33 +01:00
|
|
|
|
2012-05-18 09:45:23 +02:00
|
|
|
//==================================================================================================
|
|
|
|
|
///
|
|
|
|
|
///
|
|
|
|
|
//==================================================================================================
|
2015-06-25 09:38:53 +02:00
|
|
|
class RimEclipseResultDefinition : public caf::PdmObject
|
2012-05-18 09:45:23 +02:00
|
|
|
{
|
|
|
|
|
CAF_PDM_HEADER_INIT;
|
2017-01-12 11:13:33 +01:00
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
enum FlowTracerSelectionType
|
|
|
|
|
{
|
2017-01-12 15:00:18 +01:00
|
|
|
FLOW_TR_INJ_AND_PROD,
|
2017-01-12 11:13:33 +01:00
|
|
|
FLOW_TR_PRODUCERS,
|
2017-01-12 15:00:18 +01:00
|
|
|
FLOW_TR_INJECTORS,
|
|
|
|
|
FLOW_TR_BY_SELECTION
|
2017-01-12 11:13:33 +01:00
|
|
|
};
|
|
|
|
|
typedef caf::AppEnum<RimEclipseResultDefinition::FlowTracerSelectionType> FlowTracerSelectionEnum;
|
|
|
|
|
|
2012-05-18 09:45:23 +02:00
|
|
|
public:
|
2015-06-25 09:38:53 +02:00
|
|
|
RimEclipseResultDefinition();
|
|
|
|
|
virtual ~RimEclipseResultDefinition();
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2016-12-20 14:33:35 +01:00
|
|
|
void simpleCopy(const RimEclipseResultDefinition* other);
|
|
|
|
|
|
2015-09-01 13:56:35 +02:00
|
|
|
void setEclipseCase(RimEclipseCase* eclipseCase);
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2017-06-13 15:41:52 +02:00
|
|
|
RiaDefines::ResultCatType resultType() const { return m_resultType(); }
|
|
|
|
|
void setResultType(RiaDefines::ResultCatType val);
|
2017-08-11 14:05:59 +02:00
|
|
|
RiaDefines::PorosityModelType porosityModel() const { return m_porosityModel(); }
|
|
|
|
|
void setPorosityModel(RiaDefines::PorosityModelType val);
|
2013-04-30 13:41:53 +02:00
|
|
|
QString resultVariable() const { return m_resultVariable(); }
|
2014-06-13 08:12:45 +02:00
|
|
|
virtual void setResultVariable(const QString& val);
|
2017-03-09 22:45:47 +01:00
|
|
|
|
|
|
|
|
void setFlowSolution(RimFlowDiagSolution* flowSol);
|
2016-12-16 14:17:56 +01:00
|
|
|
RimFlowDiagSolution* flowDiagSolution();
|
|
|
|
|
RigFlowDiagResultAddress flowDiagResAddress() const;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2017-03-02 16:10:18 +01:00
|
|
|
void setFlowDiagTracerSelectionType(FlowTracerSelectionType selectionType);
|
|
|
|
|
|
2017-01-12 15:00:18 +01:00
|
|
|
QString resultVariableUiName() const;
|
|
|
|
|
QString resultVariableUiShortName() const;
|
2017-01-04 13:13:06 +01:00
|
|
|
|
2013-04-30 13:41:53 +02:00
|
|
|
void loadResult();
|
2014-09-04 09:14:01 +02:00
|
|
|
size_t scalarResultIndex() const;
|
2013-04-30 13:41:53 +02:00
|
|
|
bool hasStaticResult() const;
|
|
|
|
|
bool hasDynamicResult() const;
|
|
|
|
|
bool hasResult() const;
|
2014-04-04 10:59:21 +02:00
|
|
|
bool isTernarySaturationSelected() const;
|
2017-06-01 13:46:22 +02:00
|
|
|
bool isCompletionTypeSelected() const;
|
2016-08-05 08:31:15 +02:00
|
|
|
bool hasCategoryResult() const;
|
2017-10-18 11:31:19 +02:00
|
|
|
bool isFlowDiagOrInjectionFlooding() const;
|
2014-04-04 10:59:21 +02:00
|
|
|
|
2017-09-13 10:39:20 +02:00
|
|
|
RigCaseCellResultsData* currentGridCellResults() const;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2017-02-15 10:40:32 +01:00
|
|
|
void loadDataAndUpdate();
|
2016-10-21 14:02:06 +02:00
|
|
|
void updateAnyFieldHasChanged();
|
2016-09-07 11:41:02 +02:00
|
|
|
|
2017-02-13 15:00:49 +01:00
|
|
|
void setTofAndSelectTracer(const QString& tracerName);
|
2017-08-17 11:24:51 +02:00
|
|
|
void setSelectedTracers(const std::vector<QString>& selectedTracers);
|
2017-08-31 16:22:50 +02:00
|
|
|
void setSelectedSouringTracers(const std::vector<QString>& selectedTracers);
|
2017-02-13 15:00:49 +01:00
|
|
|
|
2017-03-17 16:09:48 +01:00
|
|
|
|
2016-12-14 09:50:30 +01:00
|
|
|
protected:
|
|
|
|
|
virtual void updateLegendCategorySettings() {};
|
|
|
|
|
|
2016-10-21 14:02:06 +02:00
|
|
|
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly);
|
|
|
|
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
2016-12-14 09:50:30 +01:00
|
|
|
virtual void initAfterRead();
|
2017-03-21 13:48:34 +01:00
|
|
|
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
2017-03-27 22:54:13 +02:00
|
|
|
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override;
|
2016-10-21 13:57:15 +02:00
|
|
|
|
2012-05-18 09:45:23 +02:00
|
|
|
protected:
|
2017-06-13 15:41:52 +02:00
|
|
|
caf::PdmField< caf::AppEnum< RiaDefines::ResultCatType > > m_resultType;
|
2017-08-11 14:05:59 +02:00
|
|
|
caf::PdmField< caf::AppEnum< RiaDefines::PorosityModelType > > m_porosityModel;
|
2013-04-30 13:41:53 +02:00
|
|
|
caf::PdmField<QString> m_resultVariable;
|
|
|
|
|
|
2016-12-14 09:50:30 +01:00
|
|
|
caf::PdmPtrField<RimFlowDiagSolution*> m_flowSolution;
|
|
|
|
|
caf::PdmField<std::vector<QString> > m_selectedTracers;
|
|
|
|
|
|
2017-08-31 16:22:50 +02:00
|
|
|
caf::PdmField<std::vector<QString> > m_selectedSouringTracers;
|
|
|
|
|
|
2015-06-25 11:45:31 +02:00
|
|
|
friend class RimEclipsePropertyFilter;
|
2015-06-25 12:06:43 +02:00
|
|
|
friend class RimEclipseFaultColors;
|
2015-09-02 12:13:38 +02:00
|
|
|
friend class RimWellLogExtractionCurve;
|
2014-09-08 07:53:49 +02:00
|
|
|
|
2013-04-30 13:41:53 +02:00
|
|
|
// User interface only fields, to support "filtering"-like behaviour etc.
|
2016-12-14 09:50:30 +01:00
|
|
|
|
2017-06-13 15:41:52 +02:00
|
|
|
caf::PdmField< caf::AppEnum< RiaDefines::ResultCatType > > m_resultTypeUiField;
|
2017-08-11 14:05:59 +02:00
|
|
|
caf::PdmField< caf::AppEnum< RiaDefines::PorosityModelType > > m_porosityModelUiField;
|
2013-04-30 13:41:53 +02:00
|
|
|
caf::PdmField<QString> m_resultVariableUiField;
|
|
|
|
|
|
2017-01-12 11:13:33 +01:00
|
|
|
caf::PdmField< caf::AppEnum< FlowTracerSelectionType > > m_flowTracerSelectionMode;
|
2016-12-14 09:50:30 +01:00
|
|
|
caf::PdmPtrField<RimFlowDiagSolution*> m_flowSolutionUiField;
|
2017-08-10 15:08:30 +02:00
|
|
|
caf::PdmField< RigFlowDiagResultAddress::PhaseSelectionEnum > m_phaseSelection;
|
2017-03-27 11:24:51 +02:00
|
|
|
|
|
|
|
|
caf::PdmField<QString> m_selectedTracersUiFieldFilter;
|
2016-12-14 09:50:30 +01:00
|
|
|
caf::PdmField<std::vector<QString> > m_selectedTracersUiField;
|
|
|
|
|
|
2017-08-31 16:22:50 +02:00
|
|
|
caf::PdmField<std::vector<QString> > m_selectedSouringTracersUiField;
|
|
|
|
|
|
2016-12-14 09:50:30 +01:00
|
|
|
|
2015-09-01 13:56:35 +02:00
|
|
|
caf::PdmPointer<RimEclipseCase> m_eclipseCase;
|
2015-08-10 14:14:22 +02:00
|
|
|
|
2013-04-30 13:41:53 +02:00
|
|
|
private:
|
2017-02-13 15:00:49 +01:00
|
|
|
void assignFlowSolutionFromCase();
|
2016-12-20 14:33:35 +01:00
|
|
|
|
|
|
|
|
bool hasDualPorFractureResult();
|
2016-12-14 09:50:30 +01:00
|
|
|
|
|
|
|
|
QList<caf::PdmOptionItemInfo> calcOptionsForVariableUiFieldStandard();
|
|
|
|
|
QStringList getResultNamesForCurrentUiResultType();
|
2015-12-02 10:32:59 +01:00
|
|
|
static void removePerCellFaceOptionItems(QList<caf::PdmOptionItemInfo>& optionItems);
|
2017-03-27 11:24:51 +02:00
|
|
|
|
|
|
|
|
std::vector<QString> tracerNamesMatchingFilter() const;
|
2012-05-18 09:45:23 +02:00
|
|
|
};
|
|
|
|
|
|