/// \brief Constructor. /// \param sendGrid The grid that the data is attached to when sending. /// \param recvGrid The grid that the data is attached to when receiving. /// \param sendState The state where we will retieve the values to be sent. /// \param recvState The state where we will store the received values. BlackoilStateDataHandle(const Dune::CpGrid& sendGrid, const Dune::CpGrid& recvGrid, const BlackoilState& sendState, BlackoilState& recvState) : sendGrid_(sendGrid), recvGrid_(recvGrid), sendState_(sendState), recvState_(recvState) { // construction does not resize surfacevol and hydroCarbonState. Do it manually. recvState.surfacevol().resize(recvGrid.numCells()*sendState.numPhases(), std::numeric_limits<double>::max()); recvState.hydroCarbonState().resize(recvGrid.numCells()); }