My Project
Loading...
Searching...
No Matches
FaultCollection.hpp
1/*
2 Copyright 2014 Statoil ASA.
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#ifndef OPM_PARSER_FAULT_COLLECTION_HPP
20#define OPM_PARSER_FAULT_COLLECTION_HPP
21
22#include <cstddef>
23#include <string>
24
25#include <opm/input/eclipse/EclipseState/Util/OrderedMap.hpp>
26#include <opm/input/eclipse/EclipseState/Grid/Fault.hpp>
27
28namespace Opm {
29
30 class DeckRecord;
31 class GridDims;
32 class GRIDSection;
33
34
36public:
38 FaultCollection(const GRIDSection& gridSection, const GridDims& grid);
39
40 static FaultCollection serializationTestObject();
41
42 size_t size() const;
43 bool hasFault(const std::string& faultName) const;
44 Fault& getFault(const std::string& faultName);
45 const Fault& getFault(const std::string& faultName) const;
46 Fault& getFault(size_t faultIndex);
47 const Fault& getFault(size_t faultIndex) const;
48 std::vector<std::string> getFaults(const std::string& pattern) const;
49
51 void addFault(const std::string& faultName);
52 void setTransMult(const std::string& faultName , double transMult);
53
54 bool operator==(const FaultCollection& data) const;
55
56 template<class Serializer>
57 void serializeOp(Serializer& serializer)
58 {
59 serializer(m_faults);
60 }
61
62private:
63 void addFaultFaces(const GridDims& grid,
64 const DeckRecord& faultRecord,
65 const std::string& faultName);
66 OrderedMap<Fault, 8> m_faults;
67
68};
69}
70
71#endif // OPM_PARSER_FAULT_COLLECTION_HPP
Definition DeckRecord.hpp:32
Definition FaultCollection.hpp:35
void addFault(const std::string &faultName)
we construct the fault based on faultName. To get the fault: getFault
Definition FaultCollection.cpp:138
Definition Fault.hpp:33
Definition DeckSection.hpp:121
Definition GridDims.hpp:31
A map with iteration in the order of insertion.
Definition OrderedMap.hpp:121
Class for (de-)serializing.
Definition Serializer.hpp:84
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30