Skip to content

Commit 6d997f4

Browse files
committed
Change the type of multiplier for well connectivities to double
1 parent 217a830 commit 6d997f4

3 files changed

Lines changed: 9 additions & 10 deletions

File tree

opm/grid/common/ZoltanGraphFunctions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ EdgeWeightType calculateWellEdgeWeight(const Dune::CpGrid& grid,
189189
}
190190

191191
// when multipltWellConnectivities is provided, set the well weight to the average of grid weight times that coefficient
192-
EdgeWeightType mWC = graph.getMultiplyWellConnectivities();
192+
double mWC = graph.getMultiplyWellConnectivities();
193193
if (mWC >= 0) {
194194
if (total != std::numeric_limits<double>::infinity()) {
195195
total /= grid.numFaces();

opm/grid/common/ZoltanGraphFunctions.hpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,12 @@ class CombinedGridWellGraph
194194
return 1.0;
195195
}
196196

197-
void setMultiplyWellConnectivities(const float& mWC)
197+
void setMultiplyWellConnectivities(const double& mWC)
198198
{
199199
multiplyWellConnectivities = mWC;
200200
}
201201

202-
float getMultiplyWellConnectivities() const
202+
double getMultiplyWellConnectivities() const
203203
{
204204
return multiplyWellConnectivities;
205205
}
@@ -250,16 +250,15 @@ class CombinedGridWellGraph
250250
int edgeWeightsMethod_;
251251
WellConnections well_indices_;
252252
double log_min_;
253-
float multiplyWellConnectivities = -1;
253+
double multiplyWellConnectivities = -1;
254254
};
255255

256256
/// \brief Get the number of edges of the graph of the grid and the wells for one cell
257257
int getNumberOfEdgesForSpecificCellForGridWithWells(const CombinedGridWellGraph& graph, int localCellId);
258258

259-
/// \brief Iterate over the grid and to calculate the edge weights
259+
/// \brief Iterate over the grid to calculate the edge weights between well connections
260260
///
261-
/// Used as a weight for edges between cells of a well
262-
/// The result is the sum of all grid edges, or multiplyWellConnectivities*grid_average if it is positive
261+
/// The result is the sum of all grid edges, or multiplyWellConnectivities*grid_average if the multiplier is positive
263262
template <typename EdgeWeightType>
264263
EdgeWeightType calculateWellEdgeWeight(const Dune::CpGrid& grid,
265264
const CombinedGridWellGraph& graph);

opm/grid/common/ZoltanPartition.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,10 +326,10 @@ zoltanGraphPartitionGridOnRoot(const CpGrid& cpgrid,
326326
}
327327
setDefaultZoltanParameters(zz);
328328
Zoltan_Set_Param(zz, "IMBALANCE_TOL", std::to_string(zoltanImbalanceTol).c_str());
329-
float mWC = -1;
329+
double mWC = -1;
330330
for (const auto& [key, value] : params) {
331331
if (key=="MultiplyWellConnectivities") {
332-
mWC = std::stof(value);
332+
mWC = std::stod(value);
333333
} else {
334334
Zoltan_Set_Param(zz, key.c_str(), value.c_str());
335335
}
@@ -532,7 +532,7 @@ class ZoltanSerialPartitioner
532532

533533
for (const auto& [key, value] : params) {
534534
if (key=="MultiplyWellConnectivities") {
535-
gridAndWells->setMultiplyWellConnectivities(std::stof(value));
535+
gridAndWells->setMultiplyWellConnectivities(std::stod(value));
536536
} else {
537537
Zoltan_Set_Param(zz, key.c_str(), value.c_str());
538538
}

0 commit comments

Comments
 (0)