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
|
|
|
|
|
2021-01-21 05:58:46 -06:00
|
|
|
#include "RiaDefines.h"
|
2018-10-09 05:23:44 -05:00
|
|
|
|
2015-05-15 02:16:33 -05:00
|
|
|
#include "RimEclipseCase.h"
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2019-12-10 09:19:39 -06:00
|
|
|
#include "cafFilePath.h"
|
2022-02-23 06:57:02 -06:00
|
|
|
#include "cafPdmProxyValueField.h"
|
2018-10-09 05:23:44 -05:00
|
|
|
|
2022-02-23 06:57:02 -06:00
|
|
|
class RifReaderRftInterface;
|
2019-10-30 10:52:25 -05:00
|
|
|
class RifReaderEclipseRft;
|
2022-02-23 06:57:02 -06:00
|
|
|
class RifReaderOpmRft;
|
2013-02-27 08:27:33 -06:00
|
|
|
class RifReaderInterface;
|
2019-10-30 10:52:25 -05:00
|
|
|
class RigFlowDiagSolverInterface;
|
2013-02-27 08:27:33 -06:00
|
|
|
class RigMainGrid;
|
2019-10-30 10:52:25 -05:00
|
|
|
class RimEclipseInputProperty;
|
|
|
|
class RimEclipseInputPropertyCollection;
|
2016-12-14 02:50:30 -06:00
|
|
|
class RimFlowDiagSolution;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
//
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2012-05-18 02:45:23 -05:00
|
|
|
//
|
|
|
|
//==================================================================================================
|
2015-06-25 04:56:18 -05:00
|
|
|
class RimEclipseResultCase : public RimEclipseCase
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
2012-06-26 09:10:41 -05:00
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
public:
|
2015-06-25 04:56:18 -05:00
|
|
|
RimEclipseResultCase();
|
2018-10-18 12:45:57 -05:00
|
|
|
~RimEclipseResultCase() override;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void setCaseInfo( const QString& userDescription, const QString& fileName );
|
|
|
|
void setSourSimFileName( const QString& fileName );
|
|
|
|
bool hasSourSimFile();
|
2013-04-08 07:29:43 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
bool openEclipseGridFile() override;
|
2017-08-24 23:51:56 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
bool importGridAndResultMetaData( bool showTimeStepFilter );
|
2020-09-14 14:47:48 -05:00
|
|
|
bool importAsciiInputProperties( const QStringList& fileNames ) override;
|
2017-08-24 23:51:56 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void reloadEclipseGridFile() override;
|
|
|
|
bool openAndReadActiveCellData( RigEclipseCaseData* mainEclipseCase );
|
|
|
|
void readGridDimensions( std::vector<std::vector<int>>& gridDimensions );
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2021-01-21 05:58:46 -06:00
|
|
|
caf::AppEnum<RiaDefines::EclipseUnitSystem> unitSystem();
|
2020-09-25 04:14:56 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
QString locationOnDisc() const override;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2017-03-09 15:45:47 -06:00
|
|
|
RimFlowDiagSolution* defaultFlowDiagSolution();
|
2016-12-14 02:50:30 -06:00
|
|
|
std::vector<RimFlowDiagSolution*> flowDiagSolutions();
|
2016-12-20 04:41:05 -06:00
|
|
|
RigFlowDiagSolverInterface* flowDiagSolverInterface();
|
|
|
|
|
2022-02-23 06:57:02 -06:00
|
|
|
RifReaderRftInterface* rftReader();
|
2017-10-05 02:29:19 -05:00
|
|
|
|
2017-03-31 04:37:07 -05:00
|
|
|
protected:
|
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 defineEditorAttribute( const caf::PdmFieldHandle* field,
|
|
|
|
QString uiConfigName,
|
|
|
|
caf::PdmUiEditorAttribute* attribute ) override;
|
2017-03-31 04:37:07 -05:00
|
|
|
|
|
|
|
private:
|
2019-09-06 03:40:57 -05:00
|
|
|
void loadAndUpdateSourSimData();
|
2022-02-24 01:20:43 -06:00
|
|
|
void ensureRftDataIsImported();
|
2017-03-31 04:37:07 -05:00
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
private:
|
2019-09-06 03:40:57 -05:00
|
|
|
cvf::ref<RifReaderInterface> createMockModel( QString modelName );
|
2013-04-11 05:06:38 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
2013-06-26 02:02:37 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
cvf::ref<RigFlowDiagSolverInterface> m_flowDagSolverInterface;
|
2016-12-20 04:41:05 -06:00
|
|
|
|
2017-10-05 02:29:19 -05:00
|
|
|
cvf::ref<RifReaderEclipseRft> m_readerEclipseRft;
|
2022-02-23 06:57:02 -06:00
|
|
|
cvf::ref<RifReaderOpmRft> m_readerOpmRft;
|
2017-10-05 02:29:19 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
// Fields:
|
2021-01-21 05:58:46 -06:00
|
|
|
caf::PdmProxyValueField<caf::AppEnum<RiaDefines::EclipseUnitSystem>> m_unitSystem;
|
|
|
|
caf::PdmChildArrayField<RimFlowDiagSolution*> m_flowDiagSolutions;
|
|
|
|
caf::PdmField<caf::FilePath> m_sourSimFileName;
|
2016-12-14 02:50:30 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
bool m_gridAndWellDataIsReadFromFile;
|
|
|
|
bool m_activeCellInfoIsReadFromFile;
|
2022-02-23 06:57:02 -06:00
|
|
|
bool m_useOpmRftReader;
|
2022-02-24 01:20:43 -06:00
|
|
|
bool m_rftDataIsReadFromFile;
|
2012-05-18 02:45:23 -05:00
|
|
|
};
|