Skip to content
Snippets Groups Projects
Commit 8bc1a07e authored by Oliver Sander's avatar Oliver Sander Committed by sander
Browse files

More cleanup

[[Imported from SVN: r9747]]
parent 1248a52d
No related branches found
No related tags found
No related merge requests found
...@@ -188,8 +188,7 @@ public: ...@@ -188,8 +188,7 @@ public:
/**********************************************************************************************************************/ /**********************************************************************************************************************/
GlobalUniqueIndex(const GridView& gridview) GlobalUniqueIndex(const GridView& gridview)
: gridview_(gridview), : gridview_(gridview),
uniqueEntityPartition_(gridview), uniqueEntityPartition_(gridview)
size_(gridview.comm().size())
{ {
int rank = gridview.comm().rank(); int rank = gridview.comm().rank();
int size = gridview.comm().size(); int size = gridview.comm().size();
...@@ -214,16 +213,14 @@ public: ...@@ -214,16 +213,14 @@ public:
* for this; first, we gather the number of locally owned entities on the root process and, second, we * for this; first, we gather the number of locally owned entities on the root process and, second, we
* broadcast the array to all processes where the respective offset can be calculated. */ * broadcast the array to all processes where the respective offset can be calculated. */
int offset[size]; std::vector<int> offset(size);
std::fill(offset.begin(), offset.end(), 0);
for(int ii=0;ii<size;ii++)
offset[ii]=0;
/** gather number of locally owned entities on root process */ /** gather number of locally owned entities on root process */
collective.template gather<int>(&nLocalEntity_,offset,1,0); collective.template gather<int>(&nLocalEntity_,offset.data(),1,0);
/** broadcast the array containing the number of locally owned entities to all processes */ /** broadcast the array containing the number of locally owned entities to all processes */
collective.template broadcast<int>(offset,size_,0); collective.template broadcast<int>(offset.data(),size,0);
indexOffset_.clear(); indexOffset_.clear();
indexOffset_.resize(size,0); indexOffset_.resize(size,0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment