Fix bug related to arithmetic if operator ( ? : ).

This commit is contained in:
Atgeirr Flø Rasmussen 2012-05-16 14:15:50 +02:00
parent a6c71288aa
commit 07b04825fd

View File

@ -59,7 +59,7 @@ namespace Opm
THROW("Inconsistent number of phases specified: " THROW("Inconsistent number of phases specified: "
<< wells_->number_of_phases << " != " << num_phases); << 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); pressure_increment_.resize(num_dofs);
UnstructuredGrid* gg = const_cast<UnstructuredGrid*>(&grid_); UnstructuredGrid* gg = const_cast<UnstructuredGrid*>(&grid_);
tpfa_htrans_compute(gg, permeability, &htrans_[0]); tpfa_htrans_compute(gg, permeability, &htrans_[0]);