My Project
AquiferConfig.hpp
1/*
2 Copyright (C) 2020 Equinor
3
4 This file is part of the Open Porous Media project (OPM).
5
6 OPM is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 OPM is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with OPM. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#ifndef OPM_AUQIFER_CONFIG_HPP
21#define OPM_AUQIFER_CONFIG_HPP
22
23#include <opm/input/eclipse/EclipseState/Aquifer/Aquancon.hpp>
24#include <opm/input/eclipse/EclipseState/Aquifer/Aquifetp.hpp>
25#include <opm/input/eclipse/EclipseState/Aquifer/AquiferCT.hpp>
26#include <opm/input/eclipse/EclipseState/Aquifer/NumericalAquifer/NumericalAquifers.hpp>
27
28#include <cstddef>
29#include <vector>
30
31namespace Opm {
32 class TableManager;
33 class EclipseGrid;
34 class Deck;
35 class FieldPropsManager;
36} // namespace Opm
37
38namespace Opm { namespace RestartIO {
39 class RstAquifer;
40}} // namespace Opm::RestartIO
41
42namespace Opm {
43
45public:
46 AquiferConfig() = default;
47 AquiferConfig(const TableManager& tables, const EclipseGrid& grid,
48 const Deck& deck, const FieldPropsManager& field_props);
49 AquiferConfig(const Aquifetp& fetp, const AquiferCT& ct, const Aquancon& conn);
50 void load_connections(const Deck& deck, const EclipseGrid& grid);
51
52 void pruneDeactivatedAquiferConnections(const std::vector<std::size_t>& deactivated_cells);
53 void loadFromRestart(const RestartIO::RstAquifer& aquifers,
54 const TableManager& tables);
55
56 static AquiferConfig serializationTestObject();
57
58 bool active() const;
59 const AquiferCT& ct() const;
60 const Aquifetp& fetp() const;
61 const Aquancon& connections() const;
62 bool operator==(const AquiferConfig& other) const;
63 bool hasAquifer(const int aquID) const;
64 bool hasAnalyticalAquifer(const int aquID) const;
65
66 bool hasNumericalAquifer() const;
67 bool hasAnalyticalAquifer() const;
68 const NumericalAquifers& numericalAquifers() const;
69 NumericalAquifers& mutableNumericalAquifers() const;
70
71 template<class Serializer>
72 void serializeOp(Serializer& serializer)
73 {
74 serializer(aquifetp);
75 serializer(aquiferct);
76 serializer(aqconn);
77 serializer(numerical_aquifers);
78 }
79
80private:
81 Aquifetp aquifetp{};
82 AquiferCT aquiferct{};
83 mutable NumericalAquifers numerical_aquifers{};
84 Aquancon aqconn{};
85};
86
87std::vector<int> analyticAquiferIDs(const AquiferConfig& cfg);
88std::vector<int> numericAquiferIDs(const AquiferConfig& cfg);
89}
90
91#endif
Definition: Aquancon.hpp:46
Definition: AquiferCT.hpp:45
Definition: AquiferConfig.hpp:44
Definition: Aquifetp.hpp:45
Definition: Deck.hpp:63
About cell information and dimension: The actual grid information is held in a pointer to an ERT ecl_...
Definition: EclipseGrid.hpp:54
Definition: FieldPropsManager.hpp:38
Definition: NumericalAquifers.hpp:36
Definition: aquifer.hpp:45
Class for (de-)serializing.
Definition: Serializer.hpp:75
Definition: TableManager.hpp:65
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29