(#743) Added import of Input Case using opm-parser

This commit is contained in:
Magne Sjaastad
2016-06-20 10:11:00 +02:00
parent eb6d3e0e8f
commit 830db2c6ec
14 changed files with 1144 additions and 6 deletions

View File

@@ -0,0 +1,65 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2016 Statoil ASA
//
// 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 "RimEclipseCase.h"
#include "cafPdmChildField.h"
#include "cafPdmField.h"
#include "cafPdmObject.h"
#include "cvfBase.h"
#include "cvfObject.h"
class RimEclipseInputProperty;
class RimEclipseInputPropertyCollection;
//==================================================================================================
//
// This class is intended to replace RimEclipseInputCase when the opm-parser is considered stable
//
//==================================================================================================
class RimEclipseInputCaseOpm : public RimEclipseCase
{
CAF_PDM_HEADER_INIT;
public:
RimEclipseInputCaseOpm();
virtual ~RimEclipseInputCaseOpm();
// Fields
caf::PdmChildField<RimEclipseInputPropertyCollection*> m_inputPropertyCollection;
void importNewEclipseGridAndProperties(const QString& fileName);
// RimCase overrides
virtual bool openEclipseGridFile(); // Find grid file among file set. Read, Find read and validate property date. Syncronize child property sets.
// Overrides from RimCase
virtual QString locationOnDisc() const;
virtual QString gridFileName() const { return m_gridFileName();}
virtual void updateFilePathsFromProjectPath(const QString& projectPath, const QString& oldProjectPath);
private:
void importEclipseGridAndProperties(const QString& fileName);
private:
caf::PdmField<QString> m_gridFileName;
};