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
|
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.
|
|
|
|
//
|
|
|
|
// 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
|
|
|
|
|
2018-10-09 05:23:44 -05:00
|
|
|
#include "RiaEclipseUnitTools.h"
|
|
|
|
|
2015-05-15 02:16:33 -05:00
|
|
|
#include "RimEclipseCase.h"
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2018-10-09 05:23:44 -05:00
|
|
|
#include <cafPdmProxyValueField.h>
|
|
|
|
|
2013-02-27 08:27:33 -06:00
|
|
|
class RifReaderInterface;
|
|
|
|
class RigMainGrid;
|
2016-12-14 02:50:30 -06:00
|
|
|
class RimFlowDiagSolution;
|
2016-12-20 04:41:05 -06:00
|
|
|
class RigFlowDiagSolverInterface;
|
2017-10-05 02:29:19 -05:00
|
|
|
class RifReaderEclipseRft;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
//
|
2012-06-26 09:10:41 -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
|
|
|
|
2018-09-24 14:32:58 -05:00
|
|
|
void setGridFileName(const QString& fileName);
|
|
|
|
void setCaseInfo(const QString& userDescription, const QString& fileName);
|
2017-03-23 01:00:00 -05:00
|
|
|
void setSourSimFileName(const QString& fileName);
|
2017-07-07 06:31:14 -05:00
|
|
|
bool hasSourSimFile();
|
2013-04-08 07:29:43 -05:00
|
|
|
|
2018-10-18 12:45:57 -05:00
|
|
|
bool openEclipseGridFile() override;
|
2017-08-24 23:51:56 -05:00
|
|
|
|
|
|
|
bool importGridAndResultMetaData(bool showTimeStepFilter);
|
|
|
|
|
2018-10-18 12:45:57 -05:00
|
|
|
void reloadEclipseGridFile() override;
|
2017-01-10 02:51:39 -06:00
|
|
|
bool openAndReadActiveCellData(RigEclipseCaseData* mainEclipseCase);
|
2013-04-07 10:20:58 -05:00
|
|
|
void readGridDimensions(std::vector< std::vector<int> >& gridDimensions);
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2013-04-08 05:01:40 -05:00
|
|
|
// Overrides from RimCase
|
2018-10-18 12:45:57 -05:00
|
|
|
QString locationOnDisc() const override;
|
|
|
|
QString gridFileName() const override { return caseFileName();}
|
|
|
|
void updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath) 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();
|
|
|
|
|
2017-10-05 02:29:19 -05:00
|
|
|
RifReaderEclipseRft* rftReader();
|
|
|
|
|
2017-03-31 04:37:07 -05:00
|
|
|
protected:
|
2018-10-18 12:45:57 -05:00
|
|
|
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
|
|
|
void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override;
|
2017-03-31 04:37:07 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
void loadAndUpdateSourSimData();
|
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
private:
|
2013-04-08 01:36:34 -05:00
|
|
|
cvf::ref<RifReaderInterface> createMockModel(QString modelName);
|
2013-04-11 05:06:38 -05:00
|
|
|
|
2018-10-18 12:45:57 -05:00
|
|
|
void initAfterRead() override;
|
2013-04-11 05:06:38 -05:00
|
|
|
|
2018-10-18 12:45:57 -05:00
|
|
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
2013-06-26 02:02:37 -05:00
|
|
|
|
2016-12-20 04:41:05 -06:00
|
|
|
cvf::ref<RigFlowDiagSolverInterface> m_flowDagSolverInterface;
|
|
|
|
|
2017-10-05 02:29:19 -05:00
|
|
|
cvf::ref<RifReaderEclipseRft> m_readerEclipseRft;
|
|
|
|
|
2013-04-11 05:06:38 -05:00
|
|
|
// Fields:
|
|
|
|
caf::PdmField<QString> caseFileName;
|
2018-10-09 05:23:44 -05:00
|
|
|
caf::PdmProxyValueField<RiaEclipseUnitTools::UnitSystemType> m_unitSystem;
|
2016-12-14 02:50:30 -06:00
|
|
|
caf::PdmChildArrayField<RimFlowDiagSolution*> m_flowDiagSolutions;
|
2017-03-23 01:00:00 -05:00
|
|
|
caf::PdmField<QString> m_sourSimFileName;
|
2016-12-14 02:50:30 -06:00
|
|
|
|
2013-04-11 05:06:38 -05:00
|
|
|
// Obsolete field
|
|
|
|
caf::PdmField<QString> caseDirectory;
|
|
|
|
|
2013-04-12 05:03:04 -05:00
|
|
|
bool m_gridAndWellDataIsReadFromFile;
|
|
|
|
bool m_activeCellInfoIsReadFromFile;
|
2012-05-18 02:45:23 -05:00
|
|
|
};
|