/* Copyright 2020 Equinor 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 . */ #ifndef RST_STATE #define RST_STATE #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Opm { class EclipseGrid; class Parser; class Runspec; } // namespace Opm namespace Opm { namespace EclIO { class RestartFileView; }} // namespace Opm::EclIO namespace Opm { namespace RestartIO { struct RstState { RstState(std::shared_ptr rstView, const Runspec& runspec, const ::Opm::EclipseGrid* grid); static RstState load(std::shared_ptr rstView, const Runspec& runspec, const Parser& parser, const ::Opm::EclipseGrid* grid = nullptr); const RstWell& get_well(const std::string& wname) const; ::Opm::UnitSystem unit_system; RstHeader header; RstAquifer aquifers; RstNetbalan netbalan; RstNetwork network; std::vector wells; std::vector groups; std::vector udqs; RstUDQActive udq_active; std::vector actions; Tuning tuning; std::unordered_map> wlists; private: void load_tuning(const std::vector& intehead, const std::vector& doubhead); void add_groups(const std::vector& zgrp, const std::vector& igrp, const std::vector& sgrp, const std::vector& xgrp); void add_wells(const std::vector& zwel, const std::vector& iwel, const std::vector& swel, const std::vector& xwel, const std::vector& icon, const std::vector& scon, const std::vector& xcon); void add_msw(const std::vector& zwel, const std::vector& iwel, const std::vector& swel, const std::vector& xwel, const std::vector& icon, const std::vector& scon, const std::vector& xcon, const std::vector& iseg, const std::vector& rseg); void add_udqs(const std::vector& iudq, const std::vector& zudn, const std::vector& zudl, const std::vector& dudw, const std::vector& dudg, const std::vector& dudf); void add_actions(const Parser& parser, const Runspec& runspec, std::time_t sim_time, const std::vector& zact, const std::vector& iact, const std::vector& sact, const std::vector& zacn, const std::vector& iacn, const std::vector& sacn, const std::vector& zlact); void add_wlist(const std::vector& zwls, const std::vector& iwls); }; }} // namespace Opm::RestartIO #endif