Fault.hpp
Go to the documentation of this file.
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
27
28namespace Opm {
29
30 class FaultFace;
31
32
33class Fault {
34public:
35 Fault() = default;
36 explicit Fault(const std::string& faultName);
37
39
40 const std::string& getName() const;
41 void setTransMult(double transMult);
42 double getTransMult() const;
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
58private:
59 std::string m_name;
60 double m_transMult = 0.0;
61 std::vector< FaultFace > m_faceList;
62};
63}
64
65
66#endif
const char *const string
Definition: cJSON.h:170
Definition: FaultFace.hpp:30
Definition: Fault.hpp:33
void setTransMult(double transMult)
double getTransMult() const
std::vector< FaultFace >::const_iterator begin() const
static Fault serializeObject()
void addFace(FaultFace)
const std::string & getName() const
Fault()=default
void serializeOp(Serializer &serializer)
Definition: Fault.hpp:51
bool operator==(const Fault &rhs) const
std::vector< FaultFace >::const_iterator end() const
bool operator!=(const Fault &rhs) const
Fault(const std::string &faultName)
Definition: Serializer.hpp:38
Definition: A.hpp:4