diff --git a/opm/input/eclipse/Schedule/CompletedCells.hpp b/opm/input/eclipse/Schedule/CompletedCells.hpp
index 38d822d99..c1a6089a3 100644
--- a/opm/input/eclipse/Schedule/CompletedCells.hpp
+++ b/opm/input/eclipse/Schedule/CompletedCells.hpp
@@ -16,40 +16,42 @@
You should have received a copy of the GNU General Public License
along with OPM. If not, see .
*/
+
#ifndef COMPLETED_CELLS
#define COMPLETED_CELLS
-#include
-#include
#include
+#include
+#include
+#include
+#include
+#include
+
namespace Opm {
-class CompletedCells {
+class CompletedCells
+{
public:
-
- struct Cell {
+ struct Cell
+ {
std::size_t global_index;
std::size_t i, j, k;
- struct Props{
- std::size_t active_index;
- double permx;
- double permy;
- double permz;
- int satnum;
- int pvtnum;
- double ntg;
+ struct Props
+ {
+ std::size_t active_index{};
+ double permx{};
+ double permy{};
+ double permz{};
+ double poro{};
+ int satnum{};
+ int pvtnum{};
+ double ntg{};
- bool operator==(const Props& other) const{
- return this->active_index == other.active_index &&
- this->permx == other.permx &&
- this->permy == other.permy &&
- this->permz == other.permz &&
- this->satnum == other.satnum &&
- this->pvtnum == other.pvtnum &&
- this->ntg == other.ntg;
- }
+ bool operator==(const Props& other) const;
+
+ static Props serializationTestObject();
template
void serializeOp(Serializer& serializer)
@@ -57,46 +59,23 @@ public:
serializer(this->permx);
serializer(this->permy);
serializer(this->permz);
+ serializer(this->poro);
serializer(this->satnum);
serializer(this->pvtnum);
serializer(this->ntg);
}
-
- static Props serializationTestObject(){
- Props props;
- props.permx = 10.0;
- props.permy = 78.0;
- props.permz = 45.4;
- props.satnum = 3;
- props.pvtnum = 5;
- props.ntg = 45.1;
- return props;
- }
};
std::optional props;
std::size_t active_index() const;
bool is_active() const;
- double depth;
- std::array dimensions;
+ double depth{};
+ std::array dimensions{};
- bool operator==(const Cell& other) const {
- return this->global_index == other.global_index &&
- this->i == other.i &&
- this->j == other.j &&
- this->k == other.k &&
- this->depth == other.depth &&
- this->dimensions == other.dimensions &&
- this->props == other.props;
- }
+ bool operator==(const Cell& other) const;
- static Cell serializationTestObject() {
- Cell cell(0,1,1,1);
- cell.depth = 12345;
- cell.dimensions = {1.0,2.0,3.0};
- return cell;
- }
+ static Cell serializationTestObject();
template
void serializeOp(Serializer& serializer)
@@ -123,6 +102,7 @@ public:
CompletedCells() = default;
explicit CompletedCells(const GridDims& dims);
CompletedCells(std::size_t nx, std::size_t ny, std::size_t nz);
+
const Cell& get(std::size_t i, std::size_t j, std::size_t k) const;
std::pair try_get(std::size_t i, std::size_t j, std::size_t k);
@@ -141,5 +121,5 @@ private:
std::unordered_map cells;
};
}
-#endif
+#endif // COMPLETED_CELLS
diff --git a/opm/input/eclipse/Schedule/ScheduleGrid.hpp b/opm/input/eclipse/Schedule/ScheduleGrid.hpp
index 210f76f59..764bdce21 100644
--- a/opm/input/eclipse/Schedule/ScheduleGrid.hpp
+++ b/opm/input/eclipse/Schedule/ScheduleGrid.hpp
@@ -21,17 +21,30 @@
#include
+#include
+#include
+
namespace Opm {
class EclipseGrid;
class FieldPropsManager;
-class ScheduleGrid {
+} // namespace Opm
+
+namespace Opm {
+
+class ScheduleGrid
+{
public:
- ScheduleGrid(const EclipseGrid& ecl_grid, const FieldPropsManager& fpm, CompletedCells& completed_cells);
+ ScheduleGrid(const EclipseGrid& ecl_grid,
+ const FieldPropsManager& fpm,
+ CompletedCells& completed_cells);
+
explicit ScheduleGrid(CompletedCells& completed_cells);
- const CompletedCells::Cell& get_cell(std::size_t i, std::size_t j, std::size_t k) const;
+ const CompletedCells::Cell&
+ get_cell(std::size_t i, std::size_t j, std::size_t k) const;
+
const Opm::EclipseGrid* get_grid() const;
private:
@@ -40,8 +53,6 @@ private:
CompletedCells& cells;
};
+} // namespace Opm
-
-}
-#endif
-
+#endif // SCHEDULE_GRID
diff --git a/opm/input/eclipse/Schedule/Well/Connection.hpp b/opm/input/eclipse/Schedule/Well/Connection.hpp
index 431a13cb3..293d4c11a 100644
--- a/opm/input/eclipse/Schedule/Well/Connection.hpp
+++ b/opm/input/eclipse/Schedule/Well/Connection.hpp
@@ -17,91 +17,172 @@
along with OPM. If not, see .
*/
-
#ifndef COMPLETION_HPP_
#define COMPLETION_HPP_
+#include
+#include
+
#include
#include
#include