Merge pull request #1621 from akva2/move_ser_object
move data serialization objects close to the class code
This commit is contained in:
@@ -33,6 +33,15 @@ public:
|
||||
lineno(lno)
|
||||
{}
|
||||
|
||||
static Location serializeObject()
|
||||
{
|
||||
Location result;
|
||||
result.filename = "test";
|
||||
result.lineno = 1;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
bool operator==(const Location& data) const {
|
||||
return filename == data.filename &&
|
||||
lineno == data.lineno;
|
||||
|
||||
@@ -126,14 +126,9 @@ namespace Opm {
|
||||
using iterator = std::vector< DeckKeyword >::iterator;
|
||||
|
||||
Deck();
|
||||
|
||||
Deck( const Deck& );
|
||||
Deck(const std::vector<DeckKeyword>& keywords,
|
||||
const UnitSystem& defUnits,
|
||||
const UnitSystem* activeUnits,
|
||||
const std::string& dataFile,
|
||||
const std::string& inputPath,
|
||||
size_t accessCount);
|
||||
|
||||
static Deck serializeObject();
|
||||
|
||||
Deck& operator=(const Deck& rhs);
|
||||
bool operator==(const Deck& data) const;
|
||||
|
||||
@@ -44,16 +44,8 @@ namespace Opm {
|
||||
DeckItem( const std::string&, UDAValue) = delete;
|
||||
DeckItem( const std::string&, UDAValue, const std::vector<Dimension>& active_dim, const std::vector<Dimension>& default_dim);
|
||||
DeckItem( const std::string&, double, const std::vector<Dimension>& active_dim, const std::vector<Dimension>& default_dim);
|
||||
DeckItem(const std::vector<double>& dVec,
|
||||
const std::vector<int>& iVec,
|
||||
const std::vector<std::string>& sVec,
|
||||
const std::vector<UDAValue>& uVec,
|
||||
type_tag type,
|
||||
const std::string& itemName,
|
||||
const std::vector<value::status>& valueStat,
|
||||
bool rawdata,
|
||||
const std::vector<Dimension>& activeDim,
|
||||
const std::vector<Dimension>& defDim);
|
||||
|
||||
static DeckItem serializeObject();
|
||||
|
||||
const std::string& name() const;
|
||||
|
||||
|
||||
@@ -47,12 +47,8 @@ namespace Opm {
|
||||
DeckKeyword(const ParserKeyword& parserKeyword, const std::vector<std::vector<DeckValue>>& record_list, UnitSystem& system_active, UnitSystem& system_default);
|
||||
DeckKeyword(const ParserKeyword& parserKeyword, const std::vector<int>& data);
|
||||
DeckKeyword(const ParserKeyword& parserKeyword, const std::vector<double>& data, UnitSystem& system_active, UnitSystem& system_default);
|
||||
DeckKeyword(const std::string& kwName,
|
||||
const Location& loc,
|
||||
const std::vector<DeckRecord>& record,
|
||||
bool dataKw,
|
||||
bool slashTerminated);
|
||||
|
||||
static DeckKeyword serializeObject();
|
||||
|
||||
const std::string& name() const;
|
||||
void setFixedSize();
|
||||
|
||||
@@ -36,6 +36,8 @@ namespace Opm {
|
||||
DeckRecord() = default;
|
||||
DeckRecord( std::vector< DeckItem >&& );
|
||||
|
||||
static DeckRecord serializeObject();
|
||||
|
||||
size_t size() const;
|
||||
void addItem( DeckItem deckItem );
|
||||
|
||||
|
||||
@@ -38,6 +38,8 @@ public:
|
||||
UDAValue(double data, const Dimension& dim);
|
||||
UDAValue(const std::string& data, const Dimension& dim);
|
||||
|
||||
static UDAValue serializeObject();
|
||||
|
||||
/*
|
||||
The get<double>() and get<std::string>() methods will throw an
|
||||
exception if the internal type and the template parameter disagree.
|
||||
|
||||
@@ -82,6 +82,8 @@ namespace Opm {
|
||||
Aquancon(const EclipseGrid& grid, const Deck& deck);
|
||||
Aquancon(const std::unordered_map<int, std::vector<Aquancon::AquancCell>>& data);
|
||||
|
||||
static Aquancon serializeObject();
|
||||
|
||||
const std::unordered_map<int, std::vector<Aquancon::AquancCell>>& data() const;
|
||||
bool operator==(const Aquancon& other) const;
|
||||
bool active() const;
|
||||
|
||||
@@ -110,6 +110,8 @@ namespace Opm {
|
||||
AquiferCT(const TableManager& tables, const Deck& deck);
|
||||
AquiferCT(const std::vector<AquiferCT::AQUCT_data>& data);
|
||||
|
||||
static AquiferCT serializeObject();
|
||||
|
||||
std::size_t size() const;
|
||||
std::vector<AquiferCT::AQUCT_data>::const_iterator begin() const;
|
||||
std::vector<AquiferCT::AQUCT_data>::const_iterator end() const;
|
||||
|
||||
@@ -36,6 +36,8 @@ public:
|
||||
AquiferConfig(const TableManager& tables, const EclipseGrid& grid, const Deck& deck);
|
||||
AquiferConfig(const Aquifetp& fetp, const AquiferCT& ct, const Aquancon& conn);
|
||||
|
||||
static AquiferConfig serializeObject();
|
||||
|
||||
bool active() const;
|
||||
const AquiferCT& ct() const;
|
||||
const Aquifetp& fetp() const;
|
||||
|
||||
@@ -66,6 +66,9 @@ class Aquifetp {
|
||||
Aquifetp() = default;
|
||||
Aquifetp(const Deck& deck);
|
||||
Aquifetp(const std::vector<Aquifetp::AQUFETP_data>& data);
|
||||
|
||||
static Aquifetp serializeObject();
|
||||
|
||||
const std::vector<Aquifetp::AQUFETP_data>& data() const;
|
||||
|
||||
std::size_t size() const;
|
||||
|
||||
@@ -36,6 +36,8 @@ namespace Opm {
|
||||
EclipseConfig(const Deck& deck);
|
||||
EclipseConfig(const InitConfig& initConfig, const IOConfig& io_conf);
|
||||
|
||||
static EclipseConfig serializeObject();
|
||||
|
||||
const InitConfig& init() const;
|
||||
IOConfig& io();
|
||||
const IOConfig& io() const;
|
||||
|
||||
@@ -32,7 +32,8 @@ public:
|
||||
/// Construct from input deck
|
||||
explicit EDITNNC(const Deck& deck);
|
||||
|
||||
explicit EDITNNC(const std::vector<NNCdata>& data);
|
||||
/// Returns an instance used for serialization test
|
||||
static EDITNNC serializeObject();
|
||||
|
||||
/// \brief Get an ordered set of EDITNNC
|
||||
const std::vector<NNCdata>& data() const
|
||||
|
||||
@@ -29,7 +29,8 @@ class EndpointScaling {
|
||||
public:
|
||||
EndpointScaling() noexcept = default;
|
||||
explicit EndpointScaling( const Deck& );
|
||||
EndpointScaling(const std::bitset<4>& opts);
|
||||
|
||||
static EndpointScaling serializeObject();
|
||||
|
||||
/* true if endpoint scaling is enabled, otherwise false */
|
||||
operator bool() const noexcept;
|
||||
|
||||
@@ -34,9 +34,8 @@ class Fault {
|
||||
public:
|
||||
Fault() = default;
|
||||
explicit Fault(const std::string& faultName);
|
||||
Fault(const std::string& name,
|
||||
double transMult,
|
||||
const std::vector<FaultFace>& faceList);
|
||||
|
||||
static Fault serializeObject();
|
||||
|
||||
const std::string& getName() const;
|
||||
void setTransMult(double transMult);
|
||||
|
||||
@@ -36,7 +36,8 @@ class FaultCollection {
|
||||
public:
|
||||
FaultCollection();
|
||||
FaultCollection(const GRIDSection& gridSection, const GridDims& grid);
|
||||
FaultCollection(const OrderedMap<std::string, Fault>& faults);
|
||||
|
||||
static FaultCollection serializeObject();
|
||||
|
||||
size_t size() const;
|
||||
bool hasFault(const std::string& faultName) const;
|
||||
|
||||
@@ -35,7 +35,8 @@ public:
|
||||
size_t J1 , size_t J2,
|
||||
size_t K1 , size_t K2,
|
||||
FaceDir::DirEnum faceDir);
|
||||
FaultFace(const std::vector<size_t>& indices, FaceDir::DirEnum faceDir);
|
||||
|
||||
static FaultFace serializeObject();
|
||||
|
||||
std::vector<size_t>::const_iterator begin() const;
|
||||
std::vector<size_t>::const_iterator end() const;
|
||||
|
||||
@@ -34,9 +34,10 @@ namespace Opm {
|
||||
|
||||
GridDims();
|
||||
explicit GridDims(std::array<int, 3> xyz);
|
||||
|
||||
GridDims(size_t nx, size_t ny, size_t nz);
|
||||
|
||||
static GridDims serializeObject();
|
||||
|
||||
explicit GridDims(const Deck& deck);
|
||||
|
||||
size_t getNX() const;
|
||||
|
||||
@@ -94,11 +94,8 @@ namespace Opm {
|
||||
MULTREGTScanner(const GridDims& grid,
|
||||
const FieldPropsManager* fp_arg,
|
||||
const std::vector< const DeckKeyword* >& keywords);
|
||||
MULTREGTScanner(const std::array<size_t,3>& size,
|
||||
const std::vector<MULTREGTRecord>& records,
|
||||
const ExternalSearchMap& searchMap,
|
||||
const std::map<std::string, std::vector<int>>& region,
|
||||
const std::string& defaultRegion);
|
||||
|
||||
static MULTREGTScanner serializeObject();
|
||||
|
||||
double getRegionMultiplier(size_t globalCellIdx1, size_t globalCellIdx2, FaceDir::DirEnum faceDir) const;
|
||||
|
||||
|
||||
@@ -64,7 +64,9 @@ public:
|
||||
|
||||
/// Construct from input deck.
|
||||
explicit NNC(const Deck& deck);
|
||||
explicit NNC(const std::vector<NNCdata>& nncdata) : m_nnc(nncdata) {}
|
||||
|
||||
static NNC serializeObject();
|
||||
|
||||
void addNNC(const size_t cell1, const size_t cell2, const double trans);
|
||||
const std::vector<NNCdata>& data() const { return m_nnc; }
|
||||
size_t numNNC() const;
|
||||
|
||||
@@ -49,10 +49,8 @@ namespace Opm {
|
||||
public:
|
||||
TransMult() = default;
|
||||
TransMult(const GridDims& dims, const Deck& deck, const FieldPropsManager& fp);
|
||||
TransMult(const std::array<size_t,3>& size,
|
||||
const std::map<FaceDir::DirEnum, std::vector<double>>& trans,
|
||||
const std::map<FaceDir::DirEnum, std::string>& names,
|
||||
const MULTREGTScanner& scanner);
|
||||
|
||||
static TransMult serializeObject();
|
||||
|
||||
double getMultiplier(size_t globalIndex, FaceDir::DirEnum faceDir) const;
|
||||
double getMultiplier(size_t i , size_t j , size_t k, FaceDir::DirEnum faceDir) const;
|
||||
|
||||
@@ -151,15 +151,8 @@ namespace Opm {
|
||||
IOConfig() = default;
|
||||
explicit IOConfig( const Deck& );
|
||||
explicit IOConfig( const std::string& input_path );
|
||||
IOConfig(bool write_init, bool write_egrid,
|
||||
bool unifin, bool unifout,
|
||||
bool fmtin, bool fmtout,
|
||||
const std::string& deck_name,
|
||||
bool output_enabled,
|
||||
const std::string& output_dir,
|
||||
bool no_sim,
|
||||
const std::string& base_name,
|
||||
bool ecl_compatible_rst);
|
||||
|
||||
static IOConfig serializeObject();
|
||||
|
||||
void setEclCompatibleRST(bool ecl_rst);
|
||||
bool getEclCompatibleRST() const;
|
||||
|
||||
@@ -298,6 +298,9 @@ namespace Opm {
|
||||
RestartSchedule() = default;
|
||||
explicit RestartSchedule( size_t sched_restart);
|
||||
RestartSchedule( size_t step, size_t b, size_t freq);
|
||||
|
||||
static RestartSchedule serializeObject();
|
||||
|
||||
bool writeRestartFile( size_t timestep , const TimeMap& timemap) const;
|
||||
bool operator!=(const RestartSchedule& rhs) const;
|
||||
bool operator==( const RestartSchedule& rhs ) const;
|
||||
@@ -330,12 +333,8 @@ namespace Opm {
|
||||
RestartConfig( const TimeMap& time_map, const Deck&, const ParseContext& parseContext, T&& errors );
|
||||
RestartConfig( const TimeMap& time_map, const Deck&, const ParseContext& parseContext, ErrorGuard& errors );
|
||||
RestartConfig( const TimeMap& time_map, const Deck& );
|
||||
RestartConfig(const TimeMap& timeMap,
|
||||
int firstRestartStep,
|
||||
bool writeInitial,
|
||||
const DynamicState<RestartSchedule>& restart_sched,
|
||||
const DynamicState<std::map<std::string,int>>& restart_keyw,
|
||||
const std::vector<bool>& save_keyw);
|
||||
|
||||
static RestartConfig serializeObject();
|
||||
|
||||
int getFirstRestartStep() const;
|
||||
bool getWriteRestartFile(size_t timestep, bool log=true) const;
|
||||
|
||||
@@ -58,7 +58,8 @@ namespace Opm {
|
||||
|
||||
Equil() = default;
|
||||
explicit Equil( const DeckKeyword& );
|
||||
Equil(const std::vector<EquilRecord>& records);
|
||||
|
||||
static Equil serializeObject();
|
||||
|
||||
const EquilRecord& getRecord( size_t id ) const;
|
||||
|
||||
|
||||
@@ -38,11 +38,8 @@ public:
|
||||
FoamData();
|
||||
FoamData(const DeckRecord& FOAMFSC_record, const DeckRecord& FOAMROCK_record);
|
||||
explicit FoamData(const DeckRecord& FOAMROCK_record);
|
||||
FoamData(double reference_surfactant_concentration,
|
||||
double exponent,
|
||||
double minimum_surfactant_concentration,
|
||||
bool allow_desorption,
|
||||
double rock_density);
|
||||
|
||||
static FoamData serializeObject();
|
||||
|
||||
double referenceSurfactantConcentration() const;
|
||||
double exponent() const;
|
||||
@@ -82,9 +79,8 @@ public:
|
||||
|
||||
FoamConfig() = default;
|
||||
explicit FoamConfig(const Deck&);
|
||||
FoamConfig(const std::vector<FoamData>& data,
|
||||
Phase transport_phase,
|
||||
MobilityModel mobility_model);
|
||||
|
||||
static FoamConfig serializeObject();
|
||||
|
||||
const FoamData& getRecord(std::size_t index) const;
|
||||
|
||||
|
||||
@@ -34,9 +34,8 @@ namespace Opm {
|
||||
public:
|
||||
InitConfig();
|
||||
explicit InitConfig(const Deck& deck);
|
||||
InitConfig(const Equil& equil, const FoamConfig& foam,
|
||||
bool filleps, bool gravity, bool restartReq, int restartStep,
|
||||
const std::string& restartRootName);
|
||||
|
||||
static InitConfig serializeObject();
|
||||
|
||||
void setRestart( const std::string& root, int step);
|
||||
bool restartRequested() const;
|
||||
|
||||
@@ -54,7 +54,8 @@ class Phases {
|
||||
Phases() noexcept = default;
|
||||
Phases( bool oil, bool gas, bool wat, bool solvent = false, bool polymer = false, bool energy = false,
|
||||
bool polymw = false, bool foam = false, bool brine = false ) noexcept;
|
||||
Phases(const std::bitset<NUM_PHASES_IN_ENUM>& bbits);
|
||||
|
||||
static Phases serializeObject();
|
||||
|
||||
bool active( Phase ) const noexcept;
|
||||
size_t size() const noexcept;
|
||||
@@ -82,8 +83,8 @@ class Welldims {
|
||||
public:
|
||||
Welldims() = default;
|
||||
explicit Welldims(const Deck& deck);
|
||||
Welldims(int WMax, int CWMax, int WGMax, int GMax) :
|
||||
nWMax(WMax), nCWMax(CWMax), nWGMax(WGMax), nGMax(GMax) {}
|
||||
|
||||
static Welldims serializeObject();
|
||||
|
||||
int maxConnPerWell() const
|
||||
{
|
||||
@@ -132,7 +133,8 @@ class WellSegmentDims {
|
||||
public:
|
||||
WellSegmentDims();
|
||||
explicit WellSegmentDims(const Deck& deck);
|
||||
WellSegmentDims(int segWellMax, int segMax, int latBranchMax);
|
||||
|
||||
static WellSegmentDims serializeObject();
|
||||
|
||||
|
||||
int maxSegmentedWells() const
|
||||
@@ -171,8 +173,8 @@ class EclHysterConfig
|
||||
public:
|
||||
EclHysterConfig() = default;
|
||||
explicit EclHysterConfig(const Deck& deck);
|
||||
EclHysterConfig(bool active, int pcMod, int krMod);
|
||||
|
||||
static EclHysterConfig serializeObject();
|
||||
|
||||
/*!
|
||||
* \brief Specify whether hysteresis is enabled or not.
|
||||
@@ -232,6 +234,9 @@ public:
|
||||
SatFuncControls(const double tolcritArg,
|
||||
ThreePhaseOilKrModel model);
|
||||
|
||||
|
||||
static SatFuncControls serializeObject();
|
||||
|
||||
double minimumRelpermMobilityThreshold() const
|
||||
{
|
||||
return this->tolcrit;
|
||||
@@ -260,15 +265,8 @@ class Runspec {
|
||||
public:
|
||||
Runspec() = default;
|
||||
explicit Runspec( const Deck& );
|
||||
Runspec(const Phases& act_phases,
|
||||
const Tabdims& tabdims,
|
||||
const EndpointScaling& endScale,
|
||||
const Welldims& wellDims,
|
||||
const WellSegmentDims& wsegDims,
|
||||
const UDQParams& udqparams,
|
||||
const EclHysterConfig& hystPar,
|
||||
const Actdims& actDims,
|
||||
const SatFuncControls& sfuncctrl);
|
||||
|
||||
static Runspec serializeObject();
|
||||
|
||||
const UDQParams& udqParams() const noexcept;
|
||||
const Phases& phases() const noexcept;
|
||||
|
||||
@@ -17,9 +17,8 @@ public:
|
||||
ASTNode(TokenType type_arg);
|
||||
ASTNode(double value);
|
||||
ASTNode(TokenType type_arg, FuncType func_type_arg, const std::string& func_arg, const std::vector<std::string>& arg_list_arg);
|
||||
ASTNode(TokenType type_arg, FuncType ftype, const std::string& func_arg,
|
||||
const std::vector<std::string>& args, double number,
|
||||
const std::vector<ASTNode>& childs);
|
||||
|
||||
static ASTNode serializeObject();
|
||||
|
||||
Action::Result eval(const Action::Context& context) const;
|
||||
Action::Value value(const Action::Context& context) const;
|
||||
|
||||
@@ -28,8 +28,8 @@ class Actdims {
|
||||
public:
|
||||
Actdims();
|
||||
explicit Actdims(const Deck& deck);
|
||||
Actdims(std::size_t keyw, std::size_t line_cnt,
|
||||
std::size_t chars, std::size_t conds);
|
||||
|
||||
static Actdims serializeObject();
|
||||
|
||||
std::size_t max_keywords() const;
|
||||
std::size_t max_line_count() const;
|
||||
|
||||
@@ -44,7 +44,9 @@ class AST{
|
||||
public:
|
||||
AST() = default;
|
||||
explicit AST(const std::vector<std::string>& tokens);
|
||||
AST(const std::shared_ptr<ASTNode>& cond);
|
||||
|
||||
static AST serializeObject();
|
||||
|
||||
Result eval(const Context& context) const;
|
||||
|
||||
bool operator==(const AST& data) const;
|
||||
|
||||
@@ -67,15 +67,8 @@ public:
|
||||
ActionX(const std::string& name, size_t max_run, double max_wait, std::time_t start_time);
|
||||
ActionX(const DeckKeyword& kw, std::time_t start_time);
|
||||
ActionX(const DeckRecord& record, std::time_t start_time);
|
||||
ActionX(const std::string& nam,
|
||||
size_t maxRun,
|
||||
double minWait,
|
||||
std::time_t startTime,
|
||||
const std::vector<DeckKeyword>& keyword,
|
||||
const AST& cond,
|
||||
const std::vector<Condition>& conditions,
|
||||
size_t runCount,
|
||||
std::time_t lastRun);
|
||||
|
||||
static ActionX serializeObject();
|
||||
|
||||
void addKeyword(const DeckKeyword& kw);
|
||||
bool ready(std::time_t sim_time) const;
|
||||
|
||||
@@ -40,6 +40,9 @@ class Actions {
|
||||
public:
|
||||
Actions() = default;
|
||||
Actions(const std::vector<ActionX>& action, const std::vector<PyAction>& pyactions);
|
||||
|
||||
static Actions serializeObject();
|
||||
|
||||
size_t size() const;
|
||||
int max_input_lines() const;
|
||||
bool empty() const;
|
||||
|
||||
@@ -41,6 +41,9 @@ public:
|
||||
|
||||
PyAction() = default;
|
||||
PyAction(const std::string& name, RunCount run_count, const std::string& code);
|
||||
|
||||
static PyAction serializeObject();
|
||||
|
||||
const std::string& code() const;
|
||||
const std::string& name() const;
|
||||
bool operator==(const PyAction& other) const;
|
||||
|
||||
@@ -123,7 +123,9 @@ namespace Opm
|
||||
public:
|
||||
Events() = default;
|
||||
explicit Events(const TimeMap& timeMap);
|
||||
explicit Events(const DynamicVector<uint64_t>& events);
|
||||
|
||||
static Events serializeObject();
|
||||
|
||||
void addEvent(ScheduleEvents::Events event, size_t reportStep);
|
||||
bool hasEvent(uint64_t eventMask, size_t reportStep) const;
|
||||
|
||||
|
||||
@@ -72,8 +72,7 @@ namespace Opm {
|
||||
MaxProcedure max_proc;
|
||||
};
|
||||
|
||||
GConSale() = default;
|
||||
GConSale(const std::map<std::string, GCONSALEGroup>& group);
|
||||
static GConSale serializeObject();
|
||||
|
||||
bool has(const std::string& name) const;
|
||||
const GCONSALEGroup& get(const std::string& name) const;
|
||||
|
||||
@@ -63,8 +63,7 @@ namespace Opm {
|
||||
std::string network_node;
|
||||
};
|
||||
|
||||
GConSump() = default;
|
||||
GConSump(const std::map<std::string, GCONSUMPGroup>& group);
|
||||
static GConSump serializeObject();
|
||||
|
||||
bool has(const std::string& name) const;
|
||||
const GCONSUMPGroup& get(const std::string& name) const;
|
||||
|
||||
@@ -114,6 +114,8 @@ struct GroupInjectionProperties {
|
||||
std::string reinj_group;
|
||||
std::string voidage_group;
|
||||
|
||||
static GroupInjectionProperties serializeObject();
|
||||
|
||||
int injection_controls = 0;
|
||||
bool operator==(const GroupInjectionProperties& other) const;
|
||||
bool operator!=(const GroupInjectionProperties& other) const;
|
||||
@@ -157,6 +159,8 @@ struct GroupProductionProperties {
|
||||
GuideRateTarget guide_rate_def;
|
||||
double resv_target = 0;
|
||||
|
||||
static GroupProductionProperties serializeObject();
|
||||
|
||||
int production_controls = 0;
|
||||
bool operator==(const GroupProductionProperties& other) const;
|
||||
bool operator!=(const GroupProductionProperties& other) const;
|
||||
@@ -194,22 +198,8 @@ struct ProductionControls {
|
||||
|
||||
Group();
|
||||
Group(const std::string& group_name, std::size_t insert_index_arg, std::size_t init_step_arg, double udq_undefined_arg, const UnitSystem& unit_system);
|
||||
Group(const std::string& gname,
|
||||
std::size_t insert_idx,
|
||||
std::size_t initstep,
|
||||
double udqUndef,
|
||||
const UnitSystem& units,
|
||||
GroupType gtype,
|
||||
double groupEF,
|
||||
bool transferGroupEF,
|
||||
bool availableForGroupControl,
|
||||
int vfp,
|
||||
const std::string& parent,
|
||||
const IOrderSet<std::string>& well,
|
||||
const IOrderSet<std::string>& group,
|
||||
const std::map<Phase, GroupInjectionProperties> &injProps,
|
||||
const GroupProductionProperties& prodProps);
|
||||
|
||||
static Group serializeObject();
|
||||
|
||||
bool defined(std::size_t timeStep) const;
|
||||
std::size_t insert_index() const;
|
||||
|
||||
@@ -71,10 +71,7 @@ struct GroupTarget {
|
||||
}
|
||||
};
|
||||
|
||||
GuideRateConfig() = default;
|
||||
GuideRateConfig(std::shared_ptr<GuideRateModel> model,
|
||||
const std::unordered_map<std::string,WellTarget>& well,
|
||||
const std::unordered_map<std::string,GroupTarget>& group);
|
||||
static GuideRateConfig serializeObject();
|
||||
|
||||
const GuideRateModel& model() const;
|
||||
bool has_model() const;
|
||||
|
||||
@@ -52,17 +52,10 @@ public:
|
||||
bool allow_increase_arg,
|
||||
double damping_factor_arg,
|
||||
bool use_free_gas_arg);
|
||||
|
||||
GuideRateModel(double time_interval_arg,
|
||||
Target target_arg,
|
||||
const std::array<double,6>& coefs_arg,
|
||||
bool allow_increase_arg,
|
||||
double damping_factor_arg,
|
||||
bool use_free_gas_arg,
|
||||
bool use_default_model_arg,
|
||||
const std::array<UDAValue,3>& udaCoefs_arg);
|
||||
|
||||
GuideRateModel() = default;
|
||||
|
||||
static GuideRateModel serializeObject();
|
||||
|
||||
bool updateLINCOM(const UDAValue& alpha, const UDAValue& beta, const UDAValue& gamma);
|
||||
double eval(double oil_pot, double gas_pot, double wat_pot) const;
|
||||
double update_delay() const;
|
||||
|
||||
@@ -51,25 +51,10 @@ namespace Opm {
|
||||
Segment(const Segment& src, double new_volume);
|
||||
Segment(int segment_number_in, int branch_in, int outlet_segment_in, double length_in, double depth_in,
|
||||
double internal_diameter_in, double roughness_in, double cross_area_in, double volume_in, bool data_ready_in, SegmentType segment_type_in);
|
||||
|
||||
|
||||
Segment(int segmentNumber,
|
||||
int branchNumber,
|
||||
int outlegSegment,
|
||||
const std::vector<int>& inletSegments,
|
||||
double totalLength,
|
||||
double depth,
|
||||
double internalDiameter,
|
||||
double roughness,
|
||||
double crossArea,
|
||||
double volume,
|
||||
bool dataReady,
|
||||
SegmentType segmentType,
|
||||
std::shared_ptr<SpiralICD> spiralICD,
|
||||
std::shared_ptr<Valve> valv);
|
||||
|
||||
Segment(const RestartIO::RstSegment& rst_segment);
|
||||
|
||||
static Segment serializeObject();
|
||||
|
||||
int segmentNumber() const;
|
||||
int branchNumber() const;
|
||||
int outletSegment() const;
|
||||
|
||||
@@ -49,6 +49,8 @@ namespace Opm {
|
||||
ICDStatus status,
|
||||
double scalingFactor);
|
||||
|
||||
static SpiralICD serializeObject();
|
||||
|
||||
// the function will return a map
|
||||
// [
|
||||
// "WELL1" : [<seg1, sicd1>, <seg2, sicd2> ...]
|
||||
|
||||
@@ -47,6 +47,8 @@ namespace Opm {
|
||||
double pipeCrossA,
|
||||
ICDStatus stat);
|
||||
|
||||
static Valve serializeObject();
|
||||
|
||||
// the function will return a map
|
||||
// [
|
||||
// "WELL1" : [<seg1, valv1>, <seg2, valv2> ...]
|
||||
|
||||
@@ -66,6 +66,8 @@ namespace Opm {
|
||||
const std::vector<Segment>& segments);
|
||||
explicit WellSegments(const DeckKeyword& keyword);
|
||||
|
||||
static WellSegments serializeObject();
|
||||
|
||||
std::size_t size() const;
|
||||
double depthTopSegment() const;
|
||||
double lengthTopSegment() const;
|
||||
|
||||
@@ -41,6 +41,24 @@ namespace Opm {
|
||||
int error_stop_limit = ParserKeywords::MESSAGES::ERROR_STOP_LIMIT::defaultValue;
|
||||
int bug_stop_limit = ParserKeywords::MESSAGES::BUG_STOP_LIMIT::defaultValue;
|
||||
|
||||
static MLimits serializeObject()
|
||||
{
|
||||
MLimits result;
|
||||
result.message_print_limit = 1;
|
||||
result.comment_print_limit = 2;
|
||||
result.warning_print_limit = 3;
|
||||
result.problem_print_limit = 4;
|
||||
result.error_print_limit = 5;
|
||||
result.bug_print_limit = 6;
|
||||
result.message_stop_limit = 7;
|
||||
result.comment_stop_limit = 8;
|
||||
result.warning_stop_limit = 9;
|
||||
result.problem_stop_limit = 10;
|
||||
result.error_stop_limit = 11;
|
||||
result.bug_stop_limit = 12;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
bool operator==(const MLimits& other) const {
|
||||
return ((this->message_print_limit == other.message_print_limit) &&
|
||||
@@ -92,7 +110,8 @@ namespace Opm {
|
||||
*/
|
||||
|
||||
explicit MessageLimits( const TimeMap& );
|
||||
explicit MessageLimits( const DynamicState<MLimits>& );
|
||||
|
||||
static MessageLimits serializeObject();
|
||||
|
||||
///Get all the value from MESSAGES keyword.
|
||||
int getMessagePrintLimit(size_t timestep) const;
|
||||
|
||||
@@ -42,12 +42,9 @@ namespace Opm
|
||||
|
||||
OilVaporizationProperties();
|
||||
explicit OilVaporizationProperties(const size_t numPvtReginIdx);
|
||||
OilVaporizationProperties(OilVaporization type,
|
||||
double vap1,
|
||||
double vap2,
|
||||
const std::vector<double>& maxDRSDT,
|
||||
const std::vector<bool>& maxDRSDT_allCells,
|
||||
const std::vector<double>& maxDRVDT);
|
||||
|
||||
static OilVaporizationProperties serializeObject();
|
||||
|
||||
static void updateDRSDT(Opm::OilVaporizationProperties& ovp, const std::vector<double>& maxDRSDT, const std::vector<std::string>& option);
|
||||
static void updateDRVDT(Opm::OilVaporizationProperties& ovp, const std::vector<double>& maxDRVDT);
|
||||
static void updateVAPPARS(Opm::OilVaporizationProperties& ovp, double vap1, double vap2);
|
||||
|
||||
@@ -59,15 +59,10 @@ public:
|
||||
using WellOpenTimeMap = std::unordered_map<std::string, std::size_t>;
|
||||
|
||||
RFTConfig();
|
||||
RFTConfig(const TimeMap& tm,
|
||||
const std::size_t first_rft,
|
||||
const std::pair<bool, std::size_t>& rftTime,
|
||||
const WellOpenTimeMap& rftName,
|
||||
const WellOpenTimeMap& wellOpen,
|
||||
const ConfigMap<RFT>& rconfig,
|
||||
const ConfigMap<PLT>& pconfig);
|
||||
|
||||
explicit RFTConfig(const TimeMap& time_map);
|
||||
|
||||
static RFTConfig serializeObject();
|
||||
|
||||
bool rft(const std::string& well, std::size_t report_step) const;
|
||||
bool plt(const std::string& well, std::size_t report_step) const;
|
||||
bool getWellOpenRFT(const std::string& well_name, std::size_t report_step) const;
|
||||
|
||||
@@ -156,30 +156,7 @@ namespace Opm
|
||||
const EclipseState& es,
|
||||
const RestartIO::RstState* rst = nullptr);
|
||||
|
||||
Schedule(const TimeMap& timeMap,
|
||||
const WellMap& wellsStatic,
|
||||
const GroupMap& group,
|
||||
const DynamicState<OilVaporizationProperties>& oilVapProps,
|
||||
const Events& events,
|
||||
const DynamicVector<Deck>& modifierDeck,
|
||||
const DynamicState<Tuning>& tuning,
|
||||
const MessageLimits& messageLimits,
|
||||
const Runspec& runspec,
|
||||
const VFPProdMap& vfpProdTables,
|
||||
const VFPInjMap& vfpInjTables,
|
||||
const DynamicState<std::shared_ptr<WellTestConfig>>& wtestConfig,
|
||||
const DynamicState<std::shared_ptr<WListManager>>& wListManager,
|
||||
const DynamicState<std::shared_ptr<UDQConfig>>& udqConfig,
|
||||
const DynamicState<std::shared_ptr<UDQActive>>& udqActive,
|
||||
const DynamicState<std::shared_ptr<GuideRateConfig>>& guideRateConfig,
|
||||
const DynamicState<std::shared_ptr<GConSale>>& gconSale,
|
||||
const DynamicState<std::shared_ptr<GConSump>>& gconSump,
|
||||
const DynamicState<Well::ProducerCMode>& globalWhistCtlMode,
|
||||
const DynamicState<std::shared_ptr<Action::Actions>>& actions,
|
||||
const RFTConfig& rftconfig,
|
||||
const DynamicState<int>& nupCol,
|
||||
const RestartConfig& rst_config,
|
||||
const std::map<std::string,Events>& wellGroupEvents);
|
||||
static Schedule serializeObject();
|
||||
|
||||
/*
|
||||
* If the input deck does not specify a start time, Eclipse's 1. Jan
|
||||
|
||||
@@ -42,6 +42,8 @@ public:
|
||||
explicit WellType(Phase welspecs_phase);
|
||||
WellType() = default;
|
||||
|
||||
static WellType serializeObject();
|
||||
|
||||
bool injector() const;
|
||||
bool producer() const;
|
||||
bool update(InjectorType injector_type);
|
||||
|
||||
@@ -43,6 +43,8 @@ namespace Opm {
|
||||
explicit TimeMap(const Deck& deck, const std::pair<std::time_t, std::size_t>& restart = std::make_pair(std::time_t{0}, std::size_t{0}));
|
||||
explicit TimeMap(const std::vector<std::time_t>& time_points);
|
||||
|
||||
static TimeMap serializeObject();
|
||||
|
||||
size_t size() const;
|
||||
size_t last() const;
|
||||
size_t numTimesteps() const;
|
||||
|
||||
@@ -27,6 +27,51 @@ namespace Opm {
|
||||
struct Tuning {
|
||||
using TuningKw = ParserKeywords::TUNING;
|
||||
|
||||
static Tuning serializeObject()
|
||||
{
|
||||
Tuning result;
|
||||
result.TSINIT = 1.0;
|
||||
result.TSMAXZ = 2.0;
|
||||
result.TSMINZ = 3.0;
|
||||
result.TSMCHP = 4.0;
|
||||
result.TSFMAX = 5.0;
|
||||
result.TSFMIN = 6.0;
|
||||
result.TFDIFF = 7.0;
|
||||
result.TSFCNV = 8.0;
|
||||
result.THRUPT = 9.0;
|
||||
result.TMAXWC = 10.0;
|
||||
result.TMAXWC_has_value = true;
|
||||
|
||||
result.TRGTTE = 11.0;
|
||||
result.TRGCNV = 12.0;
|
||||
result.TRGMBE = 13.0;
|
||||
result.TRGLCV = 14.0;
|
||||
result.XXXTTE = 15.0;
|
||||
result.XXXCNV = 16.0;
|
||||
result.XXXMBE = 17.0;
|
||||
result.XXXLCV = 18.0;
|
||||
result.XXXWFL = 19.0;
|
||||
result.TRGFIP = 20.0;
|
||||
result.TRGSFT = 21.0;
|
||||
result.TRGSFT_has_value = true;
|
||||
result.THIONX = 22.0;
|
||||
result.TRWGHT = 23.0;
|
||||
|
||||
result.NEWTMX = 24;
|
||||
result.NEWTMN = 25;
|
||||
result.LITMAX = 26;
|
||||
result.LITMIN = 27;
|
||||
result.MXWSIT = 28;
|
||||
result.MXWPIT = 29;
|
||||
result.DDPLIM = 30.0;
|
||||
result.DDSLIM = 31.0;
|
||||
result.TRGDPR = 32.0;
|
||||
result.XXXDPR = 33.0;
|
||||
result.XXXDPR_has_value = true;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// Record1
|
||||
double TSINIT = TuningKw::TSINIT::defaultValue * Metric::Time;
|
||||
double TSMAXZ = TuningKw::TSMAXZ::defaultValue * Metric::Time;
|
||||
|
||||
@@ -42,12 +42,8 @@ public:
|
||||
UDQASTNode(UDQTokenType type_arg, const std::string& func_name, const UDQASTNode& left, const UDQASTNode& right);
|
||||
UDQASTNode(UDQTokenType type_arg, const std::string& func_name);
|
||||
UDQASTNode(UDQTokenType type_arg, const std::string& string_value, const std::vector<std::string>& selector);
|
||||
UDQASTNode(UDQVarType varType, UDQTokenType typ,
|
||||
const std::string& stringVal,
|
||||
double scalarVal,
|
||||
const std::vector<std::string>& selectors,
|
||||
const std::shared_ptr<UDQASTNode>& left_arg,
|
||||
const std::shared_ptr<UDQASTNode>& right_arg);
|
||||
|
||||
static UDQASTNode serializeObject();
|
||||
|
||||
UDQSet eval(UDQVarType eval_target, const UDQContext& context) const;
|
||||
|
||||
@@ -65,6 +61,7 @@ public:
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(var_type);
|
||||
serializer(type);
|
||||
serializer(string_value);
|
||||
serializer(selector);
|
||||
|
||||
@@ -127,11 +127,8 @@ public:
|
||||
UDAControl control;
|
||||
};
|
||||
|
||||
UDQActive() = default;
|
||||
UDQActive(const std::vector<InputRecord>& inputRecs,
|
||||
const std::vector<Record>& outputRecs,
|
||||
const std::unordered_map<std::string,std::size_t>& udqkeys,
|
||||
const std::unordered_map<std::string,std::size_t>& wgkeys);
|
||||
static UDQActive serializeObject();
|
||||
|
||||
int update(const UDQConfig& udq_config, const UDAValue& uda, const std::string& wgname, UDAControl control);
|
||||
std::size_t IUAD_size() const;
|
||||
std::size_t IUAP_size() const;
|
||||
|
||||
@@ -58,9 +58,8 @@ public:
|
||||
|
||||
UDQAssign();
|
||||
UDQAssign(const std::string& keyword, const std::vector<std::string>& selector, double value);
|
||||
UDQAssign(const std::string& keyword,
|
||||
UDQVarType varType,
|
||||
const std::vector<AssignRecord>& records);
|
||||
|
||||
static UDQAssign serializeObject();
|
||||
|
||||
const std::string& keyword() const;
|
||||
UDQVarType var_type() const;
|
||||
|
||||
@@ -43,14 +43,8 @@ namespace Opm {
|
||||
UDQConfig() = default;
|
||||
explicit UDQConfig(const Deck& deck);
|
||||
explicit UDQConfig(const UDQParams& params);
|
||||
UDQConfig(const UDQParams& params,
|
||||
const UDQFunctionTable& funcTable,
|
||||
const std::unordered_map<std::string, UDQDefine>& definition,
|
||||
const std::unordered_map<std::string, UDQAssign>& assignment,
|
||||
const std::unordered_map<std::string, std::string>& unit,
|
||||
const OrderedMap<std::string, UDQIndex>& inputIdx,
|
||||
const std::map<UDQVarType, std::size_t>& tCount);
|
||||
|
||||
static UDQConfig serializeObject();
|
||||
|
||||
const std::string& unit(const std::string& key) const;
|
||||
bool has_unit(const std::string& keyword) const;
|
||||
|
||||
@@ -62,6 +62,8 @@ public:
|
||||
UDQVarType type,
|
||||
const std::string& string_data);
|
||||
|
||||
static UDQDefine serializeObject();
|
||||
|
||||
UDQSet eval(const UDQContext& context) const;
|
||||
const std::string& keyword() const;
|
||||
const std::string& input_string() const;
|
||||
|
||||
@@ -42,6 +42,17 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
static UDQIndex serializeObject()
|
||||
{
|
||||
UDQIndex result;
|
||||
result.insert_index = 1;
|
||||
result.typed_insert_index = 2;
|
||||
result.action = UDQAction::ASSIGN;
|
||||
result.var_type = UDQVarType::WELL_VAR;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
bool operator==(const UDQIndex& data) const {
|
||||
return insert_index == data.insert_index &&
|
||||
typed_insert_index == data.typed_insert_index &&
|
||||
|
||||
@@ -32,9 +32,8 @@ namespace Opm {
|
||||
public:
|
||||
explicit UDQParams(const Deck& deck);
|
||||
UDQParams();
|
||||
UDQParams(bool reseed, int seed,
|
||||
double range, double undefined,
|
||||
double cmp);
|
||||
|
||||
static UDQParams serializeObject();
|
||||
|
||||
bool reseed() const;
|
||||
int rand_seed() const noexcept;
|
||||
|
||||
@@ -43,15 +43,10 @@ public:
|
||||
|
||||
|
||||
VFPInjTable();
|
||||
VFPInjTable(int table_num,
|
||||
double datum_depth,
|
||||
FLO_TYPE flo_type,
|
||||
const std::vector<double>& flo_data,
|
||||
const std::vector<double>& thp_data,
|
||||
const array_type& data);
|
||||
|
||||
VFPInjTable(const DeckKeyword& table, const UnitSystem& deck_unit_system);
|
||||
|
||||
static VFPInjTable serializeObject();
|
||||
|
||||
inline int getTableNum() const {
|
||||
return m_table_num;
|
||||
}
|
||||
|
||||
@@ -70,6 +70,7 @@ public:
|
||||
};
|
||||
|
||||
VFPProdTable();
|
||||
VFPProdTable( const DeckKeyword& table, const UnitSystem& deck_unit_system);
|
||||
VFPProdTable(int table_num,
|
||||
double datum_depth,
|
||||
FLO_TYPE flo_type,
|
||||
@@ -83,7 +84,7 @@ public:
|
||||
const std::vector<double>& alq_data,
|
||||
const array_type& data);
|
||||
|
||||
VFPProdTable( const DeckKeyword& table, const UnitSystem& deck_unit_system);
|
||||
static VFPProdTable serializeObject();
|
||||
|
||||
inline int getTableNum() const {
|
||||
return m_table_num;
|
||||
|
||||
@@ -98,29 +98,10 @@ namespace RestartIO {
|
||||
const double segDistEnd,
|
||||
const bool defaultSatTabId);
|
||||
|
||||
Connection(Direction dir,
|
||||
double depth,
|
||||
State state,
|
||||
int satTableId,
|
||||
int complnum,
|
||||
double CF,
|
||||
double Kh,
|
||||
double rw,
|
||||
double r0,
|
||||
double skinFactor,
|
||||
const std::array<int,3>& IJK,
|
||||
std::size_t global_index,
|
||||
CTFKind kind,
|
||||
std::size_t seqIndex,
|
||||
double segDistStart,
|
||||
double segDistEnd,
|
||||
bool defaultSatTabId,
|
||||
std::size_t compSegSeqIndex,
|
||||
int segment,
|
||||
double wellPi);
|
||||
|
||||
Connection(const RestartIO::RstConnection& rst_connection, std::size_t insert_index, const EclipseGrid& grid, const FieldPropsManager& fp);
|
||||
|
||||
static Connection serializeObject();
|
||||
|
||||
bool attachedToSegment() const;
|
||||
bool sameCoordinate(const int i, const int j, const int k) const;
|
||||
int getI() const;
|
||||
|
||||
@@ -28,7 +28,9 @@ class WList;
|
||||
class WListManager {
|
||||
public:
|
||||
WListManager() = default;
|
||||
WListManager(const std::map<std::string,WList>& list);
|
||||
|
||||
static WListManager serializeObject();
|
||||
|
||||
bool hasList(const std::string&) const;
|
||||
WList& getList(const std::string& name);
|
||||
const WList& getList(const std::string& name) const;
|
||||
|
||||
@@ -155,6 +155,17 @@ public:
|
||||
GuideRateTarget guide_phase;
|
||||
double scale_factor;
|
||||
|
||||
static WellGuideRate serializeObject()
|
||||
{
|
||||
WellGuideRate result;
|
||||
result.available = true;
|
||||
result.guide_rate = 1.0;
|
||||
result.guide_phase = GuideRateTarget::COMB;
|
||||
result.scale_factor = 2.0;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
bool operator==(const WellGuideRate& data) const {
|
||||
return available == data.available &&
|
||||
guide_rate == data.guide_rate &&
|
||||
@@ -225,21 +236,8 @@ public:
|
||||
|
||||
WellInjectionProperties();
|
||||
WellInjectionProperties(const UnitSystem& units, const std::string& wname);
|
||||
WellInjectionProperties(const std::string& wname,
|
||||
const UDAValue& surfaceInjRate,
|
||||
const UDAValue& reservoirInjRate,
|
||||
const UDAValue& BHP,
|
||||
const UDAValue& THP,
|
||||
double bhp_hist,
|
||||
double thp_hist,
|
||||
double temp,
|
||||
double bhph,
|
||||
double thph,
|
||||
int vfpTableNum,
|
||||
bool predMode,
|
||||
int injControls,
|
||||
InjectorType injType,
|
||||
InjectorCMode ctrlMode);
|
||||
|
||||
static WellInjectionProperties serializeObject();
|
||||
|
||||
void handleWELTARG(WELTARGCMode cmode, double newValue, double SIFactorP);
|
||||
void handleWCONINJE(const DeckRecord& record, bool availableForGroupControl, const std::string& well_name);
|
||||
@@ -351,24 +349,8 @@ public:
|
||||
|
||||
WellProductionProperties();
|
||||
WellProductionProperties(const UnitSystem& units, const std::string& name_arg);
|
||||
WellProductionProperties(const std::string& wname,
|
||||
const UDAValue& oilRate,
|
||||
const UDAValue& waterRate,
|
||||
const UDAValue& gasRate,
|
||||
const UDAValue& liquidRate,
|
||||
const UDAValue& resvRate,
|
||||
const UDAValue& BHP,
|
||||
const UDAValue& THP,
|
||||
double bhp_hist,
|
||||
double thp_hist,
|
||||
double bhph,
|
||||
double thph,
|
||||
int vfpTableNum,
|
||||
double alqValue,
|
||||
bool predMode,
|
||||
ProducerCMode ctrlMode,
|
||||
ProducerCMode whistctlMode,
|
||||
int prodCtrls);
|
||||
|
||||
static WellProductionProperties serializeObject();
|
||||
|
||||
bool hasProductionControl(ProducerCMode controlModeArg) const {
|
||||
return (m_productionControls & static_cast<int>(controlModeArg)) != 0;
|
||||
@@ -454,33 +436,7 @@ public:
|
||||
const UnitSystem& unit_system,
|
||||
double udq_undefined);
|
||||
|
||||
Well(const std::string& wname,
|
||||
const std::string& gname,
|
||||
std::size_t init_step,
|
||||
std::size_t insert_index,
|
||||
int headI,
|
||||
int headJ,
|
||||
double ref_depth,
|
||||
const WellType& wtype_arg,
|
||||
const UnitSystem& unit_system,
|
||||
double udq_undefined,
|
||||
Status status,
|
||||
double drainageRadius,
|
||||
bool allowCrossFlow,
|
||||
bool automaticShutIn,
|
||||
const WellGuideRate& guideRate,
|
||||
double efficiencyFactor,
|
||||
double solventFraction,
|
||||
bool prediction_mode,
|
||||
std::shared_ptr<WellEconProductionLimits> econLimits,
|
||||
std::shared_ptr<WellFoamProperties> foamProperties,
|
||||
std::shared_ptr<WellPolymerProperties> polymerProperties,
|
||||
std::shared_ptr<WellBrineProperties> brineProperties,
|
||||
std::shared_ptr<WellTracerProperties> tracerProperties,
|
||||
std::shared_ptr<WellConnections> connections,
|
||||
std::shared_ptr<WellProductionProperties> production,
|
||||
std::shared_ptr<WellInjectionProperties> injection,
|
||||
std::shared_ptr<WellSegments> segments);
|
||||
static Well serializeObject();
|
||||
|
||||
bool isMultiSegment() const;
|
||||
bool isAvailableForGroupControl() const;
|
||||
|
||||
@@ -28,10 +28,13 @@ class DeckRecord;
|
||||
struct WellBrineProperties
|
||||
{
|
||||
double m_saltConcentration = 0.0;
|
||||
|
||||
void handleWSALT(const DeckRecord& rec);
|
||||
bool operator!=(const WellBrineProperties& other) const;
|
||||
bool operator==(const WellBrineProperties& other) const;
|
||||
|
||||
static WellBrineProperties serializeObject();
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
|
||||
@@ -37,6 +37,8 @@ namespace Opm {
|
||||
WellConnections(Connection::Order ordering, int headI, int headJ,
|
||||
const std::vector<Connection>& connections);
|
||||
|
||||
static WellConnections serializeObject();
|
||||
|
||||
// cppcheck-suppress noExplicitConstructor
|
||||
WellConnections(const WellConnections& src, const EclipseGrid& grid);
|
||||
void addConnection(int i, int j , int k ,
|
||||
|
||||
@@ -55,17 +55,8 @@ namespace Opm {
|
||||
|
||||
explicit WellEconProductionLimits(const DeckRecord& record);
|
||||
WellEconProductionLimits();
|
||||
WellEconProductionLimits(double minOilRate, double minGasRate,
|
||||
double maxWaterCut, double maxGasOilRatio,
|
||||
double maxWaterGasRatio,
|
||||
EconWorkover workover, bool endRun,
|
||||
const std::string& followonWell,
|
||||
QuantityLimit quantityLimit,
|
||||
double secondaryMaxWaterCut,
|
||||
EconWorkover workoverSecondary,
|
||||
double maxGasLiquidRatio,
|
||||
double minLiquidRate, double maxTemperature,
|
||||
double minReservoirFluidRate);
|
||||
|
||||
static WellEconProductionLimits serializeObject();
|
||||
|
||||
// TODO: not handling things related to m_secondary_max_water_cut
|
||||
// for the moment.
|
||||
|
||||
@@ -27,6 +27,8 @@ class DeckRecord;
|
||||
|
||||
struct WellFoamProperties
|
||||
{
|
||||
static WellFoamProperties serializeObject();
|
||||
|
||||
double m_foamConcentration = 0.0;
|
||||
void handleWFOAM(const DeckRecord& rec);
|
||||
bool operator==(const WellFoamProperties& other) const;
|
||||
|
||||
@@ -26,21 +26,16 @@ namespace Opm {
|
||||
class DeckRecord;
|
||||
|
||||
struct WellPolymerProperties {
|
||||
double m_polymerConcentration;
|
||||
double m_saltConcentration;
|
||||
int m_plymwinjtable;
|
||||
int m_skprwattable;
|
||||
int m_skprpolytable;
|
||||
double m_polymerConcentration = 0.0;
|
||||
double m_saltConcentration = 0.0;
|
||||
int m_plymwinjtable = -1;
|
||||
int m_skprwattable = -1;
|
||||
int m_skprpolytable = -1;
|
||||
|
||||
WellPolymerProperties(double polymerConcentration,
|
||||
double saltConcentration,
|
||||
int plymwinjtable,
|
||||
int skprwattable,
|
||||
int skprpolytable);
|
||||
static WellPolymerProperties serializeObject();
|
||||
|
||||
bool operator==(const WellPolymerProperties& other) const;
|
||||
bool operator!=(const WellPolymerProperties& other) const;
|
||||
WellPolymerProperties();
|
||||
void handleWPOLYMER(const DeckRecord& record);
|
||||
void handleWPMITAB(const DeckRecord& record);
|
||||
void handleWSKPTAB(const DeckRecord& record);
|
||||
|
||||
@@ -68,7 +68,8 @@ public:
|
||||
};
|
||||
|
||||
WellTestConfig();
|
||||
WellTestConfig(const std::vector<WTESTWell>& well);
|
||||
|
||||
static WellTestConfig serializeObject();
|
||||
|
||||
void add_well(const std::string& well, Reason reason, double test_interval, int num_test, double startup_time, int current_step);
|
||||
void add_well(const std::string& well, const std::string& reasons, double test_interval,
|
||||
|
||||
@@ -28,9 +28,7 @@ namespace Opm {
|
||||
class WellTracerProperties {
|
||||
|
||||
public:
|
||||
using ConcentrationMap = std::map<std::string,double>;
|
||||
WellTracerProperties();
|
||||
WellTracerProperties(const std::map<std::string,double>& concentrations);
|
||||
static WellTracerProperties serializeObject();
|
||||
|
||||
void setConcentration(const std::string& name, const double& concentration);
|
||||
double getConcentration(const std::string& name) const;
|
||||
@@ -45,7 +43,7 @@ namespace Opm {
|
||||
}
|
||||
|
||||
private:
|
||||
ConcentrationMap m_tracerConcentrations;
|
||||
std::map<std::string,double> m_tracerConcentrations;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -58,16 +58,11 @@ public:
|
||||
BCComponent component;
|
||||
double rate;
|
||||
|
||||
|
||||
BCFace() = default;
|
||||
BCFace(const DeckRecord& record);
|
||||
BCFace(std::size_t i1_arg, std::size_t i2_arg,
|
||||
std::size_t j1_arg, std::size_t j2_arg,
|
||||
std::size_t k1_arg, std::size_t k2_arg,
|
||||
BCType type_arg,
|
||||
FaceDir::DirEnum dir_arg,
|
||||
BCComponent comp_arg,
|
||||
double rate_arg);
|
||||
|
||||
static BCFace serializeObject();
|
||||
|
||||
bool operator==(const BCFace& other) const;
|
||||
|
||||
template<class Serializer>
|
||||
@@ -88,9 +83,10 @@ public:
|
||||
|
||||
|
||||
BCConfig() = default;
|
||||
explicit BCConfig(const std::vector<BCFace>& input_faces);
|
||||
explicit BCConfig(const Deck& deck);
|
||||
const std::vector<BCConfig::BCFace>& faces() const;
|
||||
|
||||
static BCConfig serializeObject();
|
||||
|
||||
std::size_t size() const;
|
||||
std::vector<BCFace>::const_iterator begin() const;
|
||||
std::vector<BCFace>::const_iterator end() const;
|
||||
|
||||
@@ -61,7 +61,8 @@ struct RockComp {
|
||||
|
||||
RockConfig() = default;
|
||||
RockConfig(const Deck& deck, const FieldPropsManager& fp);
|
||||
RockConfig(bool active, const std::vector<RockComp>& comp, const std::string& num_prop, std::size_t num_rock_tables, bool water_compaction, Hysteresis hyst);
|
||||
|
||||
static RockConfig serializeObject();
|
||||
|
||||
bool active() const;
|
||||
const std::vector<RockConfig::RockComp>& comp() const;
|
||||
|
||||
@@ -37,10 +37,8 @@ namespace Opm {
|
||||
SimulationConfig(bool restart,
|
||||
const Deck& deck,
|
||||
const FieldPropsManager& fp);
|
||||
SimulationConfig(const ThresholdPressure& thresholdPressure,
|
||||
const BCConfig& bc,
|
||||
const RockConfig& rock_config,
|
||||
bool useCPR, bool DISGAS, bool VAPOIL, bool isThermal);
|
||||
|
||||
static SimulationConfig serializeObject();
|
||||
|
||||
const RockConfig& rock_config() const;
|
||||
const ThresholdPressure& getThresholdPressure() const;
|
||||
|
||||
@@ -39,12 +39,11 @@ namespace Opm {
|
||||
const Deck& deck,
|
||||
const FieldPropsManager& fp);
|
||||
|
||||
ThresholdPressure(bool active, bool restart,
|
||||
const ThresholdPressureTable& thpTable,
|
||||
const PressureTable& pTable);
|
||||
|
||||
ThresholdPressure() { m_active = m_restart = false; }
|
||||
|
||||
//! \brief Returns an instance for serialization tests.
|
||||
static ThresholdPressure serializeObject();
|
||||
|
||||
/*
|
||||
The hasRegionBarrier() method checks if a threshold pressure
|
||||
has been configured between the equilibration regions r1 and
|
||||
|
||||
@@ -53,6 +53,8 @@ namespace Opm {
|
||||
SummaryConfigNode() = default;
|
||||
explicit SummaryConfigNode(std::string keyword, const Category cat, Location loc_arg);
|
||||
|
||||
static SummaryConfigNode serializeObject();
|
||||
|
||||
SummaryConfigNode& parameterType(const Type type);
|
||||
SummaryConfigNode& namedEntity(std::string name);
|
||||
SummaryConfigNode& number(const int num);
|
||||
@@ -150,6 +152,7 @@ namespace Opm {
|
||||
const std::set<std::string>& shortKwds,
|
||||
const std::set<std::string>& smryKwds);
|
||||
|
||||
static SummaryConfig serializeObject();
|
||||
|
||||
const_iterator begin() const;
|
||||
const_iterator end() const;
|
||||
|
||||
@@ -46,19 +46,6 @@ namespace Opm {
|
||||
|
||||
{ }
|
||||
|
||||
Aqudims(size_t mxnaqn, size_t mxnaqc, size_t niftbl, size_t nriftb,
|
||||
size_t nanaqu, size_t ncamax, size_t mxnali, size_t mxaaql) :
|
||||
m_mxnaqn(mxnaqn),
|
||||
m_mxnaqc(mxnaqc),
|
||||
m_niftbl(niftbl),
|
||||
m_nriftb(nriftb),
|
||||
m_nanaqu(nanaqu),
|
||||
m_ncamax(ncamax),
|
||||
m_mxnali(mxnali),
|
||||
m_mxaaql(mxaaql)
|
||||
|
||||
{ }
|
||||
|
||||
explicit Aqudims(const Deck& deck) :
|
||||
Aqudims()
|
||||
{
|
||||
@@ -75,6 +62,21 @@ namespace Opm {
|
||||
}
|
||||
}
|
||||
|
||||
static Aqudims serializeObject()
|
||||
{
|
||||
Aqudims result;
|
||||
result.m_mxnaqn = 1;
|
||||
result.m_mxnaqc = 2;
|
||||
result.m_niftbl = 3;
|
||||
result.m_nriftb = 4;
|
||||
result.m_nanaqu = 5;
|
||||
result.m_ncamax = 6;
|
||||
result.m_mxnali = 7;
|
||||
result.m_mxaaql = 8;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
size_t getNumAqunum() const
|
||||
{
|
||||
return m_mxnaqn;
|
||||
|
||||
@@ -26,8 +26,7 @@ namespace Opm {
|
||||
|
||||
class BrineDensityTable {
|
||||
public:
|
||||
BrineDensityTable();
|
||||
BrineDensityTable(const std::vector<double>& tableValues);
|
||||
static BrineDensityTable serializeObject();
|
||||
|
||||
void init(const Opm::DeckRecord& record);
|
||||
const std::vector<double>& getBrineDensityColumn() const;
|
||||
|
||||
@@ -33,6 +33,9 @@ namespace Opm {
|
||||
ColumnSchema();
|
||||
ColumnSchema(const std::string& name , Table::ColumnOrderEnum order, Table::DefaultAction defaultAction);
|
||||
ColumnSchema(const std::string& name , Table::ColumnOrderEnum order, double defaultValue);
|
||||
|
||||
static ColumnSchema serializeObject();
|
||||
|
||||
const std::string& name() const;
|
||||
bool validOrder( double value1 , double value2) const;
|
||||
bool lookupValid( ) const;
|
||||
|
||||
@@ -51,9 +51,9 @@ namespace Opm {
|
||||
|
||||
DenT() = default;
|
||||
explicit DenT(const DeckKeyword& keyword);
|
||||
explicit DenT(const std::vector<DenT::entry>& records_arg);
|
||||
|
||||
const std::vector<DenT::entry>& records() const;
|
||||
static DenT serializeObject();
|
||||
|
||||
const entry& operator[](const std::size_t index) const;
|
||||
bool operator==(const DenT& other) const;
|
||||
std::size_t size() const;
|
||||
|
||||
@@ -48,6 +48,11 @@ namespace Opm {
|
||||
m_nstrvd( nstrvd )
|
||||
{ }
|
||||
|
||||
static Eqldims serializeObject()
|
||||
{
|
||||
return Eqldims(1, 2, 3, 4, 5);
|
||||
}
|
||||
|
||||
size_t getNumEquilRegions() const
|
||||
{
|
||||
return m_ntequl;
|
||||
|
||||
@@ -44,6 +44,11 @@ struct DENSITYRecord {
|
||||
|
||||
struct DensityTable : public FlatTable< DENSITYRecord > {
|
||||
using FlatTable< DENSITYRecord >::FlatTable;
|
||||
|
||||
static DensityTable serializeObject()
|
||||
{
|
||||
return DensityTable({{1.0, 2.0, 3.0}});
|
||||
}
|
||||
};
|
||||
|
||||
struct PVTWRecord {
|
||||
@@ -76,6 +81,11 @@ struct PVTWRecord {
|
||||
|
||||
struct PvtwTable : public FlatTable< PVTWRecord > {
|
||||
using FlatTable< PVTWRecord >::FlatTable;
|
||||
|
||||
static PvtwTable serializeObject()
|
||||
{
|
||||
return PvtwTable({{1.0, 2.0, 3.0, 4.0, 5.0}});
|
||||
}
|
||||
};
|
||||
|
||||
struct ROCKRecord {
|
||||
@@ -99,6 +109,11 @@ struct ROCKRecord {
|
||||
|
||||
struct RockTable : public FlatTable< ROCKRecord > {
|
||||
using FlatTable< ROCKRecord >::FlatTable;
|
||||
|
||||
static RockTable serializeObject()
|
||||
{
|
||||
return RockTable({{1.0, 2.0}});
|
||||
}
|
||||
};
|
||||
|
||||
struct PVCDORecord {
|
||||
@@ -131,6 +146,11 @@ struct PVCDORecord {
|
||||
|
||||
struct PvcdoTable : public FlatTable< PVCDORecord > {
|
||||
using FlatTable< PVCDORecord >::FlatTable;
|
||||
|
||||
static PvcdoTable serializeObject()
|
||||
{
|
||||
return PvcdoTable({{1.0, 2.0, 3.0, 4.0, 5.0}});
|
||||
}
|
||||
};
|
||||
|
||||
struct PlmixparRecord {
|
||||
@@ -151,6 +171,11 @@ struct PlmixparRecord {
|
||||
|
||||
struct PlmixparTable : public FlatTable< PlmixparRecord> {
|
||||
using FlatTable< PlmixparRecord >::FlatTable;
|
||||
|
||||
static PlmixparTable serializeObject()
|
||||
{
|
||||
return PlmixparTable({PlmixparRecord{1.0}});
|
||||
}
|
||||
};
|
||||
|
||||
struct PlyvmhRecord {
|
||||
@@ -180,6 +205,11 @@ struct PlyvmhRecord {
|
||||
|
||||
struct PlyvmhTable : public FlatTable<PlyvmhRecord> {
|
||||
using FlatTable< PlyvmhRecord >::FlatTable;
|
||||
|
||||
static PlyvmhTable serializeObject()
|
||||
{
|
||||
return PlyvmhTable({{1.0, 2.0, 3.0, 4.0}});
|
||||
}
|
||||
};
|
||||
|
||||
struct ShrateRecord {
|
||||
@@ -200,6 +230,11 @@ struct ShrateRecord {
|
||||
|
||||
struct ShrateTable : public FlatTable<ShrateRecord> {
|
||||
using FlatTable< ShrateRecord >::FlatTable;
|
||||
|
||||
static ShrateTable serializeObject()
|
||||
{
|
||||
return ShrateTable({ShrateRecord{1.0}});
|
||||
}
|
||||
};
|
||||
|
||||
struct Stone1exRecord {
|
||||
@@ -220,6 +255,11 @@ struct Stone1exRecord {
|
||||
|
||||
struct Stone1exTable : public FlatTable<Stone1exRecord> {
|
||||
using FlatTable< Stone1exRecord >::FlatTable;
|
||||
|
||||
static Stone1exTable serializeObject()
|
||||
{
|
||||
return Stone1exTable({Stone1exRecord{1.0}});
|
||||
}
|
||||
};
|
||||
|
||||
struct TlmixparRecord {
|
||||
@@ -243,6 +283,11 @@ struct TlmixparRecord {
|
||||
|
||||
struct TlmixparTable : public FlatTable< TlmixparRecord> {
|
||||
using FlatTable< TlmixparRecord >::FlatTable;
|
||||
|
||||
static TlmixparTable serializeObject()
|
||||
{
|
||||
return TlmixparTable({{1.0, 2.0}});
|
||||
}
|
||||
};
|
||||
|
||||
struct VISCREFRecord {
|
||||
@@ -266,6 +311,11 @@ struct VISCREFRecord {
|
||||
|
||||
struct ViscrefTable : public FlatTable< VISCREFRecord > {
|
||||
using FlatTable< VISCREFRecord >::FlatTable;
|
||||
|
||||
static ViscrefTable serializeObject()
|
||||
{
|
||||
return ViscrefTable({{1.0, 2.0}});
|
||||
}
|
||||
};
|
||||
|
||||
struct WATDENTRecord {
|
||||
@@ -292,6 +342,11 @@ struct WATDENTRecord {
|
||||
|
||||
struct WatdentTable : public FlatTable< WATDENTRecord > {
|
||||
using FlatTable< WATDENTRecord >::FlatTable;
|
||||
|
||||
static WatdentTable serializeObject()
|
||||
{
|
||||
return WatdentTable({{1.0, 2.0, 3.0}});
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -34,8 +34,8 @@ public:
|
||||
|
||||
JFunc();
|
||||
explicit JFunc(const Deck& deck);
|
||||
JFunc(Flag flag, double ow, double go,
|
||||
double alpha, double beta, Direction dir);
|
||||
|
||||
static JFunc serializeObject();
|
||||
|
||||
double alphaFactor() const;
|
||||
double betaFactor() const;
|
||||
|
||||
@@ -27,14 +27,11 @@ 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);
|
||||
|
||||
static PlymwinjTable serializeObject();
|
||||
|
||||
const std::vector<std::vector<double>>& getMoleWeights() const;
|
||||
bool operator==(const PlymwinjTable& data) const;
|
||||
};
|
||||
|
||||
@@ -34,14 +34,8 @@ namespace Opm {
|
||||
|
||||
PlyshlogTable() = default;
|
||||
PlyshlogTable(const DeckRecord& indexRecord, const DeckRecord& dataRecord);
|
||||
PlyshlogTable(const TableSchema& schema,
|
||||
const OrderedMap<std::string, TableColumn>& columns,
|
||||
bool jfunc,
|
||||
double refPolymerConcentration,
|
||||
double refSalinity,
|
||||
double refTemperature,
|
||||
bool hasRefSalinity,
|
||||
bool hasRefTemperature);
|
||||
|
||||
static PlyshlogTable serializeObject();
|
||||
|
||||
double getRefPolymerConcentration() const;
|
||||
double getRefSalinity() const;
|
||||
|
||||
@@ -43,12 +43,7 @@ namespace Opm {
|
||||
|
||||
class PolyInjTable {
|
||||
public:
|
||||
|
||||
PolyInjTable() = default;
|
||||
PolyInjTable(const std::vector<double>& throughputs,
|
||||
const std::vector<double>& velocities,
|
||||
int tableNumber,
|
||||
const std::vector<std::vector<double>>& data);
|
||||
static PolyInjTable serializeObject();
|
||||
|
||||
int getTableNumber() const;
|
||||
|
||||
|
||||
@@ -29,12 +29,8 @@ namespace Opm {
|
||||
public:
|
||||
PvtgTable() = default;
|
||||
PvtgTable( const DeckKeyword& keyword, size_t tableIdx);
|
||||
PvtgTable(const ColumnSchema& outer_schema,
|
||||
const TableColumn& outer_column,
|
||||
const TableSchema& undersat_schema,
|
||||
const TableSchema& sat_schema,
|
||||
const std::vector<SimpleTable>& undersat_tables,
|
||||
const SimpleTable& sat_table);
|
||||
|
||||
static PvtgTable serializeObject();
|
||||
|
||||
bool operator==(const PvtgTable& data) const;
|
||||
};
|
||||
|
||||
@@ -29,12 +29,8 @@ namespace Opm {
|
||||
public:
|
||||
PvtoTable() = default;
|
||||
PvtoTable(const DeckKeyword& keyword, size_t tableIdx);
|
||||
PvtoTable(const ColumnSchema& outer_schema,
|
||||
const TableColumn& outer_column,
|
||||
const TableSchema& undersat_schema,
|
||||
const TableSchema& sat_schema,
|
||||
const std::vector<SimpleTable>& undersat_tables,
|
||||
const SimpleTable& sat_table);
|
||||
|
||||
static PvtoTable serializeObject();
|
||||
|
||||
bool operator==(const PvtoTable& data) const;
|
||||
};
|
||||
|
||||
@@ -28,9 +28,8 @@ namespace Opm {
|
||||
class PvtwsaltTable {
|
||||
public:
|
||||
PvtwsaltTable();
|
||||
PvtwsaltTable(double refPressValue,
|
||||
double refSaltConValue,
|
||||
const std::vector<double>& tableValues);
|
||||
|
||||
static PvtwsaltTable serializeObject();
|
||||
|
||||
void init(const Opm::DeckRecord& record0, const Opm::DeckRecord& record1);
|
||||
size_t size() const;
|
||||
|
||||
@@ -113,14 +113,10 @@ The first row actually corresponds to saturated values.
|
||||
static std::vector<std::pair<size_t , size_t> > recordRanges( const DeckKeyword& keyword);
|
||||
|
||||
PvtxTable() = default;
|
||||
PvtxTable(const ColumnSchema& outer_schema,
|
||||
const TableColumn& outer_column,
|
||||
const TableSchema& undersat_schema,
|
||||
const TableSchema& sat_schema,
|
||||
const std::vector<SimpleTable>& undersat_tables,
|
||||
const SimpleTable& sat_table);
|
||||
|
||||
explicit PvtxTable(const std::string& columnName);
|
||||
|
||||
static PvtxTable serializeObject();
|
||||
|
||||
const SimpleTable& getUnderSaturatedTable(size_t tableNumber) const;
|
||||
void init(const DeckKeyword& keyword, size_t tableIdx);
|
||||
size_t size() const;
|
||||
|
||||
@@ -47,6 +47,12 @@ namespace Opm {
|
||||
m_NPLMIX( nplmix )
|
||||
{}
|
||||
|
||||
static Regdims serializeObject()
|
||||
{
|
||||
return Regdims(1, 2, 3, 4, 5);
|
||||
}
|
||||
|
||||
|
||||
size_t getNTFIP() const {
|
||||
return m_NTFIP;
|
||||
}
|
||||
|
||||
@@ -28,8 +28,9 @@ namespace Opm {
|
||||
class Rock2dTable {
|
||||
public:
|
||||
Rock2dTable();
|
||||
Rock2dTable(const std::vector<std::vector<double>>& pvmultValues,
|
||||
const std::vector<double>& pressureValues);
|
||||
|
||||
static Rock2dTable serializeObject();
|
||||
|
||||
void init(const Opm::DeckRecord& record, size_t tableIdx);
|
||||
size_t size() const;
|
||||
size_t sizeMultValues() const;
|
||||
|
||||
@@ -28,8 +28,9 @@ namespace Opm {
|
||||
class Rock2dtrTable {
|
||||
public:
|
||||
Rock2dtrTable();
|
||||
Rock2dtrTable(const std::vector<std::vector<double>>& transMultValues,
|
||||
const std::vector<double>& pressureValues);
|
||||
|
||||
static Rock2dtrTable serializeObject();
|
||||
|
||||
void init(const Opm::DeckRecord& record, size_t tableIdx);
|
||||
size_t size() const;
|
||||
size_t sizeMultValues() const;
|
||||
|
||||
@@ -31,9 +31,8 @@ namespace Opm {
|
||||
RocktabTable(const DeckItem& item,
|
||||
bool isDirectional,
|
||||
bool hasStressOption);
|
||||
RocktabTable(const TableSchema& schema,
|
||||
const OrderedMap<std::string, TableColumn>& columns,
|
||||
bool jfunc, bool isDirectional);
|
||||
|
||||
static RocktabTable serializeObject();
|
||||
|
||||
const TableColumn& getPressureColumn() const;
|
||||
const TableColumn& getPoreVolumeMultiplierColumn() const;
|
||||
|
||||
@@ -37,11 +37,10 @@ namespace Opm {
|
||||
public:
|
||||
SimpleTable() = default;
|
||||
SimpleTable(TableSchema, const DeckItem& deckItem);
|
||||
SimpleTable(const TableSchema& schema,
|
||||
const OrderedMap<std::string, TableColumn>& columns,
|
||||
bool jfunc);
|
||||
explicit SimpleTable( TableSchema );
|
||||
|
||||
static SimpleTable serializeObject();
|
||||
|
||||
void addColumns();
|
||||
void init(const DeckItem& deckItem );
|
||||
size_t numColumns() const;
|
||||
|
||||
@@ -27,15 +27,11 @@ namespace Opm {
|
||||
|
||||
class SkprpolyTable : public PolyInjTable {
|
||||
public:
|
||||
|
||||
SkprpolyTable() = default;
|
||||
SkprpolyTable(const std::vector<double>& throughputs,
|
||||
const std::vector<double>& velocities,
|
||||
int tableNumber,
|
||||
const std::vector<std::vector<double>>& data,
|
||||
double ref_polymer_concentration);
|
||||
explicit SkprpolyTable(const DeckKeyword& table);
|
||||
|
||||
static SkprpolyTable serializeObject();
|
||||
|
||||
double referenceConcentration() const;
|
||||
|
||||
const std::vector<std::vector<double>>& getSkinPressures() const;
|
||||
|
||||
@@ -27,15 +27,11 @@ namespace Opm {
|
||||
|
||||
class SkprwatTable : public PolyInjTable {
|
||||
public:
|
||||
|
||||
SkprwatTable() = default;
|
||||
SkprwatTable(const std::vector<double>& throughputs,
|
||||
const std::vector<double>& velocities,
|
||||
int tableNumber,
|
||||
const std::vector<std::vector<double>>& data);
|
||||
|
||||
explicit SkprwatTable(const DeckKeyword& table);
|
||||
|
||||
static SkprwatTable serializeObject();
|
||||
|
||||
const std::vector<std::vector<double>>& getSkinPressures() const;
|
||||
|
||||
bool operator==(const SkprwatTable& data) const;
|
||||
|
||||
@@ -25,8 +25,7 @@ namespace Opm {
|
||||
|
||||
class SolventDensityTable {
|
||||
public:
|
||||
SolventDensityTable();
|
||||
SolventDensityTable(const std::vector<double>& tableValues);
|
||||
static SolventDensityTable serializeObject();
|
||||
|
||||
void init(const Opm::DeckRecord& record);
|
||||
const std::vector<double>& getSolventDensityColumn() const;
|
||||
|
||||
@@ -23,10 +23,8 @@ namespace Opm {
|
||||
|
||||
struct StandardCond {
|
||||
StandardCond();
|
||||
StandardCond(double temp, double press)
|
||||
: temperature(temp)
|
||||
, pressure(press)
|
||||
{}
|
||||
|
||||
static StandardCond serializeObject();
|
||||
|
||||
bool operator==(const StandardCond& data) const {
|
||||
return temperature == data.temperature &&
|
||||
|
||||
@@ -63,12 +63,18 @@ namespace Opm {
|
||||
}
|
||||
}
|
||||
|
||||
Tabdims(size_t ntsfun, size_t ntpvt, size_t nssfun, size_t nppvt,
|
||||
size_t ntfip, size_t nrpvt) :
|
||||
m_ntsfun(ntsfun), m_ntpvt(ntpvt), m_nssfun(nssfun),
|
||||
m_nppvt(nppvt), m_ntfip(ntfip), m_nrpvt(nrpvt)
|
||||
{ }
|
||||
static Tabdims serializeObject()
|
||||
{
|
||||
Tabdims result;
|
||||
result.m_ntsfun = 1;
|
||||
result.m_ntpvt = 2;
|
||||
result.m_nssfun = 3;
|
||||
result.m_nppvt = 4;
|
||||
result.m_ntfip = 5;
|
||||
result.m_nrpvt = 6;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
size_t getNumSatTables() const {
|
||||
return m_ntsfun;
|
||||
|
||||
@@ -33,11 +33,9 @@ namespace Opm {
|
||||
public:
|
||||
TableColumn();
|
||||
explicit TableColumn( const ColumnSchema& schema );
|
||||
TableColumn(const ColumnSchema& schema,
|
||||
const std::string& name,
|
||||
const std::vector<double>& values,
|
||||
const std::vector<bool>& defaults,
|
||||
size_t defaultCount);
|
||||
|
||||
static TableColumn serializeObject();
|
||||
|
||||
size_t size( ) const;
|
||||
const std::string& name() const;
|
||||
void assertOrder(double value1 , double value2) const;
|
||||
|
||||
@@ -63,6 +63,9 @@ namespace Opm {
|
||||
|
||||
TableContainer();
|
||||
explicit TableContainer( size_t maxTables );
|
||||
|
||||
static TableContainer serializeObject();
|
||||
|
||||
bool empty() const;
|
||||
|
||||
/*
|
||||
|
||||
@@ -64,43 +64,8 @@ namespace Opm {
|
||||
public:
|
||||
explicit TableManager( const Deck& deck );
|
||||
TableManager() = default;
|
||||
TableManager(const std::map<std::string, TableContainer>& simpleTables,
|
||||
const std::vector<PvtgTable>& pvtgTables,
|
||||
const std::vector<PvtoTable>& pvtoTables,
|
||||
const std::vector<Rock2dTable>& rock2dTables,
|
||||
const std::vector<Rock2dtrTable>& rock2dtrTables,
|
||||
const PvtwTable& pvtwTable,
|
||||
const PvcdoTable& pvcdoTable,
|
||||
const DensityTable& densityTable,
|
||||
const PlyvmhTable& plyvmhTable,
|
||||
const RockTable& rockTable,
|
||||
const PlmixparTable& plmixparTable,
|
||||
const ShrateTable& shrateTable,
|
||||
const Stone1exTable& stone1exTable,
|
||||
const TlmixparTable& tlmixparTable,
|
||||
const ViscrefTable& viscrefTable,
|
||||
const WatdentTable& watdentTable,
|
||||
const std::vector<PvtwsaltTable>& pvtwsaltTables,
|
||||
const std::vector<BrineDensityTable>& bdensityTables,
|
||||
const std::vector<SolventDensityTable>& sdensityTables,
|
||||
const std::map<int, PlymwinjTable>& plymwinjTables,
|
||||
const std::map<int, SkprwatTable>& skprwatTables,
|
||||
const std::map<int, SkprpolyTable>& skprpolyTables,
|
||||
const Tabdims& tabdims,
|
||||
const Regdims& regdims,
|
||||
const Eqldims& eqldims,
|
||||
const Aqudims& aqudims,
|
||||
bool useImptvd,
|
||||
bool useEnptvd,
|
||||
bool useEqlnum,
|
||||
bool useShrate,
|
||||
std::shared_ptr<JFunc> jfunc_param,
|
||||
const DenT& oilDenT,
|
||||
const DenT& gasDenT,
|
||||
const DenT& watDenT,
|
||||
const StandardCond& stcond,
|
||||
std::size_t gas_comp_index,
|
||||
double rtemp);
|
||||
|
||||
static TableManager serializeObject();
|
||||
|
||||
TableManager& operator=(const TableManager& data);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user