Changed calling convention for shared pointers.

Expect non-reference type shared pointers arguments instead of references
to shared pointer. This will make it clear to the caller that the called
function is making a copy of the pointer for its own use and not trying
to modify the original pointer of the caller.
This commit is contained in:
Håkon Hægland 2021-09-22 00:25:59 +02:00
parent 5ad65c70ee
commit 4c5245196b
29 changed files with 136 additions and 136 deletions

View File

@ -81,9 +81,9 @@ void EclGenericVanguard::setExternalErrorGuard(std::unique_ptr<ErrorGuard> error
externalErrorGuard_ = std::move(errorGuard);
}
void EclGenericVanguard::setExternalSchedule(std::shared_ptr<Schedule>& schedule)
void EclGenericVanguard::setExternalSchedule(std::shared_ptr<Schedule> schedule)
{
externalEclSchedule_ = schedule;
externalEclSchedule_ = std::move(schedule);
}
void EclGenericVanguard::setExternalSchedule(std::unique_ptr<Schedule> schedule)
@ -92,9 +92,9 @@ void EclGenericVanguard::setExternalSchedule(std::unique_ptr<Schedule> schedule)
}
void EclGenericVanguard::setExternalSummaryConfig(
std::shared_ptr<SummaryConfig>& summaryConfig)
std::shared_ptr<SummaryConfig> summaryConfig)
{
externalEclSummaryConfig_ = summaryConfig;
externalEclSummaryConfig_ = std::move(summaryConfig);
}
void EclGenericVanguard::setExternalSummaryConfig(
@ -103,9 +103,9 @@ void EclGenericVanguard::setExternalSummaryConfig(
externalEclSummaryConfig_ = std::move(summaryConfig);
}
void EclGenericVanguard::setExternalDeck(std::shared_ptr<Deck>& deck)
void EclGenericVanguard::setExternalDeck(std::shared_ptr<Deck> deck)
{
externalDeck_ = deck;
externalDeck_ = std::move(deck);
externalDeckSet_ = true;
}
@ -115,9 +115,9 @@ void EclGenericVanguard::setExternalDeck(std::unique_ptr<Deck> deck)
externalDeckSet_ = true;
}
void EclGenericVanguard::setExternalEclState(std::shared_ptr<EclipseState>& eclState)
void EclGenericVanguard::setExternalEclState(std::shared_ptr<EclipseState> eclState)
{
externalEclState_ = eclState;
externalEclState_ = std::move(eclState);
}
void EclGenericVanguard::setExternalEclState(std::unique_ptr<EclipseState> eclState)

View File

@ -128,14 +128,14 @@ public:
* management of these two objects, i.e., they are not allowed to be deleted as long
* as the simulator vanguard object is alive.
*/
static void setExternalDeck(std::shared_ptr<Deck>& deck);
static void setExternalDeck(std::shared_ptr<Deck> deck);
static void setExternalDeck(std::unique_ptr<Deck> deck);
/*!
* \brief Set the Opm::EclipseState object which ought to be used when the simulator
* vanguard is instantiated.
*/
static void setExternalEclState(std::shared_ptr<EclipseState>& eclState);
static void setExternalEclState(std::shared_ptr<EclipseState> eclState);
static void setExternalEclState(std::unique_ptr<EclipseState> eclState);
/*!
@ -144,7 +144,7 @@ public:
* The lifetime of this object is not managed by the vanguard, i.e., the object must
* stay valid until after the vanguard gets destroyed.
*/
static void setExternalSchedule(std::shared_ptr<Schedule>& schedule);
static void setExternalSchedule(std::shared_ptr<Schedule> schedule);
static void setExternalSchedule(std::unique_ptr<Schedule> schedule);
/*!
@ -153,7 +153,7 @@ public:
* The lifetime of this object is not managed by the vanguard, i.e., the object must
* stay valid until after the vanguard gets destroyed.
*/
static void setExternalSummaryConfig(std::shared_ptr<SummaryConfig>& summaryConfig);
static void setExternalSummaryConfig(std::shared_ptr<SummaryConfig> summaryConfig);
static void setExternalSummaryConfig(std::unique_ptr<SummaryConfig> summaryConfig);
static void setExternalUDQState(std::unique_ptr<UDQState> udqState);

View File

@ -30,11 +30,11 @@
namespace Opm {
void flowEbosBlackoilSetDeck(double setupTime, std::shared_ptr<Deck>& deck,
std::shared_ptr<EclipseState>& eclState,
std::shared_ptr<Schedule>& schedule,
void flowEbosBlackoilSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::unique_ptr<UDQState> udqState,
std::shared_ptr<SummaryConfig>& summaryConfig)
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;

View File

@ -29,11 +29,11 @@ class SummaryConfig;
class UDQState;
namespace Properties { namespace TTag { struct EclFlowProblem; } }
void flowEbosBlackoilSetDeck(double setupTime, std::shared_ptr<Deck>& deck,
std::shared_ptr<EclipseState>& eclState,
std::shared_ptr<Schedule>& schedule,
void flowEbosBlackoilSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::unique_ptr<UDQState> udqState,
std::shared_ptr<SummaryConfig>& summaryConfig);
std::shared_ptr<SummaryConfig> summaryConfig);
int flowEbosBlackoilMain(int argc, char** argv, bool outputCout, bool outputFiles);

View File

@ -43,10 +43,10 @@ struct EnableBrine<TypeTag, TTag::EclFlowBrineProblem> {
}}
namespace Opm {
void flowEbosBrineSetDeck(double setupTime, std::shared_ptr<Deck>& deck,
std::shared_ptr<EclipseState>& eclState,
std::shared_ptr<Schedule>& schedule,
std::shared_ptr<SummaryConfig>& summaryConfig)
void flowEbosBrineSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowBrineProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;

View File

@ -26,10 +26,10 @@ class EclipseState;
class Schedule;
class SummaryConfig;
void flowEbosBrineSetDeck(double setupTime, std::shared_ptr<Deck>& deck,
std::shared_ptr<EclipseState>& eclState,
std::shared_ptr<Schedule>& schedule,
std::shared_ptr<SummaryConfig>& summaryConfig);
void flowEbosBrineSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
int flowEbosBrineMain(int argc, char** argv, bool outputCout, bool outputFiles);
}

View File

@ -43,10 +43,10 @@ struct EnableEnergy<TypeTag, TTag::EclFlowEnergyProblem> {
}}
namespace Opm {
void flowEbosEnergySetDeck(double setupTime, std::shared_ptr<Deck>& deck,
std::shared_ptr<EclipseState>& eclState,
std::shared_ptr<Schedule>& schedule,
std::shared_ptr<SummaryConfig>& summaryConfig)
void flowEbosEnergySetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowEnergyProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;

View File

@ -26,10 +26,10 @@ class EclipseState;
class Schedule;
class SummaryConfig;
void flowEbosEnergySetDeck(double setupTime, std::shared_ptr<Deck>& deck,
std::shared_ptr<EclipseState>& eclState,
std::shared_ptr<Schedule>& schedule,
std::shared_ptr<SummaryConfig>& summaryConfig);
void flowEbosEnergySetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
int flowEbosEnergyMain(int argc, char** argv, bool outputCout, bool outputFiles);
}

View File

@ -43,10 +43,10 @@ struct EnableExtbo<TypeTag, TTag::EclFlowExtboProblem> {
}}
namespace Opm {
void flowEbosExtboSetDeck(double setupTime, std::shared_ptr<Deck>& deck,
std::shared_ptr<EclipseState>& eclState,
std::shared_ptr<Schedule>& schedule,
std::shared_ptr<SummaryConfig>& summaryConfig)
void flowEbosExtboSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowExtboProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;

View File

@ -26,10 +26,10 @@ class EclipseState;
class Schedule;
class SummaryConfig;
void flowEbosExtboSetDeck(double setupTime, std::shared_ptr<Deck>& deck,
std::shared_ptr<EclipseState>& eclState,
std::shared_ptr<Schedule>& schedule,
std::shared_ptr<SummaryConfig>& summaryConfig);
void flowEbosExtboSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
int flowEbosExtboMain(int argc, char** argv, bool outputCout, bool outputFiles);
}

View File

@ -43,10 +43,10 @@ struct EnableFoam<TypeTag, TTag::EclFlowFoamProblem> {
}}
namespace Opm {
void flowEbosFoamSetDeck(double setupTime, std::shared_ptr<Deck>& deck,
std::shared_ptr<EclipseState>& eclState,
std::shared_ptr<Schedule>& schedule,
std::shared_ptr<SummaryConfig>& summaryConfig)
void flowEbosFoamSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowFoamProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;

View File

@ -26,10 +26,10 @@ class EclipseState;
class Schedule;
class SummaryConfig;
void flowEbosFoamSetDeck(double setupTime, std::shared_ptr<Deck>& deck,
std::shared_ptr<EclipseState>& eclState,
std::shared_ptr<Schedule>& schedule,
std::shared_ptr<SummaryConfig>& summaryConfig);
void flowEbosFoamSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
int flowEbosFoamMain(int argc, char** argv, bool outputCout, bool outputFiles);
}

View File

@ -63,10 +63,10 @@ public:
}}
namespace Opm {
void flowEbosGasOilSetDeck(double setupTime, std::shared_ptr<Deck>& deck,
std::shared_ptr<EclipseState>& eclState,
std::shared_ptr<Schedule>& schedule,
std::shared_ptr<SummaryConfig>& summaryConfig)
void flowEbosGasOilSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowGasOilProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;

View File

@ -26,10 +26,10 @@ class EclipseState;
class Schedule;
class SummaryConfig;
void flowEbosGasOilSetDeck(double setupTime, std::shared_ptr<Deck>& deck,
std::shared_ptr<EclipseState>& eclState,
std::shared_ptr<Schedule>& schedule,
std::shared_ptr<SummaryConfig>& summaryConfig);
void flowEbosGasOilSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
int flowEbosGasOilMain(int argc, char** argv, bool outputCout, bool outputFiles);
}

View File

@ -66,10 +66,10 @@ public:
}}
namespace Opm {
void flowEbosGasWaterSetDeck(double setupTime, std::shared_ptr<Deck>& deck,
std::shared_ptr<EclipseState>& eclState,
std::shared_ptr<Schedule>& schedule,
std::shared_ptr<SummaryConfig>& summaryConfig)
void flowEbosGasWaterSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowGasWaterProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;

View File

@ -26,10 +26,10 @@ class EclipseState;
class Schedule;
class SummaryConfig;
void flowEbosGasWaterSetDeck(double setupTime, std::shared_ptr<Deck>& deck,
std::shared_ptr<EclipseState>& eclState,
std::shared_ptr<Schedule>& schedule,
std::shared_ptr<SummaryConfig>& summaryConfig);
void flowEbosGasWaterSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
int flowEbosGasWaterMain(int argc, char** argv, bool outputCout, bool outputFiles);
}

View File

@ -63,10 +63,10 @@ public:
}}
namespace Opm {
void flowEbosOilWaterSetDeck(double setupTime, std::shared_ptr<Deck>& deck,
std::shared_ptr<EclipseState>& eclState,
std::shared_ptr<Schedule>& schedule,
std::shared_ptr<SummaryConfig>& summaryConfig)
void flowEbosOilWaterSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowOilWaterProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;

View File

@ -26,10 +26,10 @@ class EclipseState;
class Schedule;
class SummaryConfig;
void flowEbosOilWaterSetDeck(double setupTime, std::shared_ptr<Deck>& deck,
std::shared_ptr<EclipseState>& eclState,
std::shared_ptr<Schedule>& schedule,
std::shared_ptr<SummaryConfig>& summaryConfig);
void flowEbosOilWaterSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
int flowEbosOilWaterMain(int argc, char** argv, bool outputCout, bool outputFiles);
}

View File

@ -66,10 +66,10 @@ public:
}}
namespace Opm {
void flowEbosOilWaterBrineSetDeck(double setupTime, std::shared_ptr<Deck>& deck,
std::shared_ptr<EclipseState>& eclState,
std::shared_ptr<Schedule>& schedule,
std::shared_ptr<SummaryConfig>& summaryConfig)
void flowEbosOilWaterBrineSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowOilWaterBrineProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;

View File

@ -26,10 +26,10 @@ class EclipseState;
class Schedule;
class SummaryConfig;
void flowEbosOilWaterBrineSetDeck(double setupTime, std::shared_ptr<Deck>& deck,
std::shared_ptr<EclipseState>& eclState,
std::shared_ptr<Schedule>& schedule,
std::shared_ptr<SummaryConfig>& summaryConfig);
void flowEbosOilWaterBrineSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
int flowEbosOilWaterBrineMain(int argc, char** argv, bool outputCout, bool outputFiles);
}

View File

@ -66,10 +66,10 @@ public:
}}
namespace Opm {
void flowEbosOilWaterPolymerSetDeck(double setupTime, std::shared_ptr<Deck>& deck,
std::shared_ptr<EclipseState>& eclState,
std::shared_ptr<Schedule>& schedule,
std::shared_ptr<SummaryConfig>& summaryConfig)
void flowEbosOilWaterPolymerSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowOilWaterPolymerProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;

View File

@ -26,10 +26,10 @@ class EclipseState;
class Schedule;
class SummaryConfig;
void flowEbosOilWaterPolymerSetDeck(double setupTime, std::shared_ptr<Deck>& deck,
std::shared_ptr<EclipseState>& eclState,
std::shared_ptr<Schedule>& schedule,
std::shared_ptr<SummaryConfig>& summaryConfig);
void flowEbosOilWaterPolymerSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
int flowEbosOilWaterPolymerMain(int argc, char** argv, bool outputCout, bool outputFiles);
}

View File

@ -43,10 +43,10 @@ struct EnablePolymer<TypeTag, TTag::EclFlowPolymerProblem> {
}}
namespace Opm {
void flowEbosPolymerSetDeck(double setupTime, std::shared_ptr<Deck>& deck,
std::shared_ptr<EclipseState>& eclState,
std::shared_ptr<Schedule>& schedule,
std::shared_ptr<SummaryConfig>& summaryConfig)
void flowEbosPolymerSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowPolymerProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;

View File

@ -26,10 +26,10 @@ class EclipseState;
class Schedule;
class SummaryConfig;
void flowEbosPolymerSetDeck(double setupTime, std::shared_ptr<Deck>& deck,
std::shared_ptr<EclipseState>& eclState,
std::shared_ptr<Schedule>& schedule,
std::shared_ptr<SummaryConfig>& summaryConfig);
void flowEbosPolymerSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
int flowEbosPolymerMain(int argc, char** argv, bool outputCout, bool outputFiles);
}

View File

@ -43,10 +43,10 @@ struct EnableSolvent<TypeTag, TTag::EclFlowSolventProblem> {
}}
namespace Opm {
void flowEbosSolventSetDeck(double setupTime, std::shared_ptr<Deck>& deck,
std::shared_ptr<EclipseState>& eclState,
std::shared_ptr<Schedule>& schedule,
std::shared_ptr<SummaryConfig>& summaryConfig)
void flowEbosSolventSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowSolventProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;

View File

@ -26,10 +26,10 @@ class EclipseState;
class Schedule;
class SummaryConfig;
void flowEbosSolventSetDeck(double setupTime, std::shared_ptr<Deck>& deck,
std::shared_ptr<EclipseState>& eclState,
std::shared_ptr<Schedule>& schedule,
std::shared_ptr<SummaryConfig>& summaryConfig);
void flowEbosSolventSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
int flowEbosSolventMain(int argc, char** argv, bool outoutCout, bool outputFiles);
}

View File

@ -82,9 +82,9 @@ struct FlowEarlyBird {
namespace Opm {
template <class TypeTag>
void flowEbosSetDeck(std::shared_ptr<Deck>& deck,
std::shared_ptr<EclipseState>& eclState,
std::shared_ptr<Schedule>& schedule,
void flowEbosSetDeck(std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;
@ -136,16 +136,16 @@ namespace Opm
// This constructor can be called from Python when Python has already
// parsed a deck
Main(
std::shared_ptr<Deck>& deck,
std::shared_ptr<EclipseState>& eclipseState,
std::shared_ptr<Schedule>& schedule,
std::shared_ptr<SummaryConfig>& summaryConfig)
: deck_{deck}
, eclipseState_{eclipseState}
, schedule_{schedule}
, summaryConfig_{summaryConfig}
std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclipseState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
: deck_{std::move(deck)}
, eclipseState_{std::move(eclipseState)}
, schedule_{std::move(schedule)}
, summaryConfig_{std::move(summaryConfig)}
{
setArgvArgc_(deck->getDataFile());
setArgvArgc_(deck_->getDataFile());
initMPI();
}

View File

@ -40,10 +40,10 @@ private:
public:
PyBlackOilSimulator( const std::string& deckFilename);
PyBlackOilSimulator(
std::shared_ptr<Opm::Deck>& deck,
std::shared_ptr<Opm::EclipseState>& state,
std::shared_ptr<Opm::Schedule>& schedule,
std::shared_ptr<Opm::SummaryConfig>& summary_config);
std::shared_ptr<Opm::Deck> deck,
std::shared_ptr<Opm::EclipseState> state,
std::shared_ptr<Opm::Schedule> schedule,
std::shared_ptr<Opm::SummaryConfig> summary_config);
py::array_t<double> getPorosity();
int run();
void setPorosity(

View File

@ -40,15 +40,15 @@ PyBlackOilSimulator::PyBlackOilSimulator( const std::string &deckFilename)
}
PyBlackOilSimulator::PyBlackOilSimulator(
std::shared_ptr<Opm::Deck>& deck,
std::shared_ptr<Opm::EclipseState>& state,
std::shared_ptr<Opm::Schedule>& schedule,
std::shared_ptr<Opm::SummaryConfig>& summary_config
std::shared_ptr<Opm::Deck> deck,
std::shared_ptr<Opm::EclipseState> state,
std::shared_ptr<Opm::Schedule> schedule,
std::shared_ptr<Opm::SummaryConfig> summary_config
)
: deck_{deck}
, eclipse_state_{state}
, schedule_{schedule}
, summary_config_{summary_config}
: deck_{std::move(deck)}
, eclipse_state_{std::move(state)}
, schedule_{std::move(schedule)}
, summary_config_{std::move(summary_config)}
{
}
@ -145,10 +145,10 @@ void export_PyBlackOilSimulator(py::module& m)
py::class_<PyBlackOilSimulator>(m, "BlackOilSimulator")
.def(py::init< const std::string& >())
.def(py::init<
std::shared_ptr<Opm::Deck>&,
std::shared_ptr<Opm::EclipseState>&,
std::shared_ptr<Opm::Schedule>&,
std::shared_ptr<Opm::SummaryConfig>& >())
std::shared_ptr<Opm::Deck>,
std::shared_ptr<Opm::EclipseState>,
std::shared_ptr<Opm::Schedule>,
std::shared_ptr<Opm::SummaryConfig> >())
.def("get_porosity", &PyBlackOilSimulator::getPorosity,
py::return_value_policy::copy)
.def("run", &PyBlackOilSimulator::run)