FaultCollection.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 OPM_PARSER_FAULT_COLLECTION_HPP
20#define OPM_PARSER_FAULT_COLLECTION_HPP
21
22#include <cstddef>
23#include <string>
24
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
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
61private:
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
const char *const string
Definition: cJSON.h:170
Definition: DeckRecord.hpp:32
Definition: FaultCollection.hpp:35
static FaultCollection serializeObject()
void serializeOp(Serializer &serializer)
Definition: FaultCollection.hpp:56
Fault & getFault(const std::string &faultName)
size_t size() const
Fault & getFault(size_t faultIndex)
const Fault & getFault(size_t faultIndex) const
bool operator==(const FaultCollection &data) const
bool hasFault(const std::string &faultName) const
void setTransMult(const std::string &faultName, double transMult)
const Fault & getFault(const std::string &faultName) const
void addFault(const std::string &faultName)
we construct the fault based on faultName. To get the fault: getFault
FaultCollection(const GRIDSection &gridSection, const GridDims &grid)
Definition: Fault.hpp:33
Definition: DeckSection.hpp:79
Definition: GridDims.hpp:32
Definition: OrderedMap.hpp:32
Definition: Serializer.hpp:38
Definition: A.hpp:4
static std::string data()
Definition: exprtk.hpp:40022