mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-28 02:00:59 -06:00
Make StandardWells support cases with no wells.
Dense case was handled in PR #1002. I was not aware that the same regression was in the legacy code. wells_manager.c_wells() might return a null pointer if there are no wells in the domain of a process.
This commit is contained in:
parent
c292dd4975
commit
86209139db
@ -1210,7 +1210,8 @@ namespace Opm
|
||||
const WellState& well_state,
|
||||
DynamicListEconLimited& list_econ_limited) const
|
||||
{
|
||||
const int nw = wells_struct->number_of_wells;
|
||||
// wells_struct may be null pointer if there are no wells in process domain
|
||||
const int nw = ( wells_struct ) ? wells_struct->number_of_wells : 0;
|
||||
|
||||
for (int w = 0; w < nw; ++w) {
|
||||
// flag to check if the mim oil/gas rate limit is violated
|
||||
|
Loading…
Reference in New Issue
Block a user