My Project
NumericalAquifers.hpp
1/*
2 Copyright (C) 2020 SINTEF Digital
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_NUMERICALAQUIFERS_HPP
21#define OPM_NUMERICALAQUIFERS_HPP
22
23#include <map>
24#include <unordered_map>
25
26#include <stddef.h>
27
28#include <opm/input/eclipse/EclipseState/Aquifer/NumericalAquifer/SingleNumericalAquifer.hpp>
29
30namespace Opm {
31 class Deck;
32 class EclipseGrid;
33 class FieldPropsManager;
34 struct NumericalAquiferCell;
35
37 public:
38 NumericalAquifers() = default;
39 NumericalAquifers(const Deck& deck, const EclipseGrid& grid, const FieldPropsManager& field_props);
40
41 int numRecords() const { return static_cast<int>(this->m_num_records); }
42 size_t size() const;
43 bool hasAquifer(size_t aquifer_id) const;
44 const SingleNumericalAquifer& getAquifer(size_t aquifer_id) const;
45 const std::map<size_t, SingleNumericalAquifer>& aquifers() const;
46 bool operator==(const NumericalAquifers& other) const;
47
48 std::unordered_map<size_t, const NumericalAquiferCell*> allAquiferCells() const;
49
50 std::unordered_map<size_t, double> aquiferCellVolumes() const;
51
52 std::vector<NNCdata> aquiferCellNNCs() const;
53 std::vector<NNCdata> aquiferConnectionNNCs(const EclipseGrid& grid, const FieldPropsManager& fp) const;
54
55 std::unordered_map<size_t, AquiferCellProps> aquiferCellProps() const;
56
57 void initConnections(const Deck& deck, const EclipseGrid& grid);
58 void postProcessConnections(const EclipseGrid& grid, const std::vector<int>& actnum);
59
60 static NumericalAquifers serializationTestObject();
61 template <class Serializer>
62 void serializeOp(Serializer& serializer)
63 {
64 serializer(this->m_aquifers);
65 serializer(this->m_num_records);
66 }
67
68 private:
69 std::map<size_t, SingleNumericalAquifer> m_aquifers{};
70 size_t m_num_records{0};
71
72 void addAquiferCell(const NumericalAquiferCell& aqu_cell);
73 };
74}
75
76#endif //OPM_NUMERICALAQUIFERS_HPP
Definition: Deck.hpp:49
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:41
Definition: NumericalAquifers.hpp:36
Class for (de-)serializing.
Definition: Serializer.hpp:84
Definition: SingleNumericalAquifer.hpp:44
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
Definition: NumericalAquiferCell.hpp:31