changed: add a DeckRecord constructor for EquilRecord and use this in Equil
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
|
||||
namespace Opm {
|
||||
class DeckKeyword;
|
||||
class DeckRecord;
|
||||
|
||||
class EquilRecord {
|
||||
public:
|
||||
double datumDepth() const;
|
||||
@@ -21,8 +23,8 @@ namespace Opm {
|
||||
bool humidGasInitConstantRvw() const;
|
||||
|
||||
EquilRecord();
|
||||
|
||||
EquilRecord( double datum_depth_arg, double datum_depth_pc_arg, double woc_depth, double woc_pc, double goc_depth, double goc_pc, bool live_oil_init, bool wet_gas_init, int target_accuracy, bool humid_gas_init);
|
||||
explicit EquilRecord(const DeckRecord& record);
|
||||
|
||||
bool operator==(const EquilRecord& data) const;
|
||||
|
||||
|
||||
@@ -38,6 +38,19 @@ namespace Opm {
|
||||
, humid_gas_init_proc(humid_gas_init)
|
||||
{}
|
||||
|
||||
EquilRecord::EquilRecord(const DeckRecord& record)
|
||||
: datum_depth(record.getItem<ParserKeywords::EQUIL::DATUM_DEPTH>().getSIDouble(0))
|
||||
, datum_depth_ps(record.getItem<ParserKeywords::EQUIL::DATUM_PRESSURE>().getSIDouble(0))
|
||||
, water_oil_contact_depth(record.getItem<ParserKeywords::EQUIL::OWC>().getSIDouble(0))
|
||||
, water_oil_contact_capillary_pressure(record.getItem<ParserKeywords::EQUIL::PC_OWC>().getSIDouble(0))
|
||||
, gas_oil_contact_depth(record.getItem<ParserKeywords::EQUIL::GOC>().getSIDouble(0))
|
||||
, gas_oil_contact_capillary_pressure(record.getItem<ParserKeywords::EQUIL::PC_GOC>().getSIDouble(0))
|
||||
, live_oil_init_proc(record.getItem<ParserKeywords::EQUIL::BLACK_OIL_INIT>().get<int>(0) <= 0)
|
||||
, wet_gas_init_proc(record.getItem<ParserKeywords::EQUIL::BLACK_OIL_INIT_WG>().get<int>(0) <= 0)
|
||||
, init_target_accuracy(record.getItem<ParserKeywords::EQUIL::OIP_INIT>().get<int>(0))
|
||||
, humid_gas_init_proc(record.getItem<ParserKeywords::EQUIL::BLACK_OIL_INIT_HG>().get<int>(0) <= 0)
|
||||
{}
|
||||
|
||||
double EquilRecord::datumDepth() const {
|
||||
return this->datum_depth;
|
||||
}
|
||||
@@ -100,21 +113,7 @@ namespace Opm {
|
||||
using ParserKeywords::EQUIL;
|
||||
|
||||
for (const auto& record : keyword) {
|
||||
const auto datum_depth_arg = record.getItem<EQUIL::DATUM_DEPTH>().getSIDouble(0);
|
||||
const auto datum_depth_pc_arg = record.getItem<EQUIL::DATUM_PRESSURE>().getSIDouble(0);
|
||||
const auto woc_depth = record.getItem<EQUIL::OWC>().getSIDouble(0);
|
||||
const auto woc_pc = record.getItem<EQUIL::PC_OWC>().getSIDouble(0);
|
||||
const auto goc_depth = record.getItem<EQUIL::GOC>().getSIDouble(0);
|
||||
const auto goc_pc = record.getItem<EQUIL::PC_GOC>().getSIDouble(0);
|
||||
const auto live_oil_init = record.getItem<EQUIL::BLACK_OIL_INIT>().get<int>(0) <= 0;
|
||||
const auto wet_gas_init = record.getItem<EQUIL::BLACK_OIL_INIT_WG>().get<int>(0) <= 0;
|
||||
const auto target_accuracy = record.getItem<EQUIL::OIP_INIT>().get<int>(0);
|
||||
const auto humid_gas_init = record.getItem<EQUIL::BLACK_OIL_INIT_HG>().get<int>(0) <= 0;
|
||||
|
||||
this->m_records.emplace_back(datum_depth_arg, datum_depth_pc_arg,
|
||||
woc_depth , woc_pc,
|
||||
goc_depth , goc_pc,
|
||||
live_oil_init, wet_gas_init, target_accuracy, humid_gas_init);
|
||||
this->m_records.emplace_back(record);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user