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
|
2014-07-24 10:11:43 +02:00
|
|
|
|
2012-05-18 09:45:23 +02:00
|
|
|
#include "cafAppEnum.h"
|
2015-07-31 18:58:23 +02:00
|
|
|
#include "cafPdmChildField.h"
|
2014-07-24 10:11:43 +02:00
|
|
|
#include "cafPdmField.h"
|
|
|
|
|
#include "cafPdmObject.h"
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2014-07-24 10:11:43 +02:00
|
|
|
#include "cvfArray.h"
|
2013-05-06 10:55:00 +02:00
|
|
|
#include "cvfBase.h"
|
|
|
|
|
#include "cvfObject.h"
|
|
|
|
|
|
2014-07-24 10:11:43 +02:00
|
|
|
// Includes to make Pdm work for cvf::Color and cvf:Mat
|
|
|
|
|
#include "cafPdmFieldCvfColor.h"
|
2013-05-06 10:55:00 +02:00
|
|
|
#include "cafPdmFieldCvfMat4d.h"
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2015-04-29 22:19:49 +02:00
|
|
|
#include "RimView.h"
|
2013-12-03 20:30:32 +01:00
|
|
|
|
2014-07-24 10:11:43 +02:00
|
|
|
class RigActiveCellInfo;
|
2014-07-31 08:46:30 +02:00
|
|
|
class RigCaseCellResultsData;
|
2014-07-24 10:11:43 +02:00
|
|
|
class RigGridBase;
|
|
|
|
|
class RigGridCellFaceVisibilityFilter;
|
2017-01-09 10:37:07 +01:00
|
|
|
class RigMainGrid;
|
2014-07-24 10:11:43 +02:00
|
|
|
class Rim3dOverlayInfoConfig;
|
2015-06-25 13:41:55 +02:00
|
|
|
class RimCellEdgeColors;
|
2014-07-24 10:11:43 +02:00
|
|
|
class RimCellRangeFilter;
|
|
|
|
|
class RimCellRangeFilterCollection;
|
2017-02-20 09:31:24 +01:00
|
|
|
class RimEclipseCase;
|
|
|
|
|
class RimEclipseCellColors;
|
2015-06-25 12:06:43 +02:00
|
|
|
class RimEclipseFaultColors;
|
2017-02-20 09:31:24 +01:00
|
|
|
class RimEclipsePropertyFilter;
|
|
|
|
|
class RimEclipsePropertyFilterCollection;
|
2017-10-15 21:20:03 +02:00
|
|
|
class RimFaultInViewCollection;
|
2014-07-24 10:11:43 +02:00
|
|
|
class RimReservoirCellResultsStorage;
|
2013-05-06 10:55:00 +02:00
|
|
|
class RimReservoirCellResultsStorage;
|
2017-10-13 14:20:47 +02:00
|
|
|
class RimSimWellInViewCollection;
|
2017-08-21 15:24:20 +02:00
|
|
|
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
|
2017-02-20 09:31:24 +01:00
|
|
|
class RimStimPlanColors;
|
2017-08-21 15:24:20 +02:00
|
|
|
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
|
2013-03-22 17:17:56 +01:00
|
|
|
class RiuViewer;
|
2017-03-13 11:05:46 +01:00
|
|
|
class RivReservoirSimWellsPartMgr;
|
2016-09-21 10:32:29 +02:00
|
|
|
class RivIntersectionPartMgr;
|
2017-02-24 11:07:15 +01:00
|
|
|
class RivReservoirViewPartMgr;
|
2013-12-03 20:30:32 +01:00
|
|
|
|
2012-05-18 09:45:23 +02:00
|
|
|
namespace cvf
|
|
|
|
|
{
|
|
|
|
|
class Transform;
|
|
|
|
|
class ScalarMapperUniformLevels;
|
|
|
|
|
class ModelBasicList;
|
2014-04-07 13:18:39 +02:00
|
|
|
class OverlayItem;
|
2012-05-18 09:45:23 +02:00
|
|
|
}
|
|
|
|
|
|
2013-12-03 20:30:32 +01:00
|
|
|
enum PartRenderMaskEnum
|
2012-05-18 09:45:23 +02:00
|
|
|
{
|
2013-12-03 20:30:32 +01:00
|
|
|
surfaceBit = 0x00000001,
|
|
|
|
|
meshSurfaceBit = 0x00000002,
|
|
|
|
|
faultBit = 0x00000004,
|
|
|
|
|
meshFaultBit = 0x00000008,
|
2012-05-18 09:45:23 +02:00
|
|
|
};
|
2013-12-03 20:30:32 +01:00
|
|
|
|
2012-05-18 09:45:23 +02:00
|
|
|
//==================================================================================================
|
|
|
|
|
///
|
|
|
|
|
///
|
|
|
|
|
//==================================================================================================
|
2015-05-21 10:05:33 +02:00
|
|
|
class RimEclipseView : public RimView
|
2012-05-18 09:45:23 +02:00
|
|
|
{
|
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
public:
|
2015-05-21 10:05:33 +02:00
|
|
|
RimEclipseView(void);
|
|
|
|
|
virtual ~RimEclipseView(void);
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2013-02-25 09:44:26 +01:00
|
|
|
// Fields containing child objects :
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2017-02-20 09:31:24 +01:00
|
|
|
caf::PdmChildField<RimEclipseCellColors*> cellResult;
|
|
|
|
|
caf::PdmChildField<RimCellEdgeColors*> cellEdgeResult;
|
|
|
|
|
caf::PdmChildField<RimEclipseFaultColors*> faultResultSettings;
|
2017-08-21 15:24:20 +02:00
|
|
|
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
|
2017-02-20 09:31:24 +01:00
|
|
|
caf::PdmChildField<RimStimPlanColors*> stimPlanColors;
|
2017-08-21 15:24:20 +02:00
|
|
|
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2017-10-19 10:23:24 +02:00
|
|
|
caf::PdmChildField<RimSimWellInViewCollection*> wellCollection;
|
|
|
|
|
caf::PdmChildField<RimFaultInViewCollection*> faultCollection;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2015-05-22 13:19:42 +02:00
|
|
|
// Fields
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2015-05-22 13:19:42 +02:00
|
|
|
caf::PdmField<bool> showInvalidCells;
|
|
|
|
|
caf::PdmField<bool> showInactiveCells;
|
|
|
|
|
caf::PdmField<bool> showMainGrid;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2013-02-25 09:44:26 +01:00
|
|
|
// Access internal objects
|
2017-10-19 10:23:24 +02:00
|
|
|
virtual const RimPropertyFilterCollection* propertyFilterCollection() const override;
|
2013-02-25 09:44:26 +01:00
|
|
|
|
2015-11-12 10:48:13 +01:00
|
|
|
RimEclipsePropertyFilterCollection* eclipsePropertyFilterCollection();
|
|
|
|
|
const RimEclipsePropertyFilterCollection* eclipsePropertyFilterCollection() const;
|
2015-08-27 15:45:22 +02:00
|
|
|
void setOverridePropertyFilterCollection(RimEclipsePropertyFilterCollection* pfc);
|
|
|
|
|
|
2017-09-13 10:39:20 +02:00
|
|
|
RigCaseCellResultsData* currentGridCellResults();
|
2015-05-22 13:19:42 +02:00
|
|
|
RigActiveCellInfo* currentActiveCellInfo();
|
2015-07-01 12:07:01 +02:00
|
|
|
RimEclipseCellColors* currentFaultResultColors();
|
2013-04-18 15:10:57 +02:00
|
|
|
|
2015-05-22 13:19:42 +02:00
|
|
|
void setEclipseCase(RimEclipseCase* reservoir);
|
2017-01-09 10:37:07 +01:00
|
|
|
RimEclipseCase* eclipseCase() const;
|
2017-06-25 10:36:15 +02:00
|
|
|
virtual RimCase* ownerCase() const override;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2017-01-09 10:37:07 +01:00
|
|
|
RigMainGrid* mainGrid() const;
|
|
|
|
|
|
2012-05-18 09:45:23 +02:00
|
|
|
// Display model generation
|
2013-09-08 22:59:46 +02:00
|
|
|
|
2015-05-22 13:19:42 +02:00
|
|
|
bool isTimeStepDependentDataVisible() const;
|
2013-04-12 12:03:04 +02:00
|
|
|
|
2017-10-19 10:23:24 +02:00
|
|
|
virtual void scheduleGeometryRegen(RivCellSetEnum geometryType) override;
|
2015-05-22 13:19:42 +02:00
|
|
|
void scheduleReservoirGridGeometryRegen();
|
2017-03-13 11:05:46 +01:00
|
|
|
void scheduleSimWellGeometryRegen();
|
2015-05-22 13:19:42 +02:00
|
|
|
void updateDisplayModelForWellResults();
|
2015-05-08 10:38:10 +02:00
|
|
|
|
2017-02-24 11:07:15 +01:00
|
|
|
const std::vector<RivCellSetEnum>& visibleGridParts() const;
|
|
|
|
|
const RivReservoirViewPartMgr* reservoirGridPartManager() const;
|
2017-08-24 09:27:08 +02:00
|
|
|
RivReservoirViewPartMgr* reservoirGridPartManager();
|
2015-04-30 10:34:15 +02:00
|
|
|
|
2015-05-22 13:19:42 +02:00
|
|
|
// Does this belong here, really ?
|
|
|
|
|
void calculateVisibleWellCellsIncFence(cvf::UByteArray* visibleCells, RigGridBase * grid);
|
2015-05-08 10:38:10 +02:00
|
|
|
|
2015-05-22 13:19:42 +02:00
|
|
|
// Overridden PDM methods:
|
2017-10-19 10:23:24 +02:00
|
|
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
2015-09-23 14:35:35 +02:00
|
|
|
void updateIconStateForFilterCollections();
|
|
|
|
|
|
2017-10-19 10:23:24 +02:00
|
|
|
virtual void axisLabels(cvf::String* xLabel, cvf::String* yLabel, cvf::String* zLabel) override;
|
2015-11-23 07:24:50 +01:00
|
|
|
|
2016-09-12 11:36:59 +02:00
|
|
|
virtual bool isUsingFormationNames() const override;
|
|
|
|
|
|
2017-08-24 09:27:08 +02:00
|
|
|
virtual void calculateCurrentTotalCellVisibility(cvf::UByteArray* totalVisibility, int timeStep) override;
|
|
|
|
|
|
2015-05-22 13:19:42 +02:00
|
|
|
protected:
|
2017-10-19 10:23:24 +02:00
|
|
|
virtual void initAfterRead() override;
|
|
|
|
|
virtual void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
|
|
|
|
virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") override;
|
2017-10-31 12:49:14 +01:00
|
|
|
virtual void onLoadDataAndUpdate() override;
|
2015-05-13 22:42:11 +02:00
|
|
|
|
2017-10-19 10:23:24 +02:00
|
|
|
virtual void createPartCollectionFromSelection(cvf::Collection<cvf::Part>* parts) override;
|
|
|
|
|
virtual bool showActiveCellsOnly() override;
|
2015-11-16 11:30:03 +01:00
|
|
|
|
2015-05-22 13:19:42 +02:00
|
|
|
private:
|
2017-10-19 10:23:24 +02:00
|
|
|
void createDisplayModel() override;
|
|
|
|
|
void updateDisplayModelVisibility() override;
|
|
|
|
|
virtual void updateCurrentTimeStep() override;
|
2013-02-25 09:44:26 +01:00
|
|
|
|
2015-05-22 13:19:42 +02:00
|
|
|
void indicesToVisibleGrids(std::vector<size_t>* gridIndices);
|
2017-10-19 10:23:24 +02:00
|
|
|
virtual void updateScaleTransform() override;
|
|
|
|
|
virtual cvf::Transform* scaleTransform() override;
|
2014-01-07 14:27:43 +01:00
|
|
|
|
2017-10-19 10:23:24 +02:00
|
|
|
virtual void updateStaticCellColors() override;
|
2015-06-22 09:09:33 +02:00
|
|
|
void updateStaticCellColors(RivCellSetEnum geometryType);
|
2015-05-22 13:19:42 +02:00
|
|
|
void updateLegends();
|
2015-06-25 14:34:20 +02:00
|
|
|
void updateMinMaxValuesAndAddLegendToView(QString legendLabel, RimEclipseCellColors* resultColors, RigCaseCellResultsData* cellResultsData);
|
2017-10-19 10:23:24 +02:00
|
|
|
virtual void resetLegendsInViewer() override;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2016-11-21 11:30:36 +01:00
|
|
|
std::set<RivCellSetEnum> allVisibleFaultGeometryTypes() const;
|
2015-05-22 13:19:42 +02:00
|
|
|
void updateFaultColors();
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2015-05-22 13:19:42 +02:00
|
|
|
void syncronizeWellsWithResults();
|
2015-06-22 09:09:33 +02:00
|
|
|
|
2017-10-19 10:23:24 +02:00
|
|
|
void clampCurrentTimestep() override;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2015-09-14 16:14:44 +02:00
|
|
|
|
2015-08-27 15:45:22 +02:00
|
|
|
caf::PdmChildField<RimEclipsePropertyFilterCollection*> m_propertyFilterCollection;
|
|
|
|
|
caf::PdmPointer<RimEclipsePropertyFilterCollection> m_overridePropertyFilterCollection;
|
|
|
|
|
|
2017-03-15 08:45:08 +01:00
|
|
|
caf::PdmPointer<RimEclipseCase> m_eclipseCase;
|
2013-04-22 09:13:37 +02:00
|
|
|
|
2015-05-22 13:19:42 +02:00
|
|
|
cvf::ref<RivReservoirViewPartMgr> m_reservoirGridPartManager;
|
2017-03-13 11:35:49 +01:00
|
|
|
cvf::ref<RivReservoirSimWellsPartMgr> m_simWellsPartManager;
|
2016-12-07 12:01:31 +01:00
|
|
|
|
2015-06-18 13:09:09 +02:00
|
|
|
std::vector<RivCellSetEnum> m_visibleGridParts;
|
2012-05-18 09:45:23 +02:00
|
|
|
};
|
|
|
|
|
|