mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-25 10:40:21 -06:00
use alternative init for wells with all rates less than eps
This commit is contained in:
parent
374b25639e
commit
bd145913e8
@ -1053,8 +1053,9 @@ namespace Opm
|
|||||||
// if more than one nonzero rate.
|
// if more than one nonzero rate.
|
||||||
auto& ws = well_state.well(this->index_of_well_);
|
auto& ws = well_state.well(this->index_of_well_);
|
||||||
int nonzero_rate_index = -1;
|
int nonzero_rate_index = -1;
|
||||||
|
const double floating_point_error_epsilon = 1e-14;
|
||||||
for (int p = 0; p < this->number_of_phases_; ++p) {
|
for (int p = 0; p < this->number_of_phases_; ++p) {
|
||||||
if (ws.surface_rates[p] != 0.0) {
|
if (std::abs(ws.surface_rates[p]) > floating_point_error_epsilon) {
|
||||||
if (nonzero_rate_index == -1) {
|
if (nonzero_rate_index == -1) {
|
||||||
nonzero_rate_index = p;
|
nonzero_rate_index = p;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user