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