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
|
|
|
|
|
|
|
|
#include "cvfBase.h"
|
|
|
|
#include "cvfObject.h"
|
|
|
|
|
2016-07-14 06:35:32 -05:00
|
|
|
#include "RifReaderInterface.h"
|
|
|
|
#include "RifEclipseRestartDataAccess.h"
|
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
#include <QString>
|
|
|
|
#include <QStringList>
|
|
|
|
#include <QDateTime>
|
|
|
|
|
2016-05-26 07:49:13 -05:00
|
|
|
#include "ert/ecl/ecl_util.h"
|
2013-02-05 03:51:32 -06:00
|
|
|
|
|
|
|
typedef struct ecl_file_struct ecl_file_type;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2013-01-30 07:13:50 -06:00
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
//==================================================================================================
|
|
|
|
//
|
2013-02-05 03:51:32 -06:00
|
|
|
//
|
2012-05-18 02:45:23 -05:00
|
|
|
//
|
|
|
|
//==================================================================================================
|
2013-02-05 03:51:32 -06:00
|
|
|
class RifEclipseOutputFileTools
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
|
|
|
public:
|
2012-06-26 09:10:41 -05:00
|
|
|
RifEclipseOutputFileTools();
|
|
|
|
virtual ~RifEclipseOutputFileTools();
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2016-07-14 06:35:32 -05:00
|
|
|
static void findKeywordsAndItemCount(std::vector<ecl_file_type*> ecl_files, QStringList* resultNames, std::vector<size_t>* resultDataItemCounts);
|
|
|
|
|
2013-02-05 03:51:32 -06:00
|
|
|
static bool keywordData(ecl_file_type* ecl_file, const QString& keyword, size_t fileKeywordOccurrence, std::vector<double>* values);
|
2013-02-27 04:27:02 -06:00
|
|
|
static bool keywordData(ecl_file_type* ecl_file, const QString& keyword, size_t fileKeywordOccurrence, std::vector<int>* values);
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2015-11-23 01:37:45 -06:00
|
|
|
static void timeSteps(ecl_file_type* ecl_file, std::vector<QDateTime>* timeSteps);
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2013-04-10 04:02:10 -05:00
|
|
|
static bool findSiblingFilesWithSameBaseName(const QString& fileName, QStringList* fileSet);
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2013-04-10 04:02:10 -05:00
|
|
|
static QString firstFileNameOfType(const QStringList& fileSet, ecl_file_enum fileType);
|
|
|
|
static QStringList filterFileNamesOfType(const QStringList& fileSet, ecl_file_enum fileType);
|
2013-04-07 09:33:45 -05:00
|
|
|
|
|
|
|
static void readGridDimensions(const QString& gridFileName, std::vector< std::vector<int> >& gridDimensions);
|
2014-08-27 07:05:29 -05:00
|
|
|
|
|
|
|
static int readUnitsType(ecl_file_type* ecl_file);
|
2016-07-14 06:35:32 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
static void createReportStepsMetaData(std::vector<ecl_file_type*> ecl_files, std::vector<RifRestartReportStep>* reportSteps);
|
2012-05-18 02:45:23 -05:00
|
|
|
};
|