Move RestartConfig from EclipseState to Schedule
This commit is contained in:
@@ -24,34 +24,28 @@
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/IOConfig/RestartConfig.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class Deck;
|
||||
class ParseContext;
|
||||
class ErrorGuard;
|
||||
|
||||
class EclipseConfig
|
||||
{
|
||||
public:
|
||||
EclipseConfig() = default;
|
||||
EclipseConfig(const Deck& deck, const ParseContext& parseContext, ErrorGuard& errors);
|
||||
EclipseConfig(const InitConfig& initConfig,
|
||||
const RestartConfig& restartConfig);
|
||||
EclipseConfig(const Deck& deck);
|
||||
EclipseConfig(const InitConfig& initConfig, const IOConfig& io_conf);
|
||||
|
||||
const InitConfig& init() const;
|
||||
IOConfig& io();
|
||||
const IOConfig& io() const;
|
||||
const RestartConfig& restart() const;
|
||||
const InitConfig& getInitConfig() const;
|
||||
const RestartConfig& getRestartConfig() const;
|
||||
|
||||
bool operator==(const EclipseConfig& data) const;
|
||||
|
||||
private:
|
||||
InitConfig m_initConfig;
|
||||
RestartConfig m_restartConfig;
|
||||
IOConfig io_config;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include <opm/parser/eclipse/Parser/ErrorGuard.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Edit/EDITNNC.hpp>
|
||||
@@ -52,7 +51,6 @@ namespace Opm {
|
||||
class EclipseGrid;
|
||||
class InitConfig;
|
||||
class IOConfig;
|
||||
class ParseContext;
|
||||
class RestartConfig;
|
||||
class DeckSection;
|
||||
class SimulationConfig;
|
||||
@@ -68,9 +66,6 @@ namespace Opm {
|
||||
AllProperties = IntProperties | DoubleProperties
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
EclipseState(const Deck& deck , const ParseContext& parseContext, T&& errors);
|
||||
EclipseState(const Deck& deck , const ParseContext& parseContext, ErrorGuard& errors);
|
||||
EclipseState(const Deck& deck);
|
||||
|
||||
const IOConfig& getIOConfig() const;
|
||||
@@ -78,9 +73,6 @@ namespace Opm {
|
||||
|
||||
const InitConfig& getInitConfig() const;
|
||||
const SimulationConfig& getSimulationConfig() const;
|
||||
const RestartConfig& getRestartConfig() const;
|
||||
RestartConfig& getRestartConfig();
|
||||
|
||||
const EclipseGrid& getInputGrid() const;
|
||||
|
||||
const FaultCollection& getFaults() const;
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <vector>
|
||||
#include <set>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/DynamicState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp>
|
||||
|
||||
/*
|
||||
@@ -198,7 +199,6 @@ namespace Opm {
|
||||
class RUNSPECSection;
|
||||
class SCHEDULESection;
|
||||
class SOLUTIONSection;
|
||||
class TimeMap;
|
||||
class Schedule;
|
||||
class ParseContext;
|
||||
class ErrorGuard;
|
||||
@@ -319,13 +319,10 @@ namespace Opm {
|
||||
RestartConfig() = default;
|
||||
|
||||
template<typename T>
|
||||
RestartConfig( const Deck&, const ParseContext& parseContext, T&& errors );
|
||||
|
||||
RestartConfig( const Deck&, const ParseContext& parseContext, ErrorGuard& errors );
|
||||
RestartConfig( const Deck& );
|
||||
|
||||
RestartConfig(const IOConfig& io_config,
|
||||
const TimeMap& timeMap,
|
||||
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,
|
||||
@@ -336,8 +333,6 @@ namespace Opm {
|
||||
bool getWriteRestartFile(size_t timestep, bool log=true) const;
|
||||
const std::map< std::string, int >& getRestartKeywords( size_t timestep ) const;
|
||||
int getKeyword( const std::string& keyword, size_t timeStep) const;
|
||||
const IOConfig& ioConfig() const;
|
||||
IOConfig& ioConfig();
|
||||
|
||||
void overrideRestartWriteInterval(size_t interval);
|
||||
void handleSolutionSection(const SOLUTIONSection& solutionSection, const ParseContext& parseContext, ErrorGuard& errors);
|
||||
@@ -374,7 +369,6 @@ namespace Opm {
|
||||
void update( size_t step, const RestartSchedule& rs);
|
||||
static RestartSchedule rptsched( const DeckKeyword& );
|
||||
|
||||
IOConfig io_config;
|
||||
TimeMap m_timemap;
|
||||
int m_first_restart_step = 1;
|
||||
bool m_write_initial_RST_file = false;
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <memory>
|
||||
|
||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/IOConfig/RestartConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/DynamicState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/DynamicVector.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Events.hpp>
|
||||
@@ -177,6 +178,7 @@ namespace Opm
|
||||
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);
|
||||
|
||||
/*
|
||||
@@ -260,6 +262,8 @@ namespace Opm
|
||||
*/
|
||||
void filterConnections(const ActiveGridCells& grid);
|
||||
size_t size() const;
|
||||
const RestartConfig& restart() const;
|
||||
RestartConfig& restart();
|
||||
|
||||
void applyAction(size_t reportStep, const Action::ActionX& action, const Action::Result& result);
|
||||
int getNupcol(size_t reportStep) const;
|
||||
@@ -308,7 +312,7 @@ namespace Opm
|
||||
DynamicState<std::shared_ptr<Action::Actions>> m_actions;
|
||||
RFTConfig rft_config;
|
||||
DynamicState<int> m_nupcol;
|
||||
|
||||
RestartConfig restart_config;
|
||||
|
||||
std::map<std::string,Events> wellgroup_events;
|
||||
void load_rst(const RestartIO::RstState& rst, const UnitSystem& unit_system);
|
||||
|
||||
Reference in New Issue
Block a user