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

do the right thing if the number of patches given is lower than the number of grid levels

[[Imported from SVN: r4867]]
parent 3c5d950f
No related branches found
No related tags found
No related merge requests found
...@@ -65,7 +65,7 @@ public: ...@@ -65,7 +65,7 @@ public:
const GridType& grid = patches[0]->gridView().grid(); const GridType& grid = patches[0]->gridView().grid();
int maxLevel = patches.size()-1; int maxLevel = std::min((size_t)grid.maxLevel(), patches.size()-1);
// Set array sizes correctly // Set array sizes correctly
for (int i=1; i<=maxLevel; i++) for (int i=1; i<=maxLevel; i++)
patches[i]->setup(grid.levelView(i)); patches[i]->setup(grid.levelView(i));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment