mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-26 03:00:17 -06:00
Fix handling of no wells in WellStateFullyImplicitBlackoil.hpp
In that case we cannot call numPhases() on the wells as it produces a floating point exception. As we do not use that information in this case anyway, we simply use -1 instead to prevent the call.
This commit is contained in:
parent
c1e5a64329
commit
5ed788ce6f
@ -195,7 +195,9 @@ namespace Opm
|
||||
data::Wells res = WellState::report();
|
||||
|
||||
const int nw = this->numWells();
|
||||
const int np = this->numPhases();
|
||||
// If there are now wells numPhases throws a floating point
|
||||
// exception.
|
||||
const int np = nw ? this->numPhases() : -1;
|
||||
|
||||
/* this is a reference or example on **how** to convert from
|
||||
* WellState to something understood by opm-output. it is intended
|
||||
|
Loading…
Reference in New Issue
Block a user