My Project
Fault.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 FAULT_HPP_
20 #define FAULT_HPP_
21 
22 #include <string>
23 #include <memory>
24 #include <vector>
25 
26 #include <opm/parser/eclipse/EclipseState/Grid/FaultFace.hpp>
27 
28 namespace Opm {
29 
30  class FaultFace;
31 
32 
33 class Fault {
34 public:
35  Fault() = default;
36  explicit Fault(const std::string& faultName);
37 
38  static Fault serializeObject();
39 
40  const std::string& getName() const;
41  void setTransMult(double transMult);
42  double getTransMult() const;
43  void addFace( FaultFace );
44  std::vector< FaultFace >::const_iterator begin() const;
45  std::vector< FaultFace >::const_iterator end() const;
46 
47  bool operator==( const Fault& rhs ) const;
48  bool operator!=( const Fault& rhs ) const;
49 
50  template<class Serializer>
51  void serializeOp(Serializer& serializer)
52  {
53  serializer(m_name);
54  serializer(m_transMult);
55  serializer.vector(m_faceList);
56  }
57 
58 private:
59  std::string m_name;
60  double m_transMult = 0.0;
61  std::vector< FaultFace > m_faceList;
62 };
63 }
64 
65 
66 #endif
Definition: FaultFace.hpp:30
Definition: Fault.hpp:33
Definition: Serializer.hpp:38
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29