mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #2484 from akva2/janitoring
avoid potentially uninitialized warnings in serial
This commit is contained in:
commit
0970867e47
@ -161,13 +161,15 @@ public:
|
|||||||
// compute the axis specific "centroids" used for the transmissibilities. for
|
// compute the axis specific "centroids" used for the transmissibilities. for
|
||||||
// consistency with the flow simulator, we use the element centers as
|
// consistency with the flow simulator, we use the element centers as
|
||||||
// computed by opm-parser's Opm::EclipseGrid class for all axes.
|
// computed by opm-parser's Opm::EclipseGrid class for all axes.
|
||||||
const double* centroid;
|
std::array<double, 3> centroid;
|
||||||
if (vanguard_.gridView().comm().rank() == 0) {
|
if (vanguard_.gridView().comm().rank() == 0) {
|
||||||
const auto& eclGrid = eclState.getInputGrid();
|
const auto& eclGrid = eclState.getInputGrid();
|
||||||
unsigned cartesianCellIdx = cartMapper.cartesianIndex(elemIdx);
|
unsigned cartesianCellIdx = cartMapper.cartesianIndex(elemIdx);
|
||||||
centroid = &eclGrid.getCellCenter(cartesianCellIdx)[0];
|
centroid = eclGrid.getCellCenter(cartesianCellIdx);
|
||||||
} else
|
} else
|
||||||
centroid = ¢roids[centroidIdx * dimWorld];
|
std::copy(centroids.begin() + centroidIdx * dimWorld,
|
||||||
|
centroids.begin() + (centroidIdx + 1) * dimWorld,
|
||||||
|
centroid.begin());
|
||||||
|
|
||||||
for (unsigned axisIdx = 0; axisIdx < dimWorld; ++axisIdx)
|
for (unsigned axisIdx = 0; axisIdx < dimWorld; ++axisIdx)
|
||||||
for (unsigned dimIdx = 0; dimIdx < dimWorld; ++dimIdx)
|
for (unsigned dimIdx = 0; dimIdx < dimWorld; ++dimIdx)
|
||||||
|
Loading…
Reference in New Issue
Block a user