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 
31 namespace Opm {
32  class TableManager;
33  class EclipseGrid;
34  class Deck;
35  class FieldPropsManager;
36 } // namespace Opm
37 
38 namespace Opm { namespace RestartIO {
39  class RstAquifer;
40 }} // namespace Opm::RestartIO
41 
42 namespace Opm {
43 
45 public:
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 serializeObject();
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 
65  bool hasNumericalAquifer() const;
66  bool hasAnalyticalAquifer() const;
67  const NumericalAquifers& numericalAquifers() const;
68  NumericalAquifers& mutableNumericalAquifers() const;
69 
70  template<class Serializer>
71  void serializeOp(Serializer& serializer)
72  {
73  aquifetp.serializeOp(serializer);
74  aquiferct.serializeOp(serializer);
75  aqconn.serializeOp(serializer);
76  numerical_aquifers.serializeOp(serializer);
77  }
78 
79 private:
80  Aquifetp aquifetp{};
81  AquiferCT aquiferct{};
82  mutable NumericalAquifers numerical_aquifers{};
83  Aquancon aqconn{};
84 };
85 
86 std::vector<int> analyticAquiferIDs(const AquiferConfig& cfg);
87 std::vector<int> numericAquiferIDs(const AquiferConfig& cfg);
88 }
89 
90 #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
Definition: Serializer.hpp:38
Definition: TableManager.hpp:64
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29