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"
|
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
|
|
|
|
2014-07-24 03:11:43 -05:00
|
|
|
#include "RivReservoirViewPartMgr.h"
|
2015-04-29 15:19:49 -05:00
|
|
|
#include "RimView.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;
|
|
|
|
class Rim3dOverlayInfoConfig;
|
2015-05-15 01:40:27 -05:00
|
|
|
class RimEclipseCase;
|
2013-05-06 03:55:00 -05:00
|
|
|
class RimCellEdgeResultSlot;
|
|
|
|
class RimCellPropertyFilter;
|
|
|
|
class RimCellPropertyFilterCollection;
|
2014-07-24 03:11:43 -05:00
|
|
|
class RimCellRangeFilter;
|
|
|
|
class RimCellRangeFilterCollection;
|
|
|
|
class RimFaultCollection;
|
2014-08-06 05:47:27 -05:00
|
|
|
class RimFaultResultSlot;
|
2014-07-24 03:11:43 -05:00
|
|
|
class RimReservoirCellResultsStorage;
|
2013-05-06 03:55:00 -05:00
|
|
|
class RimReservoirCellResultsStorage;
|
2014-07-24 03:11:43 -05:00
|
|
|
class RimResultSlot;
|
2013-05-06 03:55:00 -05:00
|
|
|
class RimWellCollection;
|
2013-03-22 11:17:56 -05:00
|
|
|
class RiuViewer;
|
2014-07-24 03:11:43 -05:00
|
|
|
class RivReservoirPipesPartMgr;
|
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
|
|
|
}
|
|
|
|
|
2013-12-03 13:30:32 -06:00
|
|
|
enum PartRenderMaskEnum
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
2013-12-03 13:30:32 -06:00
|
|
|
surfaceBit = 0x00000001,
|
|
|
|
meshSurfaceBit = 0x00000002,
|
|
|
|
faultBit = 0x00000004,
|
|
|
|
meshFaultBit = 0x00000008,
|
2012-05-18 02:45:23 -05:00
|
|
|
};
|
2013-12-03 13:30:32 -06:00
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
//==================================================================================================
|
|
|
|
///
|
|
|
|
///
|
|
|
|
//==================================================================================================
|
2015-05-21 03:05:33 -05:00
|
|
|
class RimEclipseView : public RimView
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
public:
|
2015-05-21 03:05:33 -05:00
|
|
|
RimEclipseView(void);
|
|
|
|
virtual ~RimEclipseView(void);
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2013-02-25 02:44:26 -06:00
|
|
|
// Fields containing child objects :
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2013-02-25 02:44:26 -06:00
|
|
|
caf::PdmField<RimResultSlot*> cellResult;
|
|
|
|
caf::PdmField<RimCellEdgeResultSlot*> cellEdgeResult;
|
2014-08-06 05:47:27 -05:00
|
|
|
caf::PdmField<RimFaultResultSlot*> faultResultSettings;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2013-02-25 02:44:26 -06:00
|
|
|
caf::PdmField<RimCellRangeFilterCollection*> rangeFilterCollection;
|
|
|
|
caf::PdmField<RimCellPropertyFilterCollection*> propertyFilterCollection;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2013-02-25 02:44:26 -06:00
|
|
|
caf::PdmField<RimWellCollection*> wellCollection;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2013-12-03 13:30:32 -06:00
|
|
|
caf::PdmField<RimFaultCollection*> faultCollection;
|
|
|
|
|
2013-02-25 02:44:26 -06:00
|
|
|
caf::PdmField<bool> showInvalidCells;
|
|
|
|
caf::PdmField<bool> showInactiveCells;
|
|
|
|
caf::PdmField<bool> showMainGrid;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
|
|
|
|
2013-02-25 02:44:26 -06:00
|
|
|
// Access internal objects
|
2013-04-12 05:03:04 -05:00
|
|
|
RimReservoirCellResultsStorage* currentGridCellResults();
|
2013-03-13 05:50:31 -05:00
|
|
|
RigActiveCellInfo* currentActiveCellInfo();
|
2014-09-08 00:35:23 -05:00
|
|
|
RimResultSlot* currentFaultResultSlot();
|
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2015-05-15 01:40:27 -05:00
|
|
|
void setEclipseCase(RimEclipseCase* reservoir);
|
|
|
|
RimEclipseCase* eclipseCase();
|
2015-04-29 15:19:49 -05:00
|
|
|
|
2013-02-25 02:44:26 -06:00
|
|
|
|
2015-04-20 09:56:26 -05:00
|
|
|
public:
|
2015-05-08 07:13:26 -05:00
|
|
|
|
2013-04-18 08:10:57 -05:00
|
|
|
|
2013-02-25 02:44:26 -06:00
|
|
|
// Does this belong here, really ?
|
|
|
|
void calculateVisibleWellCellsIncFence(cvf::UByteArray* visibleCells, RigGridBase * grid);
|
2012-05-18 02:45:23 -05:00
|
|
|
|
|
|
|
// Display model generation
|
|
|
|
public:
|
2015-05-15 11:51:49 -05:00
|
|
|
virtual void loadDataAndUpdate();
|
2014-07-31 01:46:30 -05:00
|
|
|
bool isTimeStepDependentDataVisible() const;
|
2013-09-08 15:59:46 -05:00
|
|
|
|
2015-05-21 08:39:44 -05:00
|
|
|
virtual void scheduleGeometryRegen(unsigned short geometryType);
|
2013-04-26 06:19:34 -05:00
|
|
|
void scheduleReservoirGridGeometryRegen();
|
2013-02-25 02:44:26 -06:00
|
|
|
void schedulePipeGeometryRegen();
|
2013-04-12 05:03:04 -05:00
|
|
|
void updateDisplayModelForWellResults();
|
|
|
|
|
2013-04-22 02:13:37 -05:00
|
|
|
const std::vector<RivReservoirViewPartMgr::ReservoirGeometryCacheType>&
|
|
|
|
visibleGridParts() const { return m_visibleGridParts;}
|
|
|
|
cvf::cref<RivReservoirViewPartMgr> reservoirGridPartManager() const { return m_reservoirGridPartManager.p(); }
|
2013-02-25 02:44:26 -06:00
|
|
|
|
2015-05-08 03:38:10 -05:00
|
|
|
private:
|
|
|
|
|
|
|
|
virtual void resetLegendsInViewer();
|
|
|
|
virtual void updateViewerWidgetWindowTitle();
|
|
|
|
|
2013-02-25 02:44:26 -06:00
|
|
|
// Display model generation
|
|
|
|
private:
|
2015-04-30 03:34:15 -05:00
|
|
|
|
2013-02-25 02:44:26 -06:00
|
|
|
void createDisplayModel();
|
|
|
|
void updateDisplayModelVisibility();
|
2015-05-08 03:38:10 -05:00
|
|
|
virtual void updateCurrentTimeStep();
|
|
|
|
|
2013-02-25 02:44:26 -06:00
|
|
|
void indicesToVisibleGrids(std::vector<size_t>* gridIndices);
|
2015-05-13 15:42:11 -05:00
|
|
|
virtual void updateScaleTransform();
|
|
|
|
virtual cvf::Transform* scaleTransform();
|
|
|
|
|
2015-05-08 03:38:10 -05:00
|
|
|
virtual void updateStaticCellColors();
|
2013-02-25 02:44:26 -06:00
|
|
|
void updateStaticCellColors(unsigned short geometryType);
|
|
|
|
void updateLegends();
|
2014-07-31 01:46:30 -05:00
|
|
|
void updateMinMaxValuesAndAddLegendToView(QString legendLabel, RimResultSlot* resultSlot, RigCaseCellResultsData* cellResultsData);
|
2013-02-25 02:44:26 -06:00
|
|
|
|
2014-06-13 00:27:00 -05:00
|
|
|
std::vector<RivReservoirViewPartMgr::ReservoirGeometryCacheType> visibleFaultGeometryTypes() const;
|
2014-01-07 07:27:43 -06:00
|
|
|
void updateFaultForcedVisibility();
|
2014-01-08 01:25:46 -06:00
|
|
|
void updateFaultColors();
|
2014-01-07 07:27:43 -06:00
|
|
|
|
2013-04-18 00:41:00 -05:00
|
|
|
cvf::ref<RivReservoirViewPartMgr> m_reservoirGridPartManager;
|
2013-02-25 02:44:26 -06:00
|
|
|
cvf::ref<RivReservoirPipesPartMgr> m_pipesPartManager;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
|
|
|
// Overridden PDM methods:
|
|
|
|
public:
|
2013-02-25 02:44:26 -06:00
|
|
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
2012-05-18 02:45:23 -05:00
|
|
|
protected:
|
2013-02-25 02:44:26 -06:00
|
|
|
virtual void initAfterRead();
|
2013-10-17 06:38:36 -05:00
|
|
|
virtual void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering );
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2013-02-25 02:44:26 -06:00
|
|
|
// Really private
|
2012-05-18 02:45:23 -05:00
|
|
|
private:
|
2013-02-25 02:44:26 -06:00
|
|
|
void syncronizeWellsWithResults();
|
|
|
|
void clampCurrentTimestep();
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2015-05-20 05:29:01 -05:00
|
|
|
virtual RimCase* ownerCase();
|
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
private:
|
2015-05-15 01:40:27 -05:00
|
|
|
caf::PdmPointer<RimEclipseCase> m_reservoir;
|
2013-04-22 02:13:37 -05:00
|
|
|
|
2013-12-18 16:37:30 -06:00
|
|
|
|
2013-04-22 02:13:37 -05:00
|
|
|
std::vector<RivReservoirViewPartMgr::ReservoirGeometryCacheType> m_visibleGridParts;
|
2012-05-18 02:45:23 -05:00
|
|
|
};
|
|
|
|
|