mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 07:00:17 -05:00
89 lines
3.0 KiB
C++
89 lines
3.0 KiB
C++
/////////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// Copyright (C) 2025 Equinor 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 <ctime>
|
|
#include <memory>
|
|
#include <optional>
|
|
#include <set>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace Opm
|
|
{
|
|
class FileDeck;
|
|
class DeckKeyword;
|
|
class ParseContext;
|
|
} // namespace Opm
|
|
|
|
//==================================================================================================
|
|
///
|
|
///
|
|
//==================================================================================================
|
|
class RifOpmFlowDeckFile
|
|
{
|
|
public:
|
|
RifOpmFlowDeckFile();
|
|
~RifOpmFlowDeckFile();
|
|
|
|
bool loadDeck( std::string filename );
|
|
bool saveDeck( std::string folder, std::string filename );
|
|
|
|
bool mergeWellDeckAtTimeStep( int timeStep, std::string filename );
|
|
int mergeWellDeckAtPosition( int position, std::string filename );
|
|
|
|
bool mergeMswData( std::vector<std::string>& mswFileData );
|
|
|
|
bool openWellAtTimeStep( int timeStep, Opm::DeckKeyword& openKeyword );
|
|
bool openWellAtDeckPosition( int deckPosition, Opm::DeckKeyword& openKeyword );
|
|
|
|
bool restartAtTimeStep( int timeStep, std::string deckName );
|
|
bool stopAtTimeStep( int timeStep );
|
|
|
|
std::vector<std::string> keywords();
|
|
bool hasDatesKeyword();
|
|
bool isRestartFile();
|
|
std::vector<std::string> dateStrings();
|
|
std::vector<std::time_t> dates();
|
|
|
|
std::set<std::string> wellGroupsInFile();
|
|
|
|
std::vector<int> welldims();
|
|
bool setWelldims( int maxWells, int maxConnections, int maxGroups, int maxWellsInGroup );
|
|
|
|
std::vector<int> regdims();
|
|
bool setRegdims( int maxRegions, int maxRegionDefinitions, int maxRegionFlowConnections, int maxFIPRegions );
|
|
bool ensureRegdimsKeyword();
|
|
|
|
bool addIncludeKeyword( std::string section, std::string keyword, std::string filePath );
|
|
bool addOperaterKeyword( std::string section,
|
|
std::string targetProperty,
|
|
int regionId,
|
|
std::string equation,
|
|
std::string inputProperty,
|
|
std::optional<float> alpha,
|
|
std::optional<float> beta );
|
|
|
|
private:
|
|
void splitDatesIfNecessary();
|
|
|
|
private:
|
|
std::unique_ptr<Opm::FileDeck> m_fileDeck;
|
|
};
|