Use correct size when resizing hydroCarbonState.

The size is the number of cells and not dependent on the number of phases.
This was a typical copy&paste mistake that wasted space.
Kudos to atgeirr for catching this.
This commit is contained in:
Markus Blatt 2016-05-25 12:43:12 +00:00
parent 22e71dff08
commit 509cd6f0b1

View File

@ -451,7 +451,7 @@ void distributeGridAndData( Dune::CpGrid& grid,
// construction does not resize surfacevol and hydroCarbonState. Do it manually.
distributed_state.surfacevol().resize(grid.numCells()*state.numPhases(),
std::numeric_limits<double>::max());
distributed_state.hydroCarbonState().resize(grid.numCells()*state.numPhases());
distributed_state.hydroCarbonState().resize(grid.numCells());
BlackoilStateDataHandle state_handle(global_grid, grid,
state, distributed_state);
BlackoilPropsDataHandle props_handle(properties,