2012-05-18 02:45:23 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2014-09-23 08:04:57 -05:00
|
|
|
// Copyright (C) 2011- Statoil ASA
|
|
|
|
// Copyright (C) 2013- Ceetron Solutions AS
|
|
|
|
// Copyright (C) 2011-2012 Ceetron AS
|
2012-05-18 02:45:23 -05: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 03:11:43 -05:00
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
#include "cafAppEnum.h"
|
2015-07-31 11:58:23 -05:00
|
|
|
#include "cafPdmChildField.h"
|
2014-07-24 03:11:43 -05:00
|
|
|
#include "cafPdmField.h"
|
|
|
|
#include "cafPdmObject.h"
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2014-07-24 03:11:43 -05:00
|
|
|
#include "cvfArray.h"
|
2013-05-06 03:55:00 -05:00
|
|
|
#include "cvfBase.h"
|
|
|
|
#include "cvfObject.h"
|
|
|
|
|
2014-07-24 03:11:43 -05:00
|
|
|
// Includes to make Pdm work for cvf::Color and cvf:Mat
|
|
|
|
#include "cafPdmFieldCvfColor.h"
|
2013-05-06 03:55:00 -05:00
|
|
|
#include "cafPdmFieldCvfMat4d.h"
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2018-01-16 02:37:08 -06:00
|
|
|
#include "RimGridView.h"
|
2013-12-03 13:30:32 -06:00
|
|
|
|
2014-07-24 03:11:43 -05:00
|
|
|
class RigActiveCellInfo;
|
2014-07-31 01:46:30 -05:00
|
|
|
class RigCaseCellResultsData;
|
2014-07-24 03:11:43 -05:00
|
|
|
class RigGridBase;
|
|
|
|
class RigGridCellFaceVisibilityFilter;
|
2017-01-09 03:37:07 -06:00
|
|
|
class RigMainGrid;
|
2014-07-24 03:11:43 -05:00
|
|
|
class Rim3dOverlayInfoConfig;
|
2015-06-25 06:41:55 -05:00
|
|
|
class RimCellEdgeColors;
|
2014-07-24 03:11:43 -05:00
|
|
|
class RimCellRangeFilter;
|
|
|
|
class RimCellRangeFilterCollection;
|
2017-02-20 02:31:24 -06:00
|
|
|
class RimEclipseCase;
|
|
|
|
class RimEclipseCellColors;
|
2015-06-25 05:06:43 -05:00
|
|
|
class RimEclipseFaultColors;
|
2017-02-20 02:31:24 -06:00
|
|
|
class RimEclipsePropertyFilter;
|
|
|
|
class RimEclipsePropertyFilterCollection;
|
2017-10-15 14:20:03 -05:00
|
|
|
class RimFaultInViewCollection;
|
2014-07-24 03:11:43 -05:00
|
|
|
class RimReservoirCellResultsStorage;
|
2013-05-06 03:55:00 -05:00
|
|
|
class RimReservoirCellResultsStorage;
|
2017-10-13 07:20:47 -05:00
|
|
|
class RimSimWellInViewCollection;
|
2017-02-20 02:31:24 -06:00
|
|
|
class RimStimPlanColors;
|
2018-03-12 05:07:46 -05:00
|
|
|
class RimVirtualPerforationResults;
|
2013-03-22 11:17:56 -05:00
|
|
|
class RiuViewer;
|
2017-03-13 05:05:46 -05:00
|
|
|
class RivReservoirSimWellsPartMgr;
|
2018-10-16 02:53:30 -05:00
|
|
|
class Riv2dGridProjectionPartMgr;
|
2016-09-21 03:32:29 -05:00
|
|
|
class RivIntersectionPartMgr;
|
2017-02-24 04:07:15 -06:00
|
|
|
class RivReservoirViewPartMgr;
|
2013-12-03 13:30:32 -06:00
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
namespace cvf
|
|
|
|
{
|
|
|
|
class Transform;
|
|
|
|
class ScalarMapperUniformLevels;
|
|
|
|
class ModelBasicList;
|
2014-04-07 06:18:39 -05:00
|
|
|
class OverlayItem;
|
2012-05-18 02:45:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
///
|
|
|
|
///
|
|
|
|
//==================================================================================================
|
2018-01-12 07:12:31 -06:00
|
|
|
class RimEclipseView : public RimGridView
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
public:
|
2018-03-01 00:51:30 -06:00
|
|
|
RimEclipseView();
|
|
|
|
virtual ~RimEclipseView();
|
|
|
|
|
|
|
|
RimEclipseCellColors* cellResult() const;
|
|
|
|
RimCellEdgeColors* cellEdgeResult() const;
|
|
|
|
RimEclipseFaultColors* faultResultSettings() const;
|
|
|
|
RimStimPlanColors* fractureColors() const;
|
|
|
|
RimSimWellInViewCollection* wellCollection() const;
|
|
|
|
RimFaultInViewCollection* faultCollection() const;
|
2018-03-14 03:35:48 -05:00
|
|
|
RimVirtualPerforationResults* virtualPerforationResult() const;
|
|
|
|
|
2018-03-01 00:51:30 -06:00
|
|
|
bool showInvalidCells() const;
|
|
|
|
bool showInactiveCells() const;
|
|
|
|
bool showMainGrid() const;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2013-02-25 02:44:26 -06:00
|
|
|
// Access internal objects
|
2017-10-19 03:23:24 -05:00
|
|
|
virtual const RimPropertyFilterCollection* propertyFilterCollection() const override;
|
2013-02-25 02:44:26 -06:00
|
|
|
|
2015-11-12 03:48:13 -06:00
|
|
|
RimEclipsePropertyFilterCollection* eclipsePropertyFilterCollection();
|
|
|
|
const RimEclipsePropertyFilterCollection* eclipsePropertyFilterCollection() const;
|
2015-08-27 08:45:22 -05:00
|
|
|
void setOverridePropertyFilterCollection(RimEclipsePropertyFilterCollection* pfc);
|
|
|
|
|
2017-09-13 03:39:20 -05:00
|
|
|
RigCaseCellResultsData* currentGridCellResults();
|
2018-05-30 03:22:45 -05:00
|
|
|
const RigActiveCellInfo* currentActiveCellInfo() const;
|
2015-07-01 05:07:01 -05:00
|
|
|
RimEclipseCellColors* currentFaultResultColors();
|
2013-04-18 08:10:57 -05:00
|
|
|
|
2015-05-22 06:19:42 -05:00
|
|
|
void setEclipseCase(RimEclipseCase* reservoir);
|
2017-01-09 03:37:07 -06:00
|
|
|
RimEclipseCase* eclipseCase() const;
|
2017-06-25 03:36:15 -05:00
|
|
|
virtual RimCase* ownerCase() const override;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2017-01-09 03:37:07 -06:00
|
|
|
RigMainGrid* mainGrid() const;
|
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
// Display model generation
|
2013-09-08 15:59:46 -05:00
|
|
|
|
2018-03-01 00:51:30 -06:00
|
|
|
bool isTimeStepDependentDataVisible() const override;
|
2013-04-12 05:03:04 -05:00
|
|
|
|
2017-10-19 03:23:24 -05:00
|
|
|
virtual void scheduleGeometryRegen(RivCellSetEnum geometryType) override;
|
2015-05-22 06:19:42 -05:00
|
|
|
void scheduleReservoirGridGeometryRegen();
|
2017-03-13 05:05:46 -05:00
|
|
|
void scheduleSimWellGeometryRegen();
|
2015-05-22 06:19:42 -05:00
|
|
|
void updateDisplayModelForWellResults();
|
2017-12-21 11:57:30 -06:00
|
|
|
|
|
|
|
void calculateCompletionTypeAndRedrawIfRequired();
|
2015-05-08 03:38:10 -05:00
|
|
|
|
2018-03-14 03:35:48 -05:00
|
|
|
bool isVirtualConnectionFactorGeometryVisible() const;
|
|
|
|
|
|
|
|
|
2017-02-24 04:07:15 -06:00
|
|
|
const std::vector<RivCellSetEnum>& visibleGridParts() const;
|
|
|
|
const RivReservoirViewPartMgr* reservoirGridPartManager() const;
|
2017-08-24 02:27:08 -05:00
|
|
|
RivReservoirViewPartMgr* reservoirGridPartManager();
|
2015-04-30 03:34:15 -05:00
|
|
|
|
2015-05-22 06:19:42 -05:00
|
|
|
// Does this belong here, really ?
|
|
|
|
void calculateVisibleWellCellsIncFence(cvf::UByteArray* visibleCells, RigGridBase * grid);
|
2015-05-08 03:38:10 -05:00
|
|
|
|
2015-05-22 06:19:42 -05:00
|
|
|
// Overridden PDM methods:
|
2017-10-19 03:23:24 -05:00
|
|
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
2015-09-23 07:35:35 -05:00
|
|
|
void updateIconStateForFilterCollections();
|
|
|
|
|
2017-10-19 03:23:24 -05:00
|
|
|
virtual void axisLabels(cvf::String* xLabel, cvf::String* yLabel, cvf::String* zLabel) override;
|
2015-11-23 00:24:50 -06:00
|
|
|
|
2016-09-12 04:36:59 -05:00
|
|
|
virtual bool isUsingFormationNames() const override;
|
|
|
|
|
2017-08-24 02:27:08 -05:00
|
|
|
virtual void calculateCurrentTotalCellVisibility(cvf::UByteArray* totalVisibility, int timeStep) override;
|
2018-04-18 03:32:51 -05:00
|
|
|
|
|
|
|
std::vector<RimLegendConfig*> legendConfigs() const override;
|
2018-09-19 07:28:27 -05:00
|
|
|
cvf::Color4f colorFromCellCategory(RivCellSetEnum geometryType) const;
|
2017-08-24 02:27:08 -05:00
|
|
|
|
2015-05-22 06:19:42 -05:00
|
|
|
protected:
|
2017-10-19 03:23:24 -05: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 06:49:14 -05:00
|
|
|
virtual void onLoadDataAndUpdate() override;
|
2015-05-13 15:42:11 -05:00
|
|
|
|
2017-10-19 03:23:24 -05:00
|
|
|
virtual void createPartCollectionFromSelection(cvf::Collection<cvf::Part>* parts) override;
|
|
|
|
virtual bool showActiveCellsOnly() override;
|
2015-11-16 04:30:03 -06:00
|
|
|
|
2015-05-22 06:19:42 -05:00
|
|
|
private:
|
2017-10-19 03:23:24 -05:00
|
|
|
void createDisplayModel() override;
|
|
|
|
void updateDisplayModelVisibility() override;
|
|
|
|
virtual void updateCurrentTimeStep() override;
|
2013-02-25 02:44:26 -06:00
|
|
|
|
2015-05-22 06:19:42 -05:00
|
|
|
void indicesToVisibleGrids(std::vector<size_t>* gridIndices);
|
2017-10-19 03:23:24 -05:00
|
|
|
virtual void updateScaleTransform() override;
|
|
|
|
virtual cvf::Transform* scaleTransform() override;
|
2014-01-07 07:27:43 -06:00
|
|
|
|
2017-10-19 03:23:24 -05:00
|
|
|
virtual void updateStaticCellColors() override;
|
2015-06-22 02:09:33 -05:00
|
|
|
void updateStaticCellColors(RivCellSetEnum geometryType);
|
2018-09-19 07:28:27 -05:00
|
|
|
|
2018-04-09 04:51:30 -05:00
|
|
|
void updateLegends() override;
|
2015-06-25 07:34:20 -05:00
|
|
|
void updateMinMaxValuesAndAddLegendToView(QString legendLabel, RimEclipseCellColors* resultColors, RigCaseCellResultsData* cellResultsData);
|
2017-10-19 03:23:24 -05:00
|
|
|
virtual void resetLegendsInViewer() override;
|
2018-04-05 06:50:14 -05:00
|
|
|
void updateVirtualConnectionLegendRanges();
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2016-11-21 04:30:36 -06:00
|
|
|
std::set<RivCellSetEnum> allVisibleFaultGeometryTypes() const;
|
2015-05-22 06:19:42 -05:00
|
|
|
void updateFaultColors();
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2015-05-22 06:19:42 -05:00
|
|
|
void syncronizeWellsWithResults();
|
2015-06-22 02:09:33 -05:00
|
|
|
|
2017-10-19 03:23:24 -05:00
|
|
|
void clampCurrentTimestep() override;
|
2017-12-05 11:20:29 -06:00
|
|
|
void setVisibleGridParts(const std::vector<RivCellSetEnum>& cellSets);
|
2017-12-06 01:38:37 -06:00
|
|
|
void setVisibleGridPartsWatertight();
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2017-12-05 11:20:29 -06:00
|
|
|
private:
|
2018-03-01 00:51:30 -06:00
|
|
|
caf::PdmField<bool> m_showInvalidCells;
|
|
|
|
caf::PdmField<bool> m_showInactiveCells;
|
|
|
|
caf::PdmField<bool> m_showMainGrid;
|
|
|
|
|
|
|
|
caf::PdmChildField<RimEclipseCellColors*> m_cellResult;
|
|
|
|
caf::PdmChildField<RimCellEdgeColors*> m_cellEdgeResult;
|
|
|
|
caf::PdmChildField<RimEclipseFaultColors*> m_faultResultSettings;
|
|
|
|
caf::PdmChildField<RimStimPlanColors*> m_fractureColors;
|
2018-03-12 05:12:39 -05:00
|
|
|
caf::PdmChildField<RimVirtualPerforationResults*> m_virtualPerforationResult;
|
2018-03-01 00:51:30 -06:00
|
|
|
|
|
|
|
caf::PdmChildField<RimSimWellInViewCollection*> m_wellCollection;
|
|
|
|
caf::PdmChildField<RimFaultInViewCollection*> m_faultCollection;
|
|
|
|
|
2015-08-27 08:45:22 -05:00
|
|
|
caf::PdmChildField<RimEclipsePropertyFilterCollection*> m_propertyFilterCollection;
|
|
|
|
caf::PdmPointer<RimEclipsePropertyFilterCollection> m_overridePropertyFilterCollection;
|
|
|
|
|
2017-03-15 02:45:08 -05:00
|
|
|
caf::PdmPointer<RimEclipseCase> m_eclipseCase;
|
2013-04-22 02:13:37 -05:00
|
|
|
|
2015-05-22 06:19:42 -05:00
|
|
|
cvf::ref<RivReservoirViewPartMgr> m_reservoirGridPartManager;
|
2017-03-13 05:35:49 -05:00
|
|
|
cvf::ref<RivReservoirSimWellsPartMgr> m_simWellsPartManager;
|
2018-10-16 02:53:30 -05:00
|
|
|
cvf::ref<Riv2dGridProjectionPartMgr> m_grid2dProjectionPartMgr;
|
2018-03-12 05:12:39 -05:00
|
|
|
|
2015-06-18 06:09:09 -05:00
|
|
|
std::vector<RivCellSetEnum> m_visibleGridParts;
|
2012-05-18 02:45:23 -05:00
|
|
|
};
|