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/input/eclipse/EclipseState/Grid/NNC.hpp>
#include <opm/output/data/Solution.hpp>
#include <opm/output/eclipse/RestartValue.hpp>
#include <map>
#include <memory>
#include <optional>
#include <string>
#include <vector>
namespace Opm {
class EclipseGrid;
class EclipseState;
class RestartKey;
class Schedule;
class SummaryConfig;
class SummaryState;
class UDQState;
class WellTestState;
} // namespace Opm
namespace Opm::Action {
class State;
} // namespace Opm::Action
namespace Opm::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 = std::string{},
const bool writeEsmry = false);
EclipseIO(const EclipseIO&) = delete;
EclipseIO& operator=(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 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;
data::Solution loadRestartSolution(const std::vector<RestartKey>& solution_keys,
const int report_step) 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
Management information about the current run's ACTION system, especially concerning the number of tim...
Definition State.hpp:51
Opm::EclipseGrid
About cell information and dimension: The actual grid information is held in a pointer to an ERT ecl_...
Definition EclipseGrid.hpp:61
Opm::EclipseIO::Impl
Internal implementation class for EclipseIO public interface.
Definition EclipseIO.cpp:116
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
Load per-cell solution data and wellstate from restart file.
Definition EclipseIO.cpp:965
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 to EGRID and INIT files.
Definition EclipseIO.cpp:904
Opm::EclipseIO::EclipseIO
EclipseIO(const EclipseIO &)=delete
Deleted copy constructor.
Opm::EclipseIO::loadRestartSolution
data::Solution loadRestartSolution(const std::vector< RestartKey > &solution_keys, const int report_step) const
Load per-cell solution data from restart file at specific time.
Definition EclipseIO.cpp:975
Opm::EclipseIO::EclipseIO
EclipseIO(const EclipseState &es, EclipseGrid grid, const Schedule &schedule, const SummaryConfig &summary_config, const std::string &basename=std::string{}, const bool writeEsmry=false)
Constructor.
Definition EclipseIO.cpp:885
Opm::EclipseIO::finalSummaryConfig
const SummaryConfig & finalSummaryConfig() const
Access finalised summary configuration object.
Definition EclipseIO.cpp:986
Opm::EclipseIO::summary
const out::Summary & summary() const
Access internal summary vector calculation engine.
Definition EclipseIO.cpp:981
Opm::EclipseIO::~EclipseIO
~EclipseIO()
Destructor.
Opm::EclipseIO::operator=
EclipseIO & operator=(const EclipseIO &)=delete
Deleted assignment operator.
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 reservoir state and summary information to disk.
Definition EclipseIO.cpp:915
Opm::EclipseState
Definition EclipseState.hpp:62
Opm::RestartKey
Definition RestartValue.hpp:34
Opm::Schedule
Definition Schedule.hpp:101
Opm::SummaryConfig
Definition SummaryConfig.hpp:133
Opm::SummaryState
Definition SummaryState.hpp:72
Opm::UDQState
Definition UDQState.hpp:40
Opm::WellTestState
Definition WellTestState.hpp:65
Opm::data::Solution
Definition Solution.hpp:35
Opm::out::Summary
Computational engine for calculating summary vectors (2D curves as a function of time) and writing th...
Definition Summary.hpp:57
Opm
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30