///////////////////////////////////////////////////////////////////////////////// // // 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 "RiaDefines.h" #include "RimEclipseCase.h" #include "cafAppEnum.h" #include "cafPdmField.h" #include "cafPdmObject.h" #include "cvfCollection.h" #include "cvfObject.h" class RigMainGrid; class RigSimWellData; class RimEclipseResultDefinition; class RimEclipseStatisticsCaseCollection; class RimIdenticalGridCaseGroup; //================================================================================================== // // // //================================================================================================== class RimEclipseStatisticsCase : public RimEclipseCase { CAF_PDM_HEADER_INIT; public: RimEclipseStatisticsCase(); ~RimEclipseStatisticsCase() override; void setMainGrid( RigMainGrid* mainGrid ); void computeStatistics(); bool hasComputedStatistics() const; void clearComputedStatistics(); void computeStatisticsAndUpdateViews(); void updateConnectedEditorsAndReservoirViews(); bool openEclipseGridFile() override; void reloadEclipseGridFile() override; RimCaseCollection* parentStatisticsCaseCollection() const; enum PercentileCalcType { NEAREST_OBSERVATION, HISTOGRAM_ESTIMATED, INTERPOLATED_OBSERVATION }; caf::PdmField m_calculateEditCommand; void updateFilePathsFromProjectPath( const QString& projectPath, const QString& oldProjectPath ) override {} void populateResultSelectionAfterLoadingGrid(); private: void scheduleACTIVEGeometryRegenOnReservoirViews(); RimIdenticalGridCaseGroup* caseGroup() const; std::vector getSourceCases() const; void populateResultSelection(); void updateSelectionListVisibilities(); void updateSelectionSummaryLabel(); void updatePercentileUiVisibility(); void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; QList calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly ) override; void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; void loadSimulationWellDataFromSourceCase(); void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override; private: caf::PdmField> m_resultType; caf::PdmField> m_porosityModel; caf::PdmField m_selectionSummary; caf::PdmField> m_selectedDynamicProperties; caf::PdmField> m_selectedStaticProperties; caf::PdmField> m_selectedGeneratedProperties; caf::PdmField> m_selectedInputProperties; caf::PdmField> m_selectedFractureDynamicProperties; caf::PdmField> m_selectedFractureStaticProperties; caf::PdmField> m_selectedFractureGeneratedProperties; caf::PdmField> m_selectedFractureInputProperties; caf::PdmField m_calculatePercentiles; caf::PdmField> m_percentileCalculationType; caf::PdmField m_lowPercentile; caf::PdmField m_midPercentile; caf::PdmField m_highPercentile; caf::PdmField m_wellDataSourceCase; caf::PdmField m_useZeroAsInactiveCellValue; bool m_populateSelectionAfterLoadingGrid; };