2013-02-14 08:27:35 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2011-2012 Statoil ASA, 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 <http://www.gnu.org/licenses/gpl.html>
|
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "cvfBase.h"
|
|
|
|
#include "cvfObject.h"
|
|
|
|
#include "cafPdmField.h"
|
|
|
|
#include "cafPdmObject.h"
|
2013-05-06 03:55:00 -05:00
|
|
|
#include "cafAppEnum.h"
|
2013-02-14 08:27:35 -06:00
|
|
|
|
2013-03-22 10:40:41 -05:00
|
|
|
#include "RimCase.h"
|
2013-05-06 03:55:00 -05:00
|
|
|
#include "RimDefines.h"
|
2013-02-14 08:27:35 -06:00
|
|
|
|
2013-02-15 01:44:45 -06:00
|
|
|
class RimIdenticalGridCaseGroup;
|
|
|
|
class RimResultDefinition;
|
2013-03-22 04:03:51 -05:00
|
|
|
class RimStatisticsCaseCollection;
|
2013-03-02 08:32:38 -06:00
|
|
|
class RigMainGrid;
|
2013-04-12 05:03:04 -05:00
|
|
|
class RigSingleWellResultsData;
|
2013-02-15 01:44:45 -06:00
|
|
|
|
2013-02-14 08:27:35 -06:00
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==================================================================================================
|
2013-03-22 09:43:42 -05:00
|
|
|
class RimStatisticsCase : public RimCase
|
2013-02-14 08:27:35 -06:00
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
|
|
|
public:
|
2013-03-22 04:03:51 -05:00
|
|
|
RimStatisticsCase();
|
|
|
|
virtual ~RimStatisticsCase();
|
2013-02-14 08:27:35 -06:00
|
|
|
|
2013-03-02 08:32:38 -06:00
|
|
|
void setMainGrid(RigMainGrid* mainGrid);
|
|
|
|
|
2013-04-02 08:20:55 -05:00
|
|
|
void computeStatistics();
|
2013-04-08 05:16:38 -05:00
|
|
|
bool hasComputedStatistics() const;
|
2013-04-05 06:29:47 -05:00
|
|
|
void clearComputedStatistics();
|
|
|
|
|
2013-12-20 07:45:04 -06:00
|
|
|
void scheduleACTIVEGeometryRegenOnReservoirViews();
|
|
|
|
void updateConnectedEditorsAndReservoirViews();
|
|
|
|
|
2013-04-02 08:20:55 -05:00
|
|
|
virtual bool openEclipseGridFile();
|
2013-03-02 08:32:38 -06:00
|
|
|
|
2013-03-22 05:47:46 -05:00
|
|
|
RimCaseCollection* parentStatisticsCaseCollection();
|
2013-02-15 01:44:45 -06:00
|
|
|
|
2013-04-02 09:59:55 -05:00
|
|
|
enum PercentileCalcType
|
|
|
|
{
|
2013-04-05 03:49:39 -05:00
|
|
|
NEAREST_OBSERVATION,
|
2013-04-30 04:36:50 -05:00
|
|
|
HISTOGRAM_ESTIMATED,
|
|
|
|
INTERPOLATED_OBSERVATION
|
2013-04-02 09:59:55 -05:00
|
|
|
};
|
|
|
|
|
2013-09-16 00:42:30 -05:00
|
|
|
caf::PdmField< bool > m_calculateEditCommand;
|
2013-04-08 07:17:39 -05:00
|
|
|
|
2013-02-14 08:27:35 -06:00
|
|
|
private:
|
2013-03-02 08:32:38 -06:00
|
|
|
RimIdenticalGridCaseGroup* caseGroup();
|
|
|
|
|
2013-03-22 09:43:42 -05:00
|
|
|
void getSourceCases(std::vector<RimCase*>& sourceCases);
|
2013-03-02 08:32:38 -06:00
|
|
|
|
2013-04-08 10:02:07 -05:00
|
|
|
void populateWithDefaultsIfNeeded();
|
|
|
|
|
2013-04-02 09:59:55 -05:00
|
|
|
void updateSelectionListVisibilities();
|
2013-04-03 09:13:49 -05:00
|
|
|
void updateSelectionSummaryLabel();
|
|
|
|
void updatePercentileUiVisibility();
|
2013-04-02 09:59:55 -05:00
|
|
|
|
2013-09-16 00:42:30 -05:00
|
|
|
|
2013-04-12 05:03:04 -05:00
|
|
|
void setWellResultsAndUpdateViews(const cvf::Collection<RigSingleWellResultsData>& sourceCaseWellResults);
|
|
|
|
|
2013-04-03 09:13:49 -05:00
|
|
|
// Pdm system overrides
|
2013-04-08 05:16:38 -05:00
|
|
|
virtual void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) ;
|
2013-04-03 09:13:49 -05:00
|
|
|
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly );
|
|
|
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
|
|
|
|
|
|
|
virtual void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute * attribute );
|
|
|
|
// Fields
|
2013-04-05 06:29:47 -05:00
|
|
|
|
2013-04-02 09:59:55 -05:00
|
|
|
caf::PdmField< caf::AppEnum< RimDefines::ResultCatType > > m_resultType;
|
|
|
|
caf::PdmField< caf::AppEnum< RimDefines::PorosityModelType > > m_porosityModel;
|
|
|
|
|
2013-04-03 09:13:49 -05:00
|
|
|
caf::PdmField<QString> m_selectionSummary;
|
|
|
|
|
|
|
|
caf::PdmField<std::vector<QString> > m_selectedDynamicProperties;
|
|
|
|
caf::PdmField<std::vector<QString> > m_selectedStaticProperties;
|
|
|
|
caf::PdmField<std::vector<QString> > m_selectedGeneratedProperties;
|
|
|
|
caf::PdmField<std::vector<QString> > m_selectedInputProperties;
|
2013-04-02 09:59:55 -05:00
|
|
|
|
2013-04-03 09:13:49 -05:00
|
|
|
caf::PdmField<std::vector<QString> > m_selectedFractureDynamicProperties;
|
|
|
|
caf::PdmField<std::vector<QString> > m_selectedFractureStaticProperties;
|
|
|
|
caf::PdmField<std::vector<QString> > m_selectedFractureGeneratedProperties;
|
|
|
|
caf::PdmField<std::vector<QString> > m_selectedFractureInputProperties;
|
2013-04-02 09:59:55 -05:00
|
|
|
|
|
|
|
|
2013-04-03 09:13:49 -05:00
|
|
|
caf::PdmField< bool > m_calculatePercentiles;
|
|
|
|
caf::PdmField< caf::AppEnum< PercentileCalcType > > m_percentileCalculationType;
|
|
|
|
caf::PdmField<double > m_lowPercentile;
|
|
|
|
caf::PdmField<double > m_midPercentile;
|
|
|
|
caf::PdmField<double > m_highPercentile;
|
2013-04-02 09:59:55 -05:00
|
|
|
|
2013-04-12 05:03:04 -05:00
|
|
|
caf::PdmField<QString> m_wellDataSourceCase;
|
2013-02-14 08:27:35 -06:00
|
|
|
};
|