mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #931 from atgeirr/fix-deck-error
Do not assign to dereferenced null pointers.
This commit is contained in:
@@ -109,7 +109,7 @@ namespace Opm
|
||||
const RockCompressibility* rock_comp_props,
|
||||
std::shared_ptr<EclipseState> eclipse_state,
|
||||
BlackoilOutputWriter& output_writer,
|
||||
std::shared_ptr< const Deck > deck,
|
||||
const Deck& deck,
|
||||
NewtonIterationBlackoilInterface& linsolver,
|
||||
const double* gravity);
|
||||
|
||||
@@ -127,7 +127,7 @@ namespace Opm
|
||||
const WellState& well_state,
|
||||
DynamicListEconLimited& list_econ_limited) const;
|
||||
private:
|
||||
std::shared_ptr< const Deck > deck_;
|
||||
const Deck& deck_;
|
||||
const PolymerPropsAd& polymer_props_;
|
||||
|
||||
};
|
||||
|
||||
@@ -34,7 +34,7 @@ SimulatorFullyImplicitCompressiblePolymer(const parameter::ParameterGroup& param
|
||||
const RockCompressibility* rock_comp_props,
|
||||
std::shared_ptr<EclipseState> eclipse_state,
|
||||
BlackoilOutputWriter& output_writer,
|
||||
std::shared_ptr< const Deck > deck,
|
||||
const Deck& deck,
|
||||
NewtonIterationBlackoilInterface& linsolver,
|
||||
const double* gravity)
|
||||
: BaseType(param,
|
||||
@@ -82,7 +82,7 @@ handleAdditionalWellInflow(SimulatorTimer& timer,
|
||||
{
|
||||
// compute polymer inflow
|
||||
std::unique_ptr<PolymerInflowInterface> polymer_inflow_ptr;
|
||||
if (deck_->hasKeyword("WPOLYMER")) {
|
||||
if (deck_.hasKeyword("WPOLYMER")) {
|
||||
if (wells_manager.c_wells() == 0) {
|
||||
OPM_THROW(std::runtime_error, "Cannot control polymer injection via WPOLYMER without wells.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user