mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user