diff --git a/opm/autodiff/RedistributeDataHandles.hpp b/opm/autodiff/RedistributeDataHandles.hpp index 741c22879..fceb9cf8c 100644 --- a/opm/autodiff/RedistributeDataHandles.hpp +++ b/opm/autodiff/RedistributeDataHandles.hpp @@ -219,7 +219,7 @@ public: { if ( T::codimension == 0) { - return 2 * sendState_.numPhases() +4+2*sendGrid_.numCellFaces(e.index()); + return 2 * sendState_.numPhases() + 5 + 2*sendGrid_.numCellFaces(e.index()); } else { @@ -240,6 +240,10 @@ public: buffer.write(sendState_.rv()[e.index()]); buffer.write(sendState_.pressure()[e.index()]); buffer.write(sendState_.temperature()[e.index()]); + //We can only send one type with this buffer. Ergo we convert the enum to a double. + double hydroCarbonState_ = sendState_.hydroCarbonState()[e.index()]; + buffer.write(hydroCarbonState_); + for ( size_t i=0; i(val); + for ( size_t i=0; i::max()); + distributed_state.hydroCarbonState().resize(grid.numCells()*state.numPhases()); BlackoilStateDataHandle state_handle(global_grid, grid, state, distributed_state); BlackoilPropsDataHandle props_handle(properties,