///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2011- Statoil ASA // Copyright (C) 2013- Ceetron Solutions AS // Copyright (C) 2011-2012 Ceetron AS // // 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 // for more details. // ///////////////////////////////////////////////////////////////////////////////// #pragma once #include "RiaPorosityModel.h" #include "RiaDefines.h" #include "RimCase.h" #include "cafPdmChildArrayField.h" #include "cafPdmChildField.h" #include "cafPdmField.h" #include "cafPdmObject.h" #include "cvfColor3.h" #include "cvfObject.h" #include #include class QString; class RigCaseCellResultsData; class RigEclipseCaseData; class RigGridBase; class RigMainGrid; class RigVirtualPerforationTransmissibilities; class RimCaseCollection; class RimEclipseContourMapView; class RimEclipseContourMapViewCollection; class RimEclipseInputPropertyCollection; class RimEclipseView; class RimIdenticalGridCaseGroup; class RimReservoirCellResultsStorage; class RifReaderSettings; //================================================================================================== // // Interface for reservoirs. // //================================================================================================== class RimEclipseCase : public RimCase { CAF_PDM_HEADER_INIT; public: RimEclipseCase(); ~RimEclipseCase() override; // Fields: caf::PdmChildArrayField reservoirViews; std::vector filesContainingFaults() const; void setFilesContainingFaults( const std::vector& val ); bool ensureReservoirCaseIsOpen(); bool openReserviorCase(); virtual bool openEclipseGridFile() = 0; virtual bool importAsciiInputProperties( const QStringList& fileNames ); RigEclipseCaseData* eclipseCaseData(); const RigEclipseCaseData* eclipseCaseData() const; void ensureDeckIsParsedForEquilData(); cvf::Color3f defaultWellColor( const QString& wellName ); const RigMainGrid* mainGrid() const; RigCaseCellResultsData* results( RiaDefines::PorosityModelType porosityModel ); const RigCaseCellResultsData* results( RiaDefines::PorosityModelType porosityModel ) const; RimReservoirCellResultsStorage* resultsStorage( RiaDefines::PorosityModelType porosityModel ); const RimReservoirCellResultsStorage* resultsStorage( RiaDefines::PorosityModelType porosityModel ) const; RimEclipseView* createAndAddReservoirView(); RimEclipseView* createCopyAndAddView( const RimEclipseView* sourceView ); const RigVirtualPerforationTransmissibilities* computeAndGetVirtualPerforationTransmissibilities(); virtual QString locationOnDisc() const { return QString(); } RimCaseCollection* parentCaseCollection(); RimEclipseContourMapViewCollection* contourMapCollection(); RimEclipseInputPropertyCollection* inputPropertyCollection(); QStringList timeStepStrings() const override; QString timeStepName( int frameIdx ) const override; std::vector timeStepDates() const override; cvf::BoundingBox reservoirBoundingBox() override; cvf::BoundingBox activeCellsBoundingBox() const override; cvf::BoundingBox allCellsBoundingBox() const override; cvf::Vec3d displayModelOffset() const override; virtual void reloadEclipseGridFile() = 0; double characteristicCellSize() const override; std::set sortedSimWellNames() const; void loadAndSyncronizeInputProperties( bool importGridOrFaultData ); void ensureFaultDataIsComputed(); bool ensureNncDataIsComputed(); void createDisplayModelAndUpdateAllViews(); void setReaderSettings( std::shared_ptr readerSettings ); protected: void initAfterRead() override; void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override; void updateFormationNamesData() override; // Internal methods protected: void computeCachedData(); void setReservoirData( RigEclipseCaseData* eclipseCase ); std::vector additionalFiles() const; private: void createTimeStepFormatString(); std::vector allSpecialViews() const override; protected: caf::PdmField m_flipXAxis; caf::PdmField m_flipYAxis; caf::PdmChildField m_inputPropertyCollection; std::shared_ptr m_readerSettings; private: caf::PdmField m_releaseResultMemory; caf::PdmChildField m_contourMapCollection; cvf::ref m_rigEclipseCase; QString m_timeStepFormatString; std::map m_wellToColorMap; caf::PdmChildField m_matrixModelResults; caf::PdmChildField m_fractureModelResults; // To be removed as the caching of file names causes issues when using the project file as template // https://github.com/OPM/ResInsight/issues/7308 caf::PdmField> m_filesContainingFaults_OBSOLETE; };