Loading...
Searching...
No Matches
EclipseIO.hpp
/*
Copyright (c) 2013 Andreas Lauser
Copyright (c) 2013 Uni Research AS
Copyright (c) 2014 IRIS AS
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_WRITER_HPP
#define OPM_ECLIPSE_WRITER_HPP
#include <opm/output/data/Solution.hpp>
#include <map>
#include <memory>
#include <optional>
#include <string>
#include <vector>
namespace Opm {
class EclipseGrid;
class EclipseState;
struct NNCdata;
class RestartKey;
class RestartValue;
class Schedule;
class SummaryConfig;
class SummaryState;
class UDQState;
class WellTestState;
} // namespace Opm
namespace Opm { namespace Action {
class State;
}} // namespace Opm::Action
namespace Opm { namespace out {
class Summary;
}} // namespace Opm::out
namespace Opm {
class EclipseIO
{
public:
EclipseIO(const EclipseState& es,
EclipseGrid grid,
const Schedule& schedule,
const SummaryConfig& summary_config,
const std::string& basename = "",
const bool writeEsmry = false);
EclipseIO(const EclipseIO&) = delete;
~EclipseIO();
void writeInitial(data::Solution simProps = data::Solution(),
std::map<std::string, std::vector<int>> int_data = {},
const std::vector<NNCdata>& nnc = {});
void overwriteInitialOIP(const data::Solution& simProps);
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);
RestartValue loadRestart(Action::State& action_state,
SummaryState& summary_state,
const std::vector<RestartKey>& solution_keys,
const std::vector<RestartKey>& extra_keys = {}) const;
const out::Summary& summary() const;
const SummaryConfig& finalSummaryConfig() const;
private:
class Impl;
std::unique_ptr<Impl> impl;
};
} // namespace Opm
#endif // OPM_ECLIPSE_WRITER_HPP
Opm::Action::State
Definition State.hpp:40
Opm::EclipseGrid
About cell information and dimension: The actual grid information is held in a pointer to an ERT ecl_...
Definition EclipseGrid.hpp:55
Opm::EclipseIO
A class to write reservoir and well states of a blackoil simulation to disk.
Definition EclipseIO.hpp:60
Opm::EclipseIO::loadRestart
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
Opm::EclipseIO::overwriteInitialOIP
void overwriteInitialOIP(const data::Solution &simProps)
Overwrite the initial OIP values.
Opm::EclipseIO::writeInitial
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
Opm::EclipseIO::writeTimeStep
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
Opm::EclipseState
Definition EclipseState.hpp:63
Opm::RestartValue
Definition RestartValue.hpp:72
Opm::Schedule
Definition Schedule.hpp:89
Opm::SummaryConfig
Definition SummaryConfig.hpp:133
Opm::SummaryState
Definition SummaryState.hpp:72
Opm::UDQState
Definition UDQState.hpp:37
Opm::WellTestState
Definition WellTestState.hpp:65
Opm::data::Solution
Definition Solution.hpp:35
Opm::out::Summary
Definition Summary.hpp:52
Opm
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30