My Project
Loading...
Searching...
No Matches
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 <opm/input/eclipse/EclipseState/Aquifer/NumericalAquifer/SingleNumericalAquifer.hpp>
24
25#include <cstddef>
26#include <map>
27#include <unordered_map>
28#include <vector>
29
30#include <stddef.h>
31
32namespace Opm {
33 class Deck;
34 class EclipseGrid;
35 class FieldPropsManager;
36 struct NumericalAquiferCell;
37
39 public:
40 NumericalAquifers() = default;
41 NumericalAquifers(const Deck& deck, const EclipseGrid& grid, const FieldPropsManager& field_props);
42
43 int numRecords() const { return static_cast<int>(this->m_num_records); }
44 size_t size() const;
45 bool hasAquifer(size_t aquifer_id) const;
46 const SingleNumericalAquifer& getAquifer(size_t aquifer_id) const;
47 const std::map<size_t, SingleNumericalAquifer>& aquifers() const;
48 bool operator==(const NumericalAquifers& other) const;
49
50 std::unordered_map<size_t, const NumericalAquiferCell*> allAquiferCells() const;
51 std::vector<std::size_t> allAquiferCellIds() const;
52
53 std::unordered_map<size_t, double> aquiferCellVolumes() const;
54
55 std::vector<NNCdata> aquiferCellNNCs() const;
56 std::vector<NNCdata> aquiferConnectionNNCs(const EclipseGrid& grid, const FieldPropsManager& fp) const;
57
58 std::unordered_map<size_t, AquiferCellProps> aquiferCellProps() const;
59
60 void initConnections(const Deck& deck, const EclipseGrid& grid);
61 void postProcessConnections(const EclipseGrid& grid, const std::vector<int>& actnum);
62
63 static NumericalAquifers serializationTestObject();
64 template <class Serializer>
65 void serializeOp(Serializer& serializer)
66 {
67 serializer(this->m_aquifers);
68 serializer(this->m_num_records);
69 }
70
71 private:
72 std::map<size_t, SingleNumericalAquifer> m_aquifers{};
73 size_t m_num_records{0};
74
75 void addAquiferCell(const NumericalAquiferCell& aqu_cell);
76 };
77}
78
79#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:55
Definition FieldPropsManager.hpp:42
Definition NumericalAquifers.hpp:38
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