This commit adds support for creating the analytic aquifer objects
Opm::AquiferCT
Opm::Aquifetp
Opm::Aquancon
Opm::AquiferConfig
from information stored in the restart vectors
{I,S,X}AAQ
{I,S}CAQ
We add a new helper class
Opm::RestartIO::RstAquifer
which contain the same data members as the '*_data' structures of
the analytic aquifer objects. Those analytic aquifer objects then
get friendship from the '*_data' structures in order to assign the
private members from the corresponding restart information. We
finally add a gateway to EclipseState that consumes an RstAquifer
instance and overwrites the internal AquiferConfig object when the
restarted run contains analytic aquifers.
Update RstState constructor API to meet requirements of RstAquifer,
notably by adding an EclipseGrid parameter. That in turn is needed
by the RstAquifer to translate connection (I,J,K) tuples to active
cell IDs.
Note that if an analytic aquifer does not have any connections then
this facility will not load said aquifer. That may be a problem
when plotting summary curves, but we will address the issue later if
it comes up.
71 lines
1.9 KiB
C++
71 lines
1.9 KiB
C++
/*
|
|
Copyright 2021 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 <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef OPM_RESTART_FILE_VIEW_HPP
|
|
#define OPM_RESTART_FILE_VIEW_HPP
|
|
|
|
#include <cstddef>
|
|
#include <memory>
|
|
#include <vector>
|
|
|
|
namespace Opm { namespace EclIO {
|
|
class ERst;
|
|
}} // Opm::EclIO
|
|
|
|
namespace Opm { namespace EclIO {
|
|
|
|
class RestartFileView
|
|
{
|
|
public:
|
|
explicit RestartFileView(std::shared_ptr<ERst> restart_file,
|
|
const int report_step);
|
|
|
|
~RestartFileView();
|
|
|
|
RestartFileView(const RestartFileView& rhs) = delete;
|
|
RestartFileView(RestartFileView&& rhs);
|
|
|
|
RestartFileView& operator=(const RestartFileView& rhs) = delete;
|
|
RestartFileView& operator=(RestartFileView&& rhs);
|
|
|
|
std::size_t simStep() const;
|
|
int reportStep() const;
|
|
|
|
int occurrenceCount(const std::string& vector) const;
|
|
|
|
template <typename ElmType>
|
|
bool hasKeyword(const std::string& vector) const;
|
|
|
|
template <typename ElmType>
|
|
const std::vector<ElmType>&
|
|
getKeyword(const std::string& vector, const int occurrence = 0) const;
|
|
|
|
const std::vector<int>& intehead() const;
|
|
const std::vector<bool>& logihead() const;
|
|
const std::vector<double>& doubhead() const;
|
|
|
|
private:
|
|
class Implementation;
|
|
std::unique_ptr<Implementation> pImpl_;
|
|
};
|
|
|
|
}} // Opm::RestartIO
|
|
|
|
#endif // OPM_RESTART_FILE_VIEW_HPP
|