My Project
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 
28 namespace Opm {
29 
30  class DeckRecord;
31  class GridDims;
32  class GRIDSection;
33 
34 
36 public:
38  FaultCollection(const GRIDSection& gridSection, const GridDims& grid);
39 
40  static FaultCollection serializeObject();
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 
50  void addFault(const std::string& faultName);
51  void setTransMult(const std::string& faultName , double transMult);
52 
53  bool operator==(const FaultCollection& data) const;
54 
55  template<class Serializer>
56  void serializeOp(Serializer& serializer)
57  {
58  m_faults.serializeOp(serializer);
59  }
60 
61 private:
62  void addFaultFaces(const GridDims& grid,
63  const DeckRecord& faultRecord,
64  const std::string& faultName);
66 
67 };
68 }
69 
70 #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: Fault.hpp:33
Definition: DeckSection.hpp:117
Definition: GridDims.hpp:32
Definition: OrderedMap.hpp:32
Definition: Serializer.hpp:38
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29