mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Remove lookUpCellCentroid for rank zero
This commit is contained in:
@@ -478,17 +478,19 @@ protected:
|
|||||||
std::function<std::array<double,dimensionworld>(int)>
|
std::function<std::array<double,dimensionworld>(int)>
|
||||||
cellCentroids_(const CartMapper& cartMapper) const
|
cellCentroids_(const CartMapper& cartMapper) const
|
||||||
{
|
{
|
||||||
auto rank = this->gridView().comm().rank();
|
return [this, cartMapper](int elemIdx) {
|
||||||
if (rank == 0)
|
std::array<double,dimensionworld> centroid;
|
||||||
{
|
if (this->gridView().comm().rank() == 0)
|
||||||
LookUpCellCentroid<Grid,GridView> lookUpCellCentroid(this->gridView(), cartMapper, &(this ->eclState().getInputGrid()));
|
{
|
||||||
return lookUpCellCentroid;
|
centroid = this->eclState().getInputGrid().getCellCenter(cartMapper.cartesianIndex(elemIdx));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LookUpCellCentroid<Grid,GridView> lookUpCellCentroid(this->gridView(), cartMapper, nullptr);
|
LookUpCellCentroid<Grid,GridView> lookUpCellCentroid(this->gridView(), cartMapper, nullptr);
|
||||||
return lookUpCellCentroid;
|
centroid = lookUpCellCentroid(elemIdx);
|
||||||
}
|
}
|
||||||
|
return centroid;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
void callImplementationInit()
|
void callImplementationInit()
|
||||||
|
|||||||
Reference in New Issue
Block a user