mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-20 11:48:25 -06:00
Separating LGRs in rank 0 cellCentroids_
This commit is contained in:
parent
ffa7bc23ed
commit
92a1d3caab
@ -248,7 +248,7 @@ public:
|
||||
std::function<std::array<double,dimensionworld>(int)>
|
||||
cellCentroids() const
|
||||
{
|
||||
return this->cellCentroids_(this->cartesianIndexMapper());
|
||||
return this->cellCentroids_(this->cartesianIndexMapper(), false);
|
||||
}
|
||||
|
||||
const TransmissibilityType& globalTransmissibility() const
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -239,7 +239,7 @@ public:
|
||||
std::function<std::array<double,dimensionworld>(int)>
|
||||
cellCentroids() const
|
||||
{
|
||||
return this->cellCentroids_(this->cartesianIndexMapper());
|
||||
return this->cellCentroids_(this->cartesianIndexMapper(), true);
|
||||
}
|
||||
|
||||
const std::vector<int>& globalCell()
|
||||
|
@ -222,7 +222,7 @@ public:
|
||||
std::function<std::array<double,EclBaseVanguard<TypeTag>::dimensionworld>(int)>
|
||||
cellCentroids() const
|
||||
{
|
||||
return this->cellCentroids_(this->cartesianIndexMapper());
|
||||
return this->cellCentroids_(this->cartesianIndexMapper(), false);
|
||||
}
|
||||
|
||||
std::vector<int> cellPartition() const
|
||||
|
Loading…
Reference in New Issue
Block a user