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 serializationTestObject(){
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 serializationTestObject() {
97 cell.dimensions = {1.0,2.0,3.0};
101 template<
class Serializer>
102 void serializeOp(Serializer& serializer)
104 serializer(this->global_index);
108 serializer(this->depth);
109 serializer(this->props);
110 serializer(this->dimensions);
113 Cell(std::size_t g, std::size_t i_, std::size_t j_, std::size_t k_)
123 CompletedCells() =
default;
124 CompletedCells(
const GridDims& dims);
125 CompletedCells(std::size_t nx, std::size_t ny, std::size_t nz);
126 const Cell& get(std::size_t i, std::size_t j, std::size_t k)
const;
127 std::pair<bool, Cell&> try_get(std::size_t i, std::size_t j, std::size_t k);
129 bool operator==(
const CompletedCells& other)
const;
130 static CompletedCells serializationTestObject();
132 template<
class Serializer>
133 void serializeOp(Serializer& serializer)
135 serializer(this->dims);
136 serializer(this->cells);
141 std::unordered_map<std::size_t, Cell> cells;
Definition: CompletedCells.hpp:28
Class for (de-)serializing.
Definition: Serializer.hpp:75
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