mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Make cellPartition() Return Reference To Const
We don't need to copy this array on every call.
This commit is contained in:
parent
0bb293aeb0
commit
4e5745bf4a
@ -101,10 +101,11 @@ public:
|
|||||||
*/
|
*/
|
||||||
const CartesianIndexMapper& equilCartesianIndexMapper() const;
|
const CartesianIndexMapper& equilCartesianIndexMapper() const;
|
||||||
|
|
||||||
std::vector<int> cellPartition() const
|
const std::vector<int>& cellPartition() const
|
||||||
{
|
{
|
||||||
return cell_part_;
|
return this->cell_part_;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/*!
|
/*!
|
||||||
* \brief Distribute the simulation grid over multiple processes
|
* \brief Distribute the simulation grid over multiple processes
|
||||||
@ -143,7 +144,7 @@ protected:
|
|||||||
std::unique_ptr<CartesianIndexMapper> equilCartesianIndexMapper_;
|
std::unique_ptr<CartesianIndexMapper> equilCartesianIndexMapper_;
|
||||||
|
|
||||||
int mpiRank;
|
int mpiRank;
|
||||||
std::vector<int> cell_part_;
|
std::vector<int> cell_part_{};
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
Loading…
Reference in New Issue
Block a user