20 #ifndef OPM_OUTPUT_CELLS_HPP 21 #define OPM_OUTPUT_CELLS_HPP 23 #include <opm/input/eclipse/Units/UnitSystem.hpp> 29 namespace Opm {
namespace data {
59 RESTART_TRACER_SOLUTION,
70 UnitSystem::measure
dim{UnitSystem::measure::identity};
73 TargetType
target{TargetType::RESTART_SOLUTION};
76 explicit CellData(UnitSystem::measure m,
77 std::vector<double> x,
81 , data_ { std::move(x) }
84 explicit CellData(std::vector<int> x,
86 :
dim { UnitSystem::measure::identity }
88 , data_ { std::move(x) }
91 bool operator==(
const CellData& cell2)
const 93 return (
dim == cell2.dim)
94 && (
target == cell2.target)
95 && (data_ == cell2.data_);
98 template <
class Serializer>
99 void serializeOp(Serializer& serializer)
101 serializer(this->
dim);
102 serializer(this->data_);
106 static CellData serializationTestObject()
109 UnitSystem::measure::runtime,
110 std::vector<double>{1.0, 2.0, 3.0},
111 TargetType::RESTART_OPM_EXTENDED
116 std::vector<T>& data()
118 return std::get<std::vector<T>>(data_);
122 const std::vector<T>& data()
const 124 return std::get<std::vector<T>>(data_);
127 template<
class Visitor>
128 void visit(Visitor&& visit)
const 130 std::visit(std::forward<Visitor>(visit), data_);
135 using DataVector = std::variant<std::monostate,
145 #endif //OPM_OUTPUT_CELLS_HPP UnitSystem::measure dim
Dimension of the data to write.
Definition: Cells.hpp:70
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
Small struct that keeps track of data for output to restart/summary files.
Definition: Cells.hpp:67
TargetType target
File output destination.
Definition: Cells.hpp:73