Skip to content

Commit 0eb2377

Browse files
committed
Fix weight types to work for Metis partitioner too.
1 parent 7d0a8e3 commit 0eb2377

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

opm/grid/common/ZoltanGraphFunctions.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,15 +195,15 @@ EdgeWeightType calculateWellEdgeWeight(const Dune::CpGrid& grid,
195195
}
196196

197197
// when multipltWellConnectivities is provided, set the well weight to the average of grid weight times that coefficient
198-
float mWC = graph.getMultiplyWellConnectivities();
198+
EdgeWeightType mWC = graph.getMultiplyWellConnectivities();
199199
if (mWC > 0) {
200200
if (weWeight != std::numeric_limits<EdgeWeightType>::max()) {
201201
weWeight /= grid.numFaces();
202202
} else {
203203
// grid is too big, start over and use maximum instead of the average
204204
weWeight = 0;
205205
for (int edge=0; edge<grid.numFaces(); ++edge) {
206-
weWeight = std::max(weWeight, static_cast<float>(graph.transmissibility(edge)));
206+
weWeight = std::max(weWeight, static_cast<EdgeWeightType>(graph.transmissibility(edge)));
207207
}
208208
}
209209
if (weWeight < std::numeric_limits<EdgeWeightType>::max()/mWC) {

0 commit comments

Comments
 (0)