My Project
Loading...
Searching...
No Matches
EclipseIO.hpp
1/*
2 Copyright (c) 2013 Andreas Lauser
3 Copyright (c) 2013 Uni Research AS
4 Copyright (c) 2014 IRIS AS
5
6 This file is part of the Open Porous Media project (OPM).
7
8 OPM is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 OPM is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with OPM. If not, see <http://www.gnu.org/licenses/>.
20*/
21
22#ifndef OPM_ECLIPSE_WRITER_HPP
23#define OPM_ECLIPSE_WRITER_HPP
24
25#include <opm/output/data/Solution.hpp>
26
27#include <map>
28#include <memory>
29#include <optional>
30#include <string>
31#include <vector>
32
33namespace Opm {
34
35class EclipseGrid;
36class EclipseState;
37struct NNCdata;
38class RestartKey;
39class RestartValue;
40class Schedule;
41class SummaryConfig;
42class SummaryState;
43class UDQState;
44class WellTestState;
45
46} // namespace Opm
47
48namespace Opm { namespace Action {
49 class State;
50}} // namespace Opm::Action
51
52namespace Opm { namespace out {
53 class Summary;
54}} // namespace Opm::out
55
56namespace Opm {
60{
61public:
64 EclipseIO(const EclipseState& es,
65 EclipseGrid grid,
66 const Schedule& schedule,
67 const SummaryConfig& summary_config,
68 const std::string& basename = "",
69 const bool writeEsmry = false);
70
71 EclipseIO(const EclipseIO&) = delete;
72
73 ~EclipseIO();
74
114 std::map<std::string, std::vector<int>> int_data = {},
115 const std::vector<NNCdata>& nnc = {});
116
124 void overwriteInitialOIP(const data::Solution& simProps);
125
142 void writeTimeStep(const Action::State& action_state,
143 const WellTestState& wtest_state,
144 const SummaryState& st,
145 const UDQState& udq_state,
146 int report_step,
147 bool isSubstep,
148 double seconds_elapsed,
149 RestartValue value,
150 const bool write_double = false,
151 std::optional<int> time_step = std::nullopt);
152
184 SummaryState& summary_state,
185 const std::vector<RestartKey>& solution_keys,
186 const std::vector<RestartKey>& extra_keys = {}) const;
187
188 const out::Summary& summary() const;
189 const SummaryConfig& finalSummaryConfig() const;
190
191private:
192 class Impl;
193 std::unique_ptr<Impl> impl;
194};
195
196} // namespace Opm
197
198
199#endif // OPM_ECLIPSE_WRITER_HPP
Definition State.hpp:40
About cell information and dimension: The actual grid information is held in a pointer to an ERT ecl_...
Definition EclipseGrid.hpp:55
A class to write reservoir and well states of a blackoil simulation to disk.
Definition EclipseIO.hpp:60
RestartValue loadRestart(Action::State &action_state, SummaryState &summary_state, const std::vector< RestartKey > &solution_keys, const std::vector< RestartKey > &extra_keys={}) const
Will load solution data and wellstate from the restart file.
Definition EclipseIO.cpp:389
void overwriteInitialOIP(const data::Solution &simProps)
Overwrite the initial OIP values.
void writeInitial(data::Solution simProps=data::Solution(), std::map< std::string, std::vector< int > > int_data={}, const std::vector< NNCdata > &nnc={})
Output static properties in EGRID and INIT file.
Definition EclipseIO.cpp:275
void writeTimeStep(const Action::State &action_state, const WellTestState &wtest_state, const SummaryState &st, const UDQState &udq_state, int report_step, bool isSubstep, double seconds_elapsed, RestartValue value, const bool write_double=false, std::optional< int > time_step=std::nullopt)
Write a reservoir state and summary information to disk.
Definition EclipseIO.cpp:298
Definition EclipseState.hpp:63
Definition RestartValue.hpp:72
Definition Schedule.hpp:89
Definition SummaryConfig.hpp:133
Definition SummaryState.hpp:72
Definition UDQState.hpp:37
Definition WellTestState.hpp:65
Definition Solution.hpp:35
Definition Summary.hpp:52
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30