mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Separating LGRs in rank 0 cellCentroids_
This commit is contained in:
@@ -476,11 +476,14 @@ protected:
|
||||
*/
|
||||
template<class CartMapper>
|
||||
std::function<std::array<double,dimensionworld>(int)>
|
||||
cellCentroids_(const CartMapper& cartMapper) const
|
||||
cellCentroids_(const CartMapper& cartMapper, const bool& isCpGrid) const
|
||||
{
|
||||
return [this, cartMapper](int elemIdx) {
|
||||
return [this, cartMapper, isCpGrid](int elemIdx) {
|
||||
std::array<double,dimensionworld> centroid;
|
||||
if (this->gridView().comm().rank() == 0)
|
||||
const auto rank = this->gridView().comm().rank();
|
||||
const auto maxLevel = this->gridView().grid().maxLevel();
|
||||
bool useEclipse = !isCpGrid || (isCpGrid && (rank == 0) && (maxLevel == 0));
|
||||
if (useEclipse)
|
||||
{
|
||||
centroid = this->eclState().getInputGrid().getCellCenter(cartMapper.cartesianIndex(elemIdx));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user