20#ifndef OPM_PARSER_NNC_HPP
21#define OPM_PARSER_NNC_HPP
28#include <opm/common/OpmLog/KeywordLocation.hpp>
36 NNCdata(
size_t c1,
size_t c2,
double t)
37 : cell1(c1), cell2(c2), trans(t)
41 bool operator==(
const NNCdata& data)
const
43 return cell1 == data.cell1 &&
44 cell2 == data.cell2 &&
48 template<
class Serializer>
58 bool operator<(
const NNCdata& other)
const
60 return std::tie(this->cell1, this->cell2) < std::tie(other.cell1, other.cell2);
108 static NNC serializationTestObject();
110 bool addNNC(
const size_t cell1,
const size_t cell2,
const double trans);
113 void merge(
const std::vector<NNCdata>& nncs);
115 const std::vector<NNCdata>&
input()
const {
return m_input; }
117 const std::vector<NNCdata>&
edit()
const {
return m_edit; }
119 const std::vector<NNCdata>&
editr()
const {
return m_editr; }
125 bool operator==(
const NNC& data)
const;
127 template<
class Serializer>
133 serializer(m_nnc_location);
134 serializer(m_edit_location);
135 serializer(m_editr_location);
140 void load_input(
const EclipseGrid& grid,
const Deck& deck);
141 void load_edit(
const EclipseGrid& grid,
const Deck& deck);
142 void load_editr(
const EclipseGrid& grid,
const Deck& deck);
143 void add_edit(
const NNCdata& edit_node);
146 std::vector<NNCdata> m_input;
148 std::vector<NNCdata> m_edit;
150 std::vector<NNCdata> m_editr;
151 std::optional<KeywordLocation> m_nnc_location;
152 std::optional<KeywordLocation> m_edit_location;
153 std::optional<KeywordLocation> m_editr_location;
About cell information and dimension: The actual grid information is held in a pointer to an ERT ecl_...
Definition EclipseGrid.hpp:62
Definition KeywordLocation.hpp:27
const std::vector< NNCdata > & input() const
Get the combined information from NNC.
Definition NNC.hpp:115
void merge(const std::vector< NNCdata > &nncs)
Merge additional NNCs into sorted NNCs.
Definition NNC.cpp:278
const std::vector< NNCdata > & editr() const
Get the information from EDITNNCR keyword.
Definition NNC.hpp:119
const std::vector< NNCdata > & edit() const
Get the information from EDITNNC keyword.
Definition NNC.hpp:117
Class for (de-)serializing.
Definition Serializer.hpp:94
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30