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
|
|
|
|
|
2015-05-15 02:16:33 -05:00
|
|
|
#include "RimEclipseCase.h"
|
2012-05-18 02:45:23 -05:00
|
|
|
|
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();
|
|
|
|
virtual ~RimEclipseResultCase();
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2013-12-02 01:55:13 -06:00
|
|
|
void setGridFileName(const QString& caseFileName);
|
2013-04-11 05:06:38 -05:00
|
|
|
void setCaseInfo(const QString& userDescription, const QString& caseFileName);
|
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
|
|
|
|
2012-06-26 09:10:41 -05:00
|
|
|
virtual bool openEclipseGridFile();
|
2017-08-24 23:51:56 -05:00
|
|
|
|
|
|
|
bool importGridAndResultMetaData(bool showTimeStepFilter);
|
|
|
|
|
2017-04-21 05:02:48 -05:00
|
|
|
virtual void reloadEclipseGridFile();
|
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
|
2013-04-08 01:36:34 -05:00
|
|
|
virtual QString locationOnDisc() const;
|
2013-04-11 05:06:38 -05:00
|
|
|
virtual QString gridFileName() const { return caseFileName();}
|
2013-04-12 01:31:59 -05:00
|
|
|
virtual void updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath);
|
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-10-06 07:38:20 -05:00
|
|
|
QString caseName() const { return m_caseName; }
|
|
|
|
|
2017-03-31 04:37:07 -05:00
|
|
|
protected:
|
|
|
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
2017-08-11 08:59:19 -05:00
|
|
|
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute);
|
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
|
|
|
|
|
|
|
virtual void initAfterRead();
|
|
|
|
|
2013-06-26 02:02:37 -05:00
|
|
|
virtual void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering );
|
|
|
|
|
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;
|
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
|
|
|
|
2017-10-06 07:38:20 -05:00
|
|
|
QString m_caseName;
|
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;
|
2017-03-31 04:37:07 -05:00
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
};
|