2012-05-18 09:45:23 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
2014-09-23 15:04:57 +02:00
|
|
|
// Copyright (C) 2011- Statoil ASA
|
|
|
|
|
// Copyright (C) 2013- Ceetron Solutions AS
|
|
|
|
|
// Copyright (C) 2011-2012 Ceetron AS
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2012-05-18 09:45:23 +02: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 10:40:57 +02:00
|
|
|
//
|
2012-05-18 09:45:23 +02: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 10:40:57 +02:00
|
|
|
//
|
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2012-05-18 09:45:23 +02:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2018-10-09 12:23:44 +02:00
|
|
|
#include "RiaEclipseUnitTools.h"
|
|
|
|
|
|
2015-05-15 09:16:33 +02:00
|
|
|
#include "RimEclipseCase.h"
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2019-12-10 16:19:39 +01:00
|
|
|
#include "cafFilePath.h"
|
2018-10-09 12:23:44 +02:00
|
|
|
#include <cafPdmProxyValueField.h>
|
|
|
|
|
|
2019-10-30 16:52:25 +01:00
|
|
|
class RifReaderEclipseRft;
|
2013-02-27 15:27:33 +01:00
|
|
|
class RifReaderInterface;
|
2019-10-30 16:52:25 +01:00
|
|
|
class RigFlowDiagSolverInterface;
|
2013-02-27 15:27:33 +01:00
|
|
|
class RigMainGrid;
|
2019-10-30 16:52:25 +01:00
|
|
|
class RimEclipseInputProperty;
|
|
|
|
|
class RimEclipseInputPropertyCollection;
|
2016-12-14 09:50:30 +01:00
|
|
|
class RimFlowDiagSolution;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
|
//
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2012-05-18 09:45:23 +02:00
|
|
|
//
|
|
|
|
|
//==================================================================================================
|
2015-06-25 11:56:18 +02:00
|
|
|
class RimEclipseResultCase : public RimEclipseCase
|
2012-05-18 09:45:23 +02:00
|
|
|
{
|
2012-06-26 16:10:41 +02:00
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
|
2012-05-18 09:45:23 +02:00
|
|
|
public:
|
2015-06-25 11:56:18 +02:00
|
|
|
RimEclipseResultCase();
|
2018-10-18 19:45:57 +02:00
|
|
|
~RimEclipseResultCase() override;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void setCaseInfo( const QString& userDescription, const QString& fileName );
|
|
|
|
|
void setSourSimFileName( const QString& fileName );
|
|
|
|
|
bool hasSourSimFile();
|
2013-04-08 14:29:43 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
bool openEclipseGridFile() override;
|
2017-08-25 06:51:56 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
bool importGridAndResultMetaData( bool showTimeStepFilter );
|
2019-10-30 16:52:25 +01:00
|
|
|
bool importAsciiInputProperties( const QStringList& fileNames );
|
2017-08-25 06:51:56 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void reloadEclipseGridFile() override;
|
|
|
|
|
bool openAndReadActiveCellData( RigEclipseCaseData* mainEclipseCase );
|
|
|
|
|
void readGridDimensions( std::vector<std::vector<int>>& gridDimensions );
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2013-04-08 12:01:40 +02:00
|
|
|
// Overrides from RimCase
|
2019-09-06 10:40:57 +02:00
|
|
|
QString locationOnDisc() const override;
|
2020-02-12 11:13:38 +01:00
|
|
|
void updateFilePathsFromProjectPath( const QString& newProjectPath, const QString& oldProjectPath ) override;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2017-03-09 22:45:47 +01:00
|
|
|
RimFlowDiagSolution* defaultFlowDiagSolution();
|
2016-12-14 09:50:30 +01:00
|
|
|
std::vector<RimFlowDiagSolution*> flowDiagSolutions();
|
2016-12-20 11:41:05 +01:00
|
|
|
RigFlowDiagSolverInterface* flowDiagSolverInterface();
|
|
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
RifReaderEclipseRft* rftReader();
|
2017-10-05 09:29:19 +02:00
|
|
|
|
2017-03-31 11:37:07 +02:00
|
|
|
protected:
|
2020-02-12 11:43:15 +01:00
|
|
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
2019-09-06 10:40:57 +02:00
|
|
|
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
|
|
|
|
QString uiConfigName,
|
|
|
|
|
caf::PdmUiEditorAttribute* attribute ) override;
|
2017-03-31 11:37:07 +02:00
|
|
|
|
|
|
|
|
private:
|
2019-09-06 10:40:57 +02:00
|
|
|
void loadAndUpdateSourSimData();
|
2017-03-31 11:37:07 +02:00
|
|
|
|
2012-05-18 09:45:23 +02:00
|
|
|
private:
|
2019-09-06 10:40:57 +02:00
|
|
|
cvf::ref<RifReaderInterface> createMockModel( QString modelName );
|
2013-04-11 12:06:38 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void initAfterRead() override;
|
2013-04-11 12:06:38 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
2013-06-26 09:02:37 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
cvf::ref<RigFlowDiagSolverInterface> m_flowDagSolverInterface;
|
2016-12-20 11:41:05 +01:00
|
|
|
|
2017-10-05 09:29:19 +02:00
|
|
|
cvf::ref<RifReaderEclipseRft> m_readerEclipseRft;
|
|
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
// Fields:
|
2018-10-09 12:23:44 +02:00
|
|
|
caf::PdmProxyValueField<RiaEclipseUnitTools::UnitSystemType> m_unitSystem;
|
2019-09-06 10:40:57 +02:00
|
|
|
caf::PdmChildArrayField<RimFlowDiagSolution*> m_flowDiagSolutions;
|
2019-12-13 10:27:38 +01:00
|
|
|
caf::PdmField<caf::FilePath> m_sourSimFileName;
|
2016-12-14 09:50:30 +01:00
|
|
|
|
2013-04-11 12:06:38 +02:00
|
|
|
// Obsolete field
|
2019-09-06 10:40:57 +02:00
|
|
|
caf::PdmField<QString> caseDirectory;
|
2013-04-11 12:06:38 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
bool m_gridAndWellDataIsReadFromFile;
|
|
|
|
|
bool m_activeCellInfoIsReadFromFile;
|
2012-05-18 09:45:23 +02:00
|
|
|
};
|