diff --git a/opm/core/pressure/CompressibleTpfa.cpp b/opm/core/pressure/CompressibleTpfa.cpp index cdc4db54e..564eeb8f1 100644 --- a/opm/core/pressure/CompressibleTpfa.cpp +++ b/opm/core/pressure/CompressibleTpfa.cpp @@ -59,7 +59,7 @@ namespace Opm THROW("Inconsistent number of phases specified: " << wells_->number_of_phases << " != " << num_phases); } - const int num_dofs = g.number_of_cells + wells ? wells->number_of_wells : 0; + const int num_dofs = g.number_of_cells + (wells ? wells->number_of_wells : 0); pressure_increment_.resize(num_dofs); UnstructuredGrid* gg = const_cast(&grid_); tpfa_htrans_compute(gg, permeability, &htrans_[0]);