Loading...
Searching...
No Matches
Summary.hpp
/*
Copyright 2016 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_OUTPUT_SUMMARY_HPP
#define OPM_OUTPUT_SUMMARY_HPP
#include <opm/output/data/Aquifer.hpp>
#include <opm/output/data/InterRegFlowMap.hpp>
#include <map>
#include <memory>
#include <optional>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
namespace Opm {
class EclipseGrid;
class EclipseState;
class Inplace;
class Schedule;
class SummaryConfig;
class SummaryState;
} // namespace Opm
namespace Opm::data {
class GroupAndNetworkValues;
class InterRegFlowMap;
struct WellBlockAveragePressures;
class Wells;
} // namespace Opm::data
namespace Opm::out {
class Summary
{
public:
using GlobalProcessParameters = std::map<std::string, double>;
using RegionParameters = std::map<std::string, std::vector<double>>;
using BlockValues = std::map<std::pair<std::string, int>, double>;
using InterRegFlowValues = std::unordered_map<std::string, data::InterRegFlowMap>;
Summary(SummaryConfig& sumcfg,
const EclipseState& es,
const EclipseGrid& grid,
const Schedule& sched,
const std::string& basename = "",
const bool writeEsmry = false);
~Summary();
void add_timestep(const SummaryState& st,
const int report_step,
const int ministep_id,
const bool isSubstep);
void eval(SummaryState& summary_state,
const int report_step,
const double secs_elapsed,
const data::Wells& well_solution,
const data::WellBlockAveragePressures& wbp,
const data::GroupAndNetworkValues& group_and_nwrk_solution,
const GlobalProcessParameters& single_values,
const std::optional<Inplace>& initial_inplace,
const Inplace& inplace,
const RegionParameters& region_values = {},
const BlockValues& block_values = {},
const data::Aquifers& aquifers_values = {},
const InterRegFlowValues& interreg_flows = {}) const;
void write(const bool is_final_summary = false) const;
private:
class SummaryImplementation;
std::unique_ptr<SummaryImplementation> pImpl_;
};
} // namespace Opm::out
#endif // OPM_OUTPUT_SUMMARY_HPP
InterRegFlowMap.hpp
Facility for converting collection of region ID pairs into a sparse (CSR) adjacency matrix representa...
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::EclipseState
Definition EclipseState.hpp:62
Opm::Inplace
Definition Inplace.hpp:36
Opm::Schedule
Definition Schedule.hpp:101
Opm::SummaryConfig
Definition SummaryConfig.hpp:133
Opm::SummaryState
Definition SummaryState.hpp:72
Opm::data::GroupAndNetworkValues
Definition Groups.hpp:212
Opm::data::InterRegFlowMap
Form CSR adjacency matrix representation of inter-region flow rate graph provided as a list of connec...
Definition InterRegFlowMap.hpp:47
Opm::data::Wells
Definition Wells.hpp:1199
Opm::out::Summary::SummaryImplementation
Definition Summary.cpp:4951
Opm::out::Summary::add_timestep
void add_timestep(const SummaryState &st, const int report_step, const int ministep_id, const bool isSubstep)
Linearise summary values into internal buffer for output purposes.
Definition Summary.cpp:5637
Opm::out::Summary::write
void write(const bool is_final_summary=false) const
Write all current summary vector buffers to output files.
Definition Summary.cpp:5645
Opm::out::Summary::~Summary
~Summary()
Destructor.
Definition Summary.cpp:5650
Opm::out::Summary::RegionParameters
std::map< std::string, std::vector< double > > RegionParameters
Collection of named per-region quantities.
Definition Summary.hpp:66
Opm::out::Summary::BlockValues
std::map< std::pair< std::string, int >, double > BlockValues
Collection of per-block (cell) quantities.
Definition Summary.hpp:72
Opm::out::Summary::eval
void eval(SummaryState &summary_state, const int report_step, const double secs_elapsed, const data::Wells &well_solution, const data::WellBlockAveragePressures &wbp, const data::GroupAndNetworkValues &group_and_nwrk_solution, const GlobalProcessParameters &single_values, const std::optional< Inplace > &initial_inplace, const Inplace &inplace, const RegionParameters &region_values={}, const BlockValues &block_values={}, const data::Aquifers &aquifers_values={}, const InterRegFlowValues &interreg_flows={}) const
Calculate summary vector values.
Definition Summary.cpp:5602
Opm::out::Summary::InterRegFlowValues
std::unordered_map< std::string, data::InterRegFlowMap > InterRegFlowValues
Collection of named inter-region flows (rates and cumulatives).
Definition Summary.hpp:77
Opm::out::Summary::Summary
Summary(SummaryConfig &sumcfg, const EclipseState &es, const EclipseGrid &grid, const Schedule &sched, const std::string &basename="", const bool writeEsmry=false)
Constructor.
Definition Summary.cpp:5593
Opm::out::Summary::GlobalProcessParameters
std::map< std::string, double > GlobalProcessParameters
Collection of named scalar quantities such as field-wide pressures, rates, and volumes,...
Definition Summary.hpp:62
Opm
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30
Opm::data::WellBlockAveragePressures
Definition Wells.hpp:1294