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
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
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.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2012-05-18 02:45:23 -05: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 03:40:57 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2012-05-18 02:45:23 -05:00
|
|
|
// 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"
|
2020-02-28 07:38:24 -06:00
|
|
|
#include "cafPdmProxyValueField.h"
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2014-07-24 03:11:43 -05:00
|
|
|
#include "cvfArray.h"
|
2019-09-05 02:43:17 -05:00
|
|
|
|
2013-05-06 03:55:00 -05:00
|
|
|
#include "cvfObject.h"
|
|
|
|
|
2014-07-24 03:11:43 -05:00
|
|
|
// Includes to make Pdm work for cvf::Color and cvf:Mat
|
2019-09-06 03:40:57 -05:00
|
|
|
#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;
|
2019-11-26 04:51:54 -06:00
|
|
|
class RivExtrudedCurveIntersectionPartMgr;
|
2017-02-24 04:07:15 -06:00
|
|
|
class RivReservoirViewPartMgr;
|
2021-02-25 09:38:56 -06:00
|
|
|
class RivStreamlinesPartMgr;
|
2019-11-22 05:36:39 -06:00
|
|
|
class RimRegularLegendConfig;
|
|
|
|
class RimTernaryLegendConfig;
|
|
|
|
class RimEclipseResultDefinition;
|
2020-02-27 06:35:14 -06:00
|
|
|
class RimElementVectorResult;
|
2021-02-25 09:38:56 -06:00
|
|
|
class RimStreamlineInViewCollection;
|
2013-12-03 13:30:32 -06:00
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
namespace cvf
|
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
class Transform;
|
|
|
|
class ScalarMapperUniformLevels;
|
|
|
|
class ModelBasicList;
|
|
|
|
class OverlayItem;
|
|
|
|
} // namespace cvf
|
2012-05-18 02:45:23 -05:00
|
|
|
|
|
|
|
//==================================================================================================
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
|
|
|
///
|
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;
|
2019-09-06 03:40:57 -05:00
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
public:
|
2018-03-01 00:51:30 -06:00
|
|
|
RimEclipseView();
|
2018-10-18 12:45:57 -05:00
|
|
|
~RimEclipseView() override;
|
2018-03-01 00:51:30 -06:00
|
|
|
|
2021-02-25 09:38:56 -06:00
|
|
|
RimEclipseCellColors* cellResult() const;
|
|
|
|
RimCellEdgeColors* cellEdgeResult() const;
|
|
|
|
RimElementVectorResult* elementVectorResult() const;
|
|
|
|
RimEclipseFaultColors* faultResultSettings() const;
|
|
|
|
RimStimPlanColors* fractureColors() const;
|
|
|
|
RimSimWellInViewCollection* wellCollection() const;
|
|
|
|
RimFaultInViewCollection* faultCollection() const;
|
|
|
|
RimVirtualPerforationResults* virtualPerforationResult() const;
|
|
|
|
RimStreamlineInViewCollection* streamlineCollection() const;
|
2018-03-14 03:35:48 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
bool showInvalidCells() const;
|
|
|
|
bool showInactiveCells() const;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2013-02-25 02:44:26 -06:00
|
|
|
// Access internal objects
|
2019-09-06 03:40:57 -05:00
|
|
|
const RimPropertyFilterCollection* propertyFilterCollection() const override;
|
2013-02-25 02:44:26 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
RimEclipsePropertyFilterCollection* eclipsePropertyFilterCollection();
|
|
|
|
const RimEclipsePropertyFilterCollection* eclipsePropertyFilterCollection() const;
|
|
|
|
void setOverridePropertyFilterCollection( RimEclipsePropertyFilterCollection* pfc );
|
2015-08-27 08:45:22 -05:00
|
|
|
|
2020-02-28 07:38:24 -06:00
|
|
|
RigCaseCellResultsData* currentGridCellResults() const;
|
2019-09-06 03:40:57 -05:00
|
|
|
const RigActiveCellInfo* currentActiveCellInfo() const;
|
|
|
|
RimEclipseCellColors* currentFaultResultColors();
|
2013-04-18 08:10:57 -05:00
|
|
|
|
2020-02-28 07:38:24 -06:00
|
|
|
std::vector<double> currentCellResultData() const;
|
|
|
|
void setCurrentCellResultData( const std::vector<double>& values );
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void setEclipseCase( RimEclipseCase* reservoir );
|
|
|
|
RimEclipseCase* eclipseCase() const;
|
|
|
|
RimCase* ownerCase() const override;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
RigMainGrid* mainGrid() const;
|
2017-01-09 03:37:07 -06:00
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
// Display model generation
|
2013-09-08 15:59:46 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
bool isTimeStepDependentDataVisible() const override;
|
2013-04-12 05:03:04 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void scheduleGeometryRegen( RivCellSetEnum geometryType ) override;
|
|
|
|
void scheduleReservoirGridGeometryRegen();
|
|
|
|
void scheduleSimWellGeometryRegen();
|
|
|
|
void updateDisplayModelForWellResults();
|
2015-05-08 03:38:10 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void calculateCompletionTypeAndRedrawIfRequired();
|
2018-10-29 05:23:06 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
bool isVirtualConnectionFactorGeometryVisible() const;
|
|
|
|
bool isMainGridVisible() const;
|
2018-03-14 03:35:48 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
const std::vector<RivCellSetEnum>& visibleGridParts() const;
|
|
|
|
const RivReservoirViewPartMgr* reservoirGridPartManager() const;
|
|
|
|
RivReservoirViewPartMgr* reservoirGridPartManager();
|
2015-04-30 03:34:15 -05:00
|
|
|
|
2015-05-22 06:19:42 -05:00
|
|
|
// Does this belong here, really ?
|
2019-09-06 03:40:57 -05:00
|
|
|
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:
|
2020-02-12 04:43:15 -06:00
|
|
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
2019-09-06 03:40:57 -05:00
|
|
|
void updateIconStateForFilterCollections();
|
|
|
|
|
2019-11-01 04:13:32 -05:00
|
|
|
void defineAxisLabels( cvf::String* xLabel, cvf::String* yLabel, cvf::String* zLabel ) override;
|
2015-09-23 07:35:35 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
bool isUsingFormationNames() const override;
|
2015-11-23 00:24:50 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void calculateCurrentTotalCellVisibility( cvf::UByteArray* totalVisibility, int timeStep ) override;
|
2016-09-12 04:36:59 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
std::vector<RimLegendConfig*> legendConfigs() const override;
|
|
|
|
cvf::Color4f colorFromCellCategory( RivCellSetEnum geometryType ) const;
|
2017-08-24 02:27:08 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void syncronizeLocalAnnotationsFromGlobal();
|
2018-12-04 07:33:14 -06:00
|
|
|
|
2015-05-22 06:19:42 -05:00
|
|
|
protected:
|
2019-09-06 03:40:57 -05: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-11-01 08:57:07 -05:00
|
|
|
bool isShowingActiveCellsOnly() override;
|
2019-11-01 04:13:32 -05:00
|
|
|
void onUpdateDisplayModelForCurrentTimeStep() override;
|
2021-01-18 07:49:03 -06:00
|
|
|
void updateVisibleCellColors();
|
|
|
|
void updateVisibleGeometries();
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void appendWellsAndFracturesToModel();
|
2020-03-02 01:55:45 -06:00
|
|
|
void appendElementVectorResultToModel();
|
2021-02-25 09:38:56 -06:00
|
|
|
void appendStreamlinesToModel();
|
2019-09-06 03:40:57 -05:00
|
|
|
|
2019-10-31 09:32:30 -05:00
|
|
|
void onCreateDisplayModel() override;
|
2019-09-06 03:40:57 -05:00
|
|
|
RimPropertyFilterCollection* nativePropertyFilterCollection();
|
|
|
|
virtual std::set<RivCellSetEnum> allVisibleFaultGeometryTypes() const;
|
2015-11-16 04:30:03 -06:00
|
|
|
|
2015-05-22 06:19:42 -05:00
|
|
|
private:
|
2019-09-06 03:40:57 -05:00
|
|
|
QString createAutoName() const override;
|
2018-12-14 06:41:35 -06:00
|
|
|
|
2019-10-31 10:37:16 -05:00
|
|
|
void onUpdateDisplayModelVisibility() override;
|
2013-02-25 02:44:26 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
std::vector<size_t> indicesToVisibleGrids() const;
|
2019-10-31 09:32:30 -05:00
|
|
|
void onUpdateScaleTransform() override;
|
2019-09-06 03:40:57 -05:00
|
|
|
cvf::Transform* scaleTransform() override;
|
2014-01-07 07:27:43 -06:00
|
|
|
|
2019-10-31 09:32:30 -05:00
|
|
|
void onUpdateStaticCellColors() override;
|
2019-09-06 03:40:57 -05:00
|
|
|
void updateStaticCellColors( RivCellSetEnum geometryType );
|
2018-09-19 07:28:27 -05:00
|
|
|
|
2019-10-31 10:37:16 -05:00
|
|
|
void onUpdateLegends() override;
|
2019-11-22 06:31:35 -06:00
|
|
|
void updateLegendRangesTextAndVisibility( RimRegularLegendConfig* legendConfig,
|
|
|
|
RimTernaryLegendConfig* ternaryLegendConfig,
|
|
|
|
QString legendLabel,
|
|
|
|
RimEclipseResultDefinition* eclResDef,
|
|
|
|
int timeStepIndex );
|
2019-11-22 05:36:39 -06:00
|
|
|
|
2019-10-31 09:32:30 -05:00
|
|
|
void onResetLegendsInViewer() override;
|
2019-09-06 03:40:57 -05:00
|
|
|
void updateVirtualConnectionLegendRanges();
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void updateFaultColors();
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void syncronizeWellsWithResults();
|
2015-06-22 02:09:33 -05:00
|
|
|
|
2019-11-08 03:39:40 -06:00
|
|
|
void onClampCurrentTimestep() override;
|
|
|
|
size_t onTimeStepCountRequested() override;
|
|
|
|
|
2021-02-25 09:38:56 -06:00
|
|
|
void onAnimationsUpdate( const caf::SignalEmitter* emitter );
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void setVisibleGridParts( const std::vector<RivCellSetEnum>& cellSets );
|
|
|
|
void setVisibleGridPartsWatertight();
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2017-12-05 11:20:29 -06:00
|
|
|
private:
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmField<bool> m_showInvalidCells;
|
|
|
|
caf::PdmField<bool> m_showInactiveCells;
|
|
|
|
|
|
|
|
caf::PdmChildField<RimEclipseCellColors*> m_cellResult;
|
|
|
|
caf::PdmChildField<RimCellEdgeColors*> m_cellEdgeResult;
|
2020-02-27 06:35:14 -06:00
|
|
|
caf::PdmChildField<RimElementVectorResult*> m_elementVectorResult;
|
2019-09-06 03:40:57 -05:00
|
|
|
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
|
|
|
|
2020-02-28 07:38:24 -06:00
|
|
|
caf::PdmProxyValueField<std::vector<double>> m_cellResultData;
|
|
|
|
|
2021-02-25 09:38:56 -06:00
|
|
|
caf::PdmChildField<RimSimWellInViewCollection*> m_wellCollection;
|
|
|
|
caf::PdmChildField<RimFaultInViewCollection*> m_faultCollection;
|
|
|
|
caf::PdmChildField<RimStreamlineInViewCollection*> m_streamlineCollection;
|
2018-03-01 00:51:30 -06:00
|
|
|
|
2015-08-27 08:45:22 -05:00
|
|
|
caf::PdmChildField<RimEclipsePropertyFilterCollection*> m_propertyFilterCollection;
|
|
|
|
caf::PdmPointer<RimEclipsePropertyFilterCollection> m_overridePropertyFilterCollection;
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmPointer<RimEclipseCase> m_eclipseCase;
|
|
|
|
|
|
|
|
cvf::ref<RivReservoirViewPartMgr> m_reservoirGridPartManager;
|
|
|
|
cvf::ref<RivReservoirSimWellsPartMgr> m_simWellsPartManager;
|
2021-02-25 09:38:56 -06:00
|
|
|
cvf::ref<RivStreamlinesPartMgr> m_streamlinesPartManager;
|
2013-04-22 02:13:37 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
std::vector<RivCellSetEnum> m_visibleGridParts;
|
2012-05-18 02:45:23 -05:00
|
|
|
};
|