Merge pull request #1799 from joakim-hove/halvor_opm_restart
Halvor opm restart
This commit is contained in:
@@ -38,9 +38,10 @@ namespace Opm {
|
|||||||
|
|
||||||
static EclipseConfig serializeObject();
|
static EclipseConfig serializeObject();
|
||||||
|
|
||||||
const InitConfig& init() const;
|
InitConfig& init();
|
||||||
IOConfig& io();
|
IOConfig& io();
|
||||||
const IOConfig& io() const;
|
const IOConfig& io() const;
|
||||||
|
const InitConfig& init() const;
|
||||||
const InitConfig& getInitConfig() const;
|
const InitConfig& getInitConfig() const;
|
||||||
|
|
||||||
bool operator==(const EclipseConfig& data) const;
|
bool operator==(const EclipseConfig& data) const;
|
||||||
|
|||||||
@@ -77,6 +77,8 @@ namespace Opm {
|
|||||||
IOConfig& getIOConfig();
|
IOConfig& getIOConfig();
|
||||||
|
|
||||||
const InitConfig& getInitConfig() const;
|
const InitConfig& getInitConfig() const;
|
||||||
|
InitConfig& getInitConfig();
|
||||||
|
|
||||||
const SimulationConfig& getSimulationConfig() const;
|
const SimulationConfig& getSimulationConfig() const;
|
||||||
virtual const EclipseGrid& getInputGrid() const;
|
virtual const EclipseGrid& getInputGrid() const;
|
||||||
|
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ namespace Opm {
|
|||||||
const std::string& getEclipseInputPath() const;
|
const std::string& getEclipseInputPath() const;
|
||||||
|
|
||||||
void overrideNOSIM(bool nosim);
|
void overrideNOSIM(bool nosim);
|
||||||
|
void consistentFileFlags();
|
||||||
|
|
||||||
std::string getRestartFileName(const std::string& restart_base, int report_step, bool output) const;
|
std::string getRestartFileName(const std::string& restart_base, int report_step, bool output) const;
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
void python::common::export_EclipseConfig(py::module& module)
|
void python::common::export_EclipseConfig(py::module& module)
|
||||||
{
|
{
|
||||||
py::class_< EclipseConfig >( module, "EclipseConfig" )
|
py::class_< EclipseConfig >( module, "EclipseConfig" )
|
||||||
.def( "init", &EclipseConfig::init, ref_internal);
|
.def( "init", py::overload_cast<>(&EclipseConfig::init, py::const_));
|
||||||
|
|
||||||
py::class_< SummaryConfig >( module, "SummaryConfig")
|
py::class_< SummaryConfig >( module, "SummaryConfig")
|
||||||
.def(py::init([](const Deck& deck, const EclipseState& state, const Schedule& schedule) {
|
.def(py::init([](const Deck& deck, const EclipseState& state, const Schedule& schedule) {
|
||||||
|
|||||||
@@ -50,14 +50,17 @@ namespace Opm {
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
InitConfig& EclipseConfig::init() {
|
||||||
const InitConfig& EclipseConfig::init() const {
|
return const_cast<InitConfig &>(this->m_initConfig);
|
||||||
return m_initConfig;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const InitConfig& EclipseConfig::init() const{
|
||||||
|
return m_initConfig;
|
||||||
|
}
|
||||||
|
|
||||||
// [[deprecated]] --- use init()
|
// [[deprecated]] --- use init()
|
||||||
const InitConfig& EclipseConfig::getInitConfig() const {
|
const InitConfig& EclipseConfig::getInitConfig() const{
|
||||||
return init();
|
return init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -129,6 +129,10 @@ namespace Opm {
|
|||||||
return m_eclipseConfig.getInitConfig();
|
return m_eclipseConfig.getInitConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// [[deprecated]] --- use cfg().init()
|
||||||
|
InitConfig& EclipseState::getInitConfig() {
|
||||||
|
return m_eclipseConfig.init();
|
||||||
|
}
|
||||||
/// [[deprecated]] --- use cfg()
|
/// [[deprecated]] --- use cfg()
|
||||||
const EclipseConfig& EclipseState::getEclipseConfig() const {
|
const EclipseConfig& EclipseState::getEclipseConfig() const {
|
||||||
return cfg();
|
return cfg();
|
||||||
|
|||||||
@@ -193,6 +193,11 @@ namespace Opm {
|
|||||||
return m_UNIFOUT;
|
return m_UNIFOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void IOConfig::consistentFileFlags(){
|
||||||
|
m_UNIFIN = getUNIFOUT();
|
||||||
|
m_FMTIN = getFMTOUT();
|
||||||
|
}
|
||||||
|
|
||||||
bool IOConfig::getFMTIN() const {
|
bool IOConfig::getFMTIN() const {
|
||||||
return m_FMTIN;
|
return m_FMTIN;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user