allow constructing PlymwinjTables from variables

also add equality operator
This commit is contained in:
Arne Morten Kvarving
2019-12-02 21:45:35 +01:00
parent 6ccdaaa635
commit d7acc1ee0f
2 changed files with 19 additions and 0 deletions

View File

@@ -28,9 +28,15 @@ namespace Opm {
class PlymwinjTable : public PolyInjTable {
public:
PlymwinjTable() = default;
PlymwinjTable(const std::vector<double>& throughputs,
const std::vector<double>& velocities,
int tableNumber,
const std::vector<std::vector<double>>& data);
explicit PlymwinjTable(const DeckKeyword& table);
const std::vector<std::vector<double>>& getMoleWeights() const;
bool operator==(const PlymwinjTable& data) const;
};
}

View File

@@ -81,6 +81,14 @@ namespace Opm{
// PlymwinjTable
PlymwinjTable::PlymwinjTable(const std::vector<double>& throughputs,
const std::vector<double>& velocities,
int tableNumber,
const std::vector<std::vector<double>>& data)
: PolyInjTable(throughputs, velocities, tableNumber, data)
{
}
PlymwinjTable::PlymwinjTable(const Opm::DeckKeyword& table)
{
using namespace ParserKeywords;
@@ -124,6 +132,11 @@ namespace Opm{
return getTableData();
}
bool PlymwinjTable::operator==(const PlymwinjTable& data) const
{
return static_cast<const PolyInjTable&>(*this) == static_cast<const PolyInjTable&>(data);
}
// SkprwatTable