variableState: Use pre-computed list of "all cells"

Class FullyImplicitBlackoilSolver<Grid> already features a list of
"all" cells, built at object construction time.  There's no need to
re-compute that list on every call to variableState() (when Gas is
active).
This commit is contained in:
Bård Skaflestad 2014-05-27 17:22:50 +02:00
parent f69530a7d4
commit eccc5c9694

View File

@ -530,9 +530,8 @@ namespace {
if (active_[ Gas]) {
// Define Sg Rs and Rv in terms of xvar.
std::vector<int> all_cells = buildAllCells(nc);
ADB rsSat = fluidRsSat(state.pressure,all_cells);
ADB rvSat = fluidRvSat(state.pressure,all_cells);
ADB rsSat = fluidRsSat(state.pressure, cells_);
ADB rvSat = fluidRvSat(state.pressure, cells_);
ADB xvar = vars[ nextvar++ ];
ADB sg = isSg*xvar + isRv* so;
state.saturation[ pu.phase_pos[ Gas ] ] = sg;