19 #ifndef COMPLETED_CELLS
20 #define COMPLETED_CELLS
22 #include <unordered_map>
24 #include <opm/input/eclipse/EclipseState/Grid/GridDims.hpp>
32 std::size_t global_index;
36 std::size_t active_index;
44 bool operator==(
const Props& other)
const{
45 return this->active_index == other.active_index &&
46 this->permx == other.permx &&
47 this->permy == other.permy &&
48 this->permz == other.permz &&
49 this->satnum == other.satnum &&
50 this->pvtnum == other.pvtnum &&
51 this->ntg == other.ntg;
54 template<
class Serializer>
57 serializer(this->permx);
58 serializer(this->permy);
59 serializer(this->permz);
60 serializer(this->satnum);
61 serializer(this->pvtnum);
62 serializer(this->ntg);
65 static Props serializeObject(){
77 std::optional<Props> props;
78 std::size_t active_index()
const;
79 bool is_active()
const;
82 std::array<double, 3> dimensions;
84 bool operator==(
const Cell& other)
const {
85 return this->global_index == other.global_index &&
89 this->depth == other.depth &&
90 this->dimensions == other.dimensions &&
91 this->props == other.props;
94 static Cell serializeObject() {
100 template<
class Serializer>
103 serializer(this->global_index);
107 serializer(this->depth);
108 serializer(this->props);
109 serializer.template array<std::array<double,3>,
false>(this->dimensions);
112 Cell(std::size_t g, std::size_t i_, std::size_t j_, std::size_t k_)
122 CompletedCells() =
default;
123 CompletedCells(
const GridDims& dims);
124 CompletedCells(std::size_t nx, std::size_t ny, std::size_t nz);
125 const Cell& get(std::size_t i, std::size_t j, std::size_t k)
const;
126 std::pair<bool, Cell&> try_get(std::size_t i, std::size_t j, std::size_t k);
128 bool operator==(
const CompletedCells& other)
const;
129 static CompletedCells serializeObject();
131 template<
class Serializer>
132 void serializeOp(Serializer& serializer)
134 this->dims.serializeOp(serializer);
135 serializer.map(this->cells);
140 std::unordered_map<std::size_t, Cell> cells;
Definition: CompletedCells.hpp:28
Definition: Serializer.hpp:38
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29
Definition: CompletedCells.hpp:35
Definition: CompletedCells.hpp:31