From 509cd6f0b129133ee17244cdc60e900d7a329b16 Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Wed, 25 May 2016 12:43:12 +0000 Subject: [PATCH] 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. --- opm/autodiff/RedistributeDataHandles.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opm/autodiff/RedistributeDataHandles.hpp b/opm/autodiff/RedistributeDataHandles.hpp index fceb9cf8c..c4d01f310 100644 --- a/opm/autodiff/RedistributeDataHandles.hpp +++ b/opm/autodiff/RedistributeDataHandles.hpp @@ -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::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,