mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-18 21:43:27 -06:00
InitStateEquil: fix valgrind complaint about uninitialized values
it seems that it was pure luck that this worked so far!
This commit is contained in:
parent
48d4abef1a
commit
823f3a4032
@ -693,7 +693,9 @@ namespace Opm
|
||||
// Adjust oil pressure according to gas saturation and cap pressure
|
||||
double pc[BlackoilPhases::MaxNumPhases];
|
||||
double sat[BlackoilPhases::MaxNumPhases];
|
||||
sat[waterpos] = sw;
|
||||
sat[gaspos] = sg;
|
||||
sat[oilpos] = 1.0 - sat[waterpos] - sat[gaspos];
|
||||
props.capPress(1, sat, &cell, pc, 0);
|
||||
phase_pressures[oilpos][local_index] = phase_pressures[gaspos][local_index] - pc[gaspos];
|
||||
}
|
||||
@ -704,6 +706,9 @@ namespace Opm
|
||||
double sat[BlackoilPhases::MaxNumPhases];
|
||||
double threshold_sat = 1.0e-6;
|
||||
|
||||
sat[waterpos] = smax[waterpos];
|
||||
sat[gaspos] = smax[gaspos];
|
||||
sat[oilpos] = 1.0 - sat[waterpos] - sat[gaspos];
|
||||
if (sw > smax[waterpos]-threshold_sat ) {
|
||||
sat[waterpos] = smax[waterpos];
|
||||
props.capPress(1, sat, &cell, pc, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user