mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Fix null-pointer dereference during well construction
The three-argument WellsManager constructor needs access to the real permeability field lest a null-pointer dereference result when the problem actually contains any wells.
This commit is contained in:
parent
aa62980fbf
commit
8159104218
@ -36,14 +36,14 @@ try
|
|||||||
// Setup grid
|
// Setup grid
|
||||||
GridManager grid(parser);
|
GridManager grid(parser);
|
||||||
|
|
||||||
// Finally handle the wells
|
// Define rock and fluid properties
|
||||||
WellsManager wells(parser, *grid.c_grid(), NULL);
|
|
||||||
|
|
||||||
double gravity[3] = {0.0, 0.0, parameters.getDefault<double>("gravity", 0.0)};
|
|
||||||
IncompPropertiesFromDeck incomp_properties(parser, *grid.c_grid());
|
IncompPropertiesFromDeck incomp_properties(parser, *grid.c_grid());
|
||||||
|
|
||||||
RockCompressibility rock_comp(parser);
|
RockCompressibility rock_comp(parser);
|
||||||
|
|
||||||
|
// Finally handle the wells
|
||||||
|
WellsManager wells(parser, *grid.c_grid(), incomp_properties.permeability());
|
||||||
|
|
||||||
|
double gravity[3] = {0.0, 0.0, parameters.getDefault<double>("gravity", 0.0)};
|
||||||
Opm::LinearSolverFactory linsolver(parameters);
|
Opm::LinearSolverFactory linsolver(parameters);
|
||||||
double nl_pressure_residual_tolerance = 1e-8;
|
double nl_pressure_residual_tolerance = 1e-8;
|
||||||
double nl_pressure_change_tolerance = 0.0;
|
double nl_pressure_change_tolerance = 0.0;
|
||||||
|
Loading…
Reference in New Issue
Block a user