Files
opm-common/opm/parser/eclipse/EclipseState/EclipseState.hpp

143 lines
4.6 KiB
C++
Raw Normal View History

/*
Copyright 2013 Statoil ASA.
This file is part of the Open Porous Media project (OPM).
OPM 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.
OPM 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 for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPM_ECLIPSE_STATE_HPP
#define OPM_ECLIPSE_STATE_HPP
#include <memory>
#include <vector>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
2020-02-09 11:47:22 +01:00
#include <opm/parser/eclipse/EclipseState/AquiferConfig.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseConfig.hpp>
#include <opm/parser/eclipse/EclipseState/Edit/EDITNNC.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/FieldPropsManager.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/FaultCollection.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/NNC.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/TransMult.hpp>
#include <opm/parser/eclipse/EclipseState/Runspec.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/TableManager.hpp>
#include <opm/parser/eclipse/EclipseState/SimulationConfig/SimulationConfig.hpp>
namespace Opm {
bool enable3DPropsTesting();
template< typename > class GridProperty;
template< typename > class GridProperties;
class Box;
class BoxManager;
class Deck;
class DeckItem;
class DeckKeyword;
class DeckRecord;
class EclipseGrid;
class InitConfig;
class IOConfig;
class RestartConfig;
2019-12-29 07:21:37 +01:00
class DeckSection;
class SimulationConfig;
class TableManager;
class UnitSystem;
2020-02-09 11:47:22 +01:00
class EclipseState {
public:
enum EnabledTypes {
IntProperties = 0x01,
DoubleProperties = 0x02,
AllProperties = IntProperties | DoubleProperties
};
EclipseState() = default;
EclipseState(const Deck& deck);
2016-10-10 09:52:52 +02:00
const IOConfig& getIOConfig() const;
IOConfig& getIOConfig();
const InitConfig& getInitConfig() const;
const SimulationConfig& getSimulationConfig() const;
virtual const EclipseGrid& getInputGrid() const;
2014-06-23 11:58:27 +02:00
const FaultCollection& getFaults() const;
const TransMult& getTransMult() const;
/// non-neighboring connections
/// the non-standard adjacencies as specified in input deck
const NNC& getInputNNC() const;
bool hasInputNNC() const;
/// editing non-neighboring connections
/// the non-standard adjacencies as specified in input deck
const EDITNNC& getInputEDITNNC() const;
bool hasInputEDITNNC() const;
// The potentially parallelized field properties
virtual const FieldPropsManager& fieldProps() const;
// Always the non-parallel field properties
virtual const FieldPropsManager& globalFieldProps() const;
const TableManager& getTableManager() const;
const EclipseConfig& getEclipseConfig() const;
const EclipseConfig& cfg() const;
// the unit system used by the deck. note that it is rarely needed to convert
// units because internally to opm-parser everything is represented by SI
// units...
const UnitSystem& getDeckUnitSystem() const;
const UnitSystem& getUnits() const;
std::string getTitle() const;
void applyModifierDeck(const Deck& deck);
const Runspec& runspec() const;
2020-02-09 11:47:22 +01:00
const AquiferConfig& aquifer() const;
private:
void initIOConfigPostSchedule(const Deck& deck);
void initTransMult();
void initFaults(const Deck& deck);
2019-12-29 07:21:37 +01:00
void setMULTFLT(const Opm::DeckSection& section);
void complainAboutAmbiguousKeyword(const Deck& deck,
const std::string& keywordName);
protected:
TableManager m_tables;
2016-11-02 13:29:00 +01:00
Runspec m_runspec;
EclipseConfig m_eclipseConfig;
2017-09-24 09:21:52 +02:00
UnitSystem m_deckUnitSystem;
NNC m_inputNnc;
EDITNNC m_inputEditNnc;
EclipseGrid m_inputGrid;
FieldPropsManager field_props;
SimulationConfig m_simulationConfig;
2017-09-24 15:17:10 +02:00
TransMult m_transMult;
FaultCollection m_faults;
std::string m_title;
2020-02-09 11:47:22 +01:00
AquiferConfig aquifer_config;
};
}
#endif // OPM_ECLIPSE_STATE_HPP