2014-07-05 13:45:35 +02:00
|
|
|
/*
|
|
|
|
|
Copyright 2014 Statoil ASA.
|
|
|
|
|
|
|
|
|
|
This file is part of the Open Porous Media project (OPM).
|
|
|
|
|
|
|
|
|
|
OPM is free software: you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
|
|
OPM is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
2016-06-20 12:27:56 +02:00
|
|
|
#ifndef OPM_PARSER_FAULT_COLLECTION_HPP
|
|
|
|
|
#define OPM_PARSER_FAULT_COLLECTION_HPP
|
2014-07-05 13:45:35 +02:00
|
|
|
|
|
|
|
|
#include <cstddef>
|
|
|
|
|
#include <string>
|
|
|
|
|
|
2014-09-04 14:09:33 +02:00
|
|
|
#include <opm/parser/eclipse/EclipseState/Util/OrderedMap.hpp>
|
2016-05-02 17:50:45 +02:00
|
|
|
#include <opm/parser/eclipse/EclipseState/Grid/Fault.hpp>
|
|
|
|
|
|
2014-07-05 13:45:35 +02:00
|
|
|
namespace Opm {
|
|
|
|
|
|
2016-06-20 12:27:56 +02:00
|
|
|
class DeckRecord;
|
2016-06-21 14:56:34 +02:00
|
|
|
class GridDims;
|
2016-02-09 12:09:40 +01:00
|
|
|
class GRIDSection;
|
2016-01-15 08:42:57 +01:00
|
|
|
|
2014-07-05 13:45:35 +02:00
|
|
|
|
|
|
|
|
class FaultCollection {
|
|
|
|
|
public:
|
2014-07-16 13:21:57 +02:00
|
|
|
FaultCollection();
|
2016-06-21 14:56:34 +02:00
|
|
|
FaultCollection(const GRIDSection& gridSection, const GridDims& grid);
|
2020-03-19 15:21:20 +01:00
|
|
|
|
|
|
|
|
static FaultCollection serializeObject();
|
2015-06-11 23:11:29 +02:00
|
|
|
|
2014-07-05 13:45:35 +02:00
|
|
|
size_t size() const;
|
|
|
|
|
bool hasFault(const std::string& faultName) const;
|
2016-05-02 17:50:45 +02:00
|
|
|
Fault& getFault(const std::string& faultName);
|
|
|
|
|
const Fault& getFault(const std::string& faultName) const;
|
|
|
|
|
Fault& getFault(size_t faultIndex);
|
|
|
|
|
const Fault& getFault(size_t faultIndex) const;
|
|
|
|
|
|
|
|
|
|
/// we construct the fault based on faultName. To get the fault: getFault
|
|
|
|
|
void addFault(const std::string& faultName);
|
2014-07-05 13:45:35 +02:00
|
|
|
void setTransMult(const std::string& faultName , double transMult);
|
|
|
|
|
|
2019-12-16 14:27:16 +01:00
|
|
|
bool operator==(const FaultCollection& data) const;
|
|
|
|
|
|
2020-03-13 08:31:27 +01:00
|
|
|
template<class Serializer>
|
|
|
|
|
void serializeOp(Serializer& serializer)
|
|
|
|
|
{
|
|
|
|
|
m_faults.serializeOp(serializer);
|
|
|
|
|
}
|
|
|
|
|
|
2014-07-05 13:45:35 +02:00
|
|
|
private:
|
2016-06-21 14:56:34 +02:00
|
|
|
void addFaultFaces(const GridDims& grid,
|
2016-06-21 11:43:20 +02:00
|
|
|
const DeckRecord& faultRecord,
|
|
|
|
|
const std::string& faultName);
|
2019-03-08 09:00:36 +01:00
|
|
|
OrderedMap<std::string, Fault> m_faults;
|
2016-06-20 12:27:56 +02:00
|
|
|
|
2014-07-05 13:45:35 +02:00
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2016-06-20 12:27:56 +02:00
|
|
|
#endif // OPM_PARSER_FAULT_COLLECTION_HPP
|