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
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
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.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2012-05-18 09:45:23 +02: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 10:40:57 +02:00
|
|
|
//
|
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2012-05-18 09:45:23 +02:00
|
|
|
// 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"
|
2019-09-05 09:43:17 +02:00
|
|
|
|
2013-05-06 10:55:00 +02:00
|
|
|
#include "cvfObject.h"
|
|
|
|
|
|
2014-07-24 10:11:43 +02:00
|
|
|
// Includes to make Pdm work for cvf::Color and cvf:Mat
|
2019-09-06 10:40:57 +02:00
|
|
|
#include "cafPdmFieldCvfColor.h"
|
2013-05-06 10:55:00 +02:00
|
|
|
#include "cafPdmFieldCvfMat4d.h"
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2018-01-16 09:37:08 +01:00
|
|
|
#include "RimGridView.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-02-20 09:31:24 +01:00
|
|
|
class RimStimPlanColors;
|
2018-03-12 11:07:46 +01:00
|
|
|
class RimVirtualPerforationResults;
|
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
|
|
|
|
|
{
|
2019-09-06 10:40:57 +02:00
|
|
|
class Transform;
|
|
|
|
|
class ScalarMapperUniformLevels;
|
|
|
|
|
class ModelBasicList;
|
|
|
|
|
class OverlayItem;
|
|
|
|
|
} // namespace cvf
|
2012-05-18 09:45:23 +02:00
|
|
|
|
|
|
|
|
//==================================================================================================
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
|
|
|
|
///
|
2012-05-18 09:45:23 +02:00
|
|
|
//==================================================================================================
|
2018-01-12 14:12:31 +01:00
|
|
|
class RimEclipseView : public RimGridView
|
2012-05-18 09:45:23 +02:00
|
|
|
{
|
|
|
|
|
CAF_PDM_HEADER_INIT;
|
2019-09-06 10:40:57 +02:00
|
|
|
|
2012-05-18 09:45:23 +02:00
|
|
|
public:
|
2018-03-01 07:51:30 +01:00
|
|
|
RimEclipseView();
|
2018-10-18 19:45:57 +02:00
|
|
|
~RimEclipseView() override;
|
2018-03-01 07:51:30 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
RimEclipseCellColors* cellResult() const;
|
|
|
|
|
RimCellEdgeColors* cellEdgeResult() const;
|
|
|
|
|
RimEclipseFaultColors* faultResultSettings() const;
|
|
|
|
|
RimStimPlanColors* fractureColors() const;
|
|
|
|
|
RimSimWellInViewCollection* wellCollection() const;
|
|
|
|
|
RimFaultInViewCollection* faultCollection() const;
|
|
|
|
|
RimVirtualPerforationResults* virtualPerforationResult() const;
|
2018-03-14 09:35:48 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
bool showInvalidCells() const;
|
|
|
|
|
bool showInactiveCells() const;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2013-02-25 09:44:26 +01:00
|
|
|
// Access internal objects
|
2019-09-06 10:40:57 +02:00
|
|
|
const RimPropertyFilterCollection* propertyFilterCollection() const override;
|
2013-02-25 09:44:26 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
RimEclipsePropertyFilterCollection* eclipsePropertyFilterCollection();
|
|
|
|
|
const RimEclipsePropertyFilterCollection* eclipsePropertyFilterCollection() const;
|
|
|
|
|
void setOverridePropertyFilterCollection( RimEclipsePropertyFilterCollection* pfc );
|
2015-08-27 15:45:22 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
RigCaseCellResultsData* currentGridCellResults();
|
|
|
|
|
const RigActiveCellInfo* currentActiveCellInfo() const;
|
|
|
|
|
RimEclipseCellColors* currentFaultResultColors();
|
2013-04-18 15:10:57 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void setEclipseCase( RimEclipseCase* reservoir );
|
|
|
|
|
RimEclipseCase* eclipseCase() const;
|
|
|
|
|
RimCase* ownerCase() const override;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
RigMainGrid* mainGrid() const;
|
2017-01-09 10:37:07 +01:00
|
|
|
|
2012-05-18 09:45:23 +02:00
|
|
|
// Display model generation
|
2013-09-08 22:59:46 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
bool isTimeStepDependentDataVisible() const override;
|
2013-04-12 12:03:04 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void scheduleGeometryRegen( RivCellSetEnum geometryType ) override;
|
|
|
|
|
void scheduleReservoirGridGeometryRegen();
|
|
|
|
|
void scheduleSimWellGeometryRegen();
|
|
|
|
|
void updateDisplayModelForWellResults();
|
2015-05-08 10:38:10 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void calculateCompletionTypeAndRedrawIfRequired();
|
2018-10-29 11:23:06 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
bool isVirtualConnectionFactorGeometryVisible() const;
|
|
|
|
|
bool isMainGridVisible() const;
|
2018-03-14 09:35:48 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
const std::vector<RivCellSetEnum>& visibleGridParts() const;
|
|
|
|
|
const RivReservoirViewPartMgr* reservoirGridPartManager() const;
|
|
|
|
|
RivReservoirViewPartMgr* reservoirGridPartManager();
|
2015-04-30 10:34:15 +02:00
|
|
|
|
2015-05-22 13:19:42 +02:00
|
|
|
// Does this belong here, really ?
|
2019-09-06 10:40:57 +02:00
|
|
|
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:
|
2019-09-06 10:40:57 +02:00
|
|
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
|
|
|
|
const QVariant& oldValue,
|
|
|
|
|
const QVariant& newValue ) override;
|
|
|
|
|
void updateIconStateForFilterCollections();
|
|
|
|
|
|
2019-11-01 10:13:32 +01:00
|
|
|
void defineAxisLabels( cvf::String* xLabel, cvf::String* yLabel, cvf::String* zLabel ) override;
|
2015-09-23 14:35:35 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
bool isUsingFormationNames() const override;
|
2015-11-23 07:24:50 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void calculateCurrentTotalCellVisibility( cvf::UByteArray* totalVisibility, int timeStep ) override;
|
2016-09-12 11:36:59 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
std::vector<RimLegendConfig*> legendConfigs() const override;
|
|
|
|
|
cvf::Color4f colorFromCellCategory( RivCellSetEnum geometryType ) const;
|
2017-08-24 09:27:08 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void syncronizeLocalAnnotationsFromGlobal();
|
2018-12-04 14:33:14 +01:00
|
|
|
|
2015-05-22 13:19:42 +02:00
|
|
|
protected:
|
2019-09-06 10:40:57 +02:00
|
|
|
void initAfterRead() override;
|
|
|
|
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
|
|
|
|
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
|
|
|
|
void onLoadDataAndUpdate() override;
|
|
|
|
|
caf::PdmFieldHandle* userDescriptionField() override;
|
|
|
|
|
|
2019-10-31 15:32:30 +01:00
|
|
|
void onCreatePartCollectionFromSelection( cvf::Collection<cvf::Part>* parts ) override;
|
2019-11-01 14:57:07 +01:00
|
|
|
bool isShowingActiveCellsOnly() override;
|
2019-11-01 10:13:32 +01:00
|
|
|
void onUpdateDisplayModelForCurrentTimeStep() override;
|
2019-09-06 10:40:57 +02:00
|
|
|
void updateVisibleGeometriesAndCellColors();
|
|
|
|
|
void appendWellsAndFracturesToModel();
|
|
|
|
|
|
2019-10-31 15:32:30 +01:00
|
|
|
void onCreateDisplayModel() override;
|
2019-09-06 10:40:57 +02:00
|
|
|
RimPropertyFilterCollection* nativePropertyFilterCollection();
|
|
|
|
|
virtual std::set<RivCellSetEnum> allVisibleFaultGeometryTypes() const;
|
2015-11-16 11:30:03 +01:00
|
|
|
|
2015-05-22 13:19:42 +02:00
|
|
|
private:
|
2019-09-06 10:40:57 +02:00
|
|
|
QString createAutoName() const override;
|
2018-12-14 13:41:35 +01:00
|
|
|
|
2019-10-31 16:37:16 +01:00
|
|
|
void onUpdateDisplayModelVisibility() override;
|
2013-02-25 09:44:26 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
std::vector<size_t> indicesToVisibleGrids() const;
|
2019-10-31 15:32:30 +01:00
|
|
|
void onUpdateScaleTransform() override;
|
2019-09-06 10:40:57 +02:00
|
|
|
cvf::Transform* scaleTransform() override;
|
2014-01-07 14:27:43 +01:00
|
|
|
|
2019-10-31 15:32:30 +01:00
|
|
|
void onUpdateStaticCellColors() override;
|
2019-09-06 10:40:57 +02:00
|
|
|
void updateStaticCellColors( RivCellSetEnum geometryType );
|
2018-09-19 14:28:27 +02:00
|
|
|
|
2019-10-31 16:37:16 +01:00
|
|
|
void onUpdateLegends() override;
|
2019-09-06 10:40:57 +02:00
|
|
|
void updateMinMaxValuesAndAddLegendToView( QString legendLabel,
|
|
|
|
|
RimEclipseCellColors* resultColors,
|
|
|
|
|
RigCaseCellResultsData* cellResultsData );
|
2019-10-31 15:32:30 +01:00
|
|
|
void onResetLegendsInViewer() override;
|
2019-09-06 10:40:57 +02:00
|
|
|
void updateVirtualConnectionLegendRanges();
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void updateFaultColors();
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void syncronizeWellsWithResults();
|
2015-06-22 09:09:33 +02:00
|
|
|
|
2019-11-08 10:39:40 +01:00
|
|
|
void onClampCurrentTimestep() override;
|
|
|
|
|
size_t onTimeStepCountRequested() override;
|
|
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void setVisibleGridParts( const std::vector<RivCellSetEnum>& cellSets );
|
|
|
|
|
void setVisibleGridPartsWatertight();
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2017-12-05 18:20:29 +01:00
|
|
|
private:
|
2019-09-06 10:40:57 +02:00
|
|
|
caf::PdmField<bool> m_showInvalidCells;
|
|
|
|
|
caf::PdmField<bool> m_showInactiveCells;
|
|
|
|
|
caf::PdmField<bool> m_showMainGrid_OBSOLETE;
|
|
|
|
|
|
|
|
|
|
caf::PdmChildField<RimEclipseCellColors*> m_cellResult;
|
|
|
|
|
caf::PdmChildField<RimCellEdgeColors*> m_cellEdgeResult;
|
|
|
|
|
caf::PdmChildField<RimEclipseFaultColors*> m_faultResultSettings;
|
|
|
|
|
caf::PdmChildField<RimStimPlanColors*> m_fractureColors;
|
2018-03-12 11:12:39 +01:00
|
|
|
caf::PdmChildField<RimVirtualPerforationResults*> m_virtualPerforationResult;
|
2018-03-01 07:51:30 +01:00
|
|
|
|
|
|
|
|
caf::PdmChildField<RimSimWellInViewCollection*> m_wellCollection;
|
|
|
|
|
caf::PdmChildField<RimFaultInViewCollection*> m_faultCollection;
|
|
|
|
|
|
2015-08-27 15:45:22 +02:00
|
|
|
caf::PdmChildField<RimEclipsePropertyFilterCollection*> m_propertyFilterCollection;
|
|
|
|
|
caf::PdmPointer<RimEclipsePropertyFilterCollection> m_overridePropertyFilterCollection;
|
|
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
caf::PdmPointer<RimEclipseCase> m_eclipseCase;
|
|
|
|
|
|
|
|
|
|
cvf::ref<RivReservoirViewPartMgr> m_reservoirGridPartManager;
|
|
|
|
|
cvf::ref<RivReservoirSimWellsPartMgr> m_simWellsPartManager;
|
2013-04-22 09:13:37 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
std::vector<RivCellSetEnum> m_visibleGridParts;
|
2012-05-18 09:45:23 +02:00
|
|
|
};
|