20#ifndef OPM_PARSER_NNC_HPP
21#define OPM_PARSER_NNC_HPP
29#include <opm/common/OpmLog/KeywordLocation.hpp>
37 NNCdata(
size_t c1,
size_t c2,
double t)
38 : cell1(c1), cell2(c2), trans(t)
42 bool operator==(
const NNCdata& data)
const
44 return cell1 == data.cell1 &&
45 cell2 == data.cell2 &&
49 template<
class Serializer>
59 bool operator<(
const NNCdata& other)
const
61 return std::tie(this->cell1, this->cell2) < std::tie(other.cell1, other.cell2);
109 static NNC serializationTestObject();
111 bool addNNC(
const size_t cell1,
const size_t cell2,
const double trans);
113 const std::vector<NNCdata>&
input()
const {
return m_input; }
115 const std::vector<NNCdata>&
edit()
const {
return m_edit; }
117 const std::vector<NNCdata>&
editr()
const {
return m_editr; }
123 bool operator==(
const NNC& data)
const;
125 template<
class Serializer>
131 serializer(m_nnc_location);
132 serializer(m_edit_location);
133 serializer(m_editr_location);
138 void load_input(
const EclipseGrid& grid,
const Deck& deck);
139 void load_edit(
const EclipseGrid& grid,
const Deck& deck);
140 void load_editr(
const EclipseGrid& grid,
const Deck& deck);
141 void add_edit(
const NNCdata& edit_node);
144 std::vector<NNCdata> m_input;
146 std::vector<NNCdata> m_edit;
148 std::vector<NNCdata> m_editr;
149 std::optional<KeywordLocation> m_nnc_location;
150 std::optional<KeywordLocation> m_edit_location;
151 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:55
Definition KeywordLocation.hpp:27
const std::vector< NNCdata > & input() const
Get the combined information from NNC.
Definition NNC.hpp:113
NNC(const EclipseGrid &grid, const Deck &deck)
Construct from input deck.
const std::vector< NNCdata > & editr() const
Get the information from EDITNNCR keyword.
Definition NNC.hpp:117
const std::vector< NNCdata > & edit() const
Get the information from EDITNNC keyword.
Definition NNC.hpp:115
Class for (de-)serializing.
Definition Serializer.hpp:84
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30