opm-common
FaultFace.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_FACE_HPP
20 #define OPM_PARSER_FAULT_FACE_HPP
21 
22 #include <opm/input/eclipse/EclipseState/Grid/FaceDir.hpp>
23 
24 #include <cstddef>
25 #include <vector>
26 
27 namespace Opm {
28 
29 class FaultFace {
30 public:
31  FaultFace() = default;
32  FaultFace(std::size_t nx , std::size_t ny , std::size_t nz,
33  std::size_t I1 , std::size_t I2,
34  std::size_t J1 , std::size_t J2,
35  std::size_t K1 , std::size_t K2,
36  FaceDir::DirEnum faceDir);
37 
38  static FaultFace serializationTestObject();
39 
40  std::vector<std::size_t>::const_iterator begin() const;
41  std::vector<std::size_t>::const_iterator end() const;
42  FaceDir::DirEnum getDir() const;
43 
44  bool operator==( const FaultFace& rhs ) const;
45  bool operator!=( const FaultFace& rhs ) const;
46 
47  template<class Serializer>
48  void serializeOp(Serializer& serializer)
49  {
50  serializer(m_faceDir);
51  serializer(m_indexList);
52  }
53 
54 private:
55  static void checkCoord(std::size_t dim , std::size_t l1 , std::size_t l2);
56  FaceDir::DirEnum m_faceDir = FaceDir::XPlus;
57  std::vector<std::size_t> m_indexList;
58 };
59 
60 }
61 
62 #endif // OPM_PARSER_FAULT_FACE_HPP
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
Definition: FaultFace.hpp:29
Class for (de-)serializing.
Definition: Serializer.hpp:95