#1514 YaspGrid entity iterator loops endlessly
Metadata
Property | Value |
---|---|
Reported by | Oliver Sander (oliver.sander@tu-dresden.de) |
Reported at | Oct 15, 2014 21:55 |
Type | Bug Report |
Version | Git (pre2.4) [autotools] |
Operating System | Unspecified / All |
Last edited by | Dominic Kempf (dominic.r.kempf@gmail.com) |
Last edited at | Oct 20, 2014 09:44 |
Closed by | Dominic Kempf (dominic.r.kempf@gmail.com) |
Closed at | Oct 20, 2014 09:44 |
Closed in version | Unknown |
Resolution | Fixed |
Comment | added a check for minimum grid size in overlapping grids 5fd4a1cd8e86fa1c84e7c40023a207adcb683e52 |
Description
I have written a small test program that is intended to loop over all Interior_Partition elements of a YaspGrid. When started on two processes, it loops endlessly. Looping over All_Partition elements seems to work. Also, note that overlap is set to '1'. Setting it '0' here fixes the issue, too.
#include "config.h" #include #include <dune/grid/yaspgrid.hh>
using namespace Dune;
int main(int argc, char* argv[]) { Dune::MPIHelper& mpiHelper = MPIHelper::instance(argc, argv);
static const int dim = 2; typedef YaspGrid GridType;
array<int,dim> elements = {3, 3}; FieldVector<double,dim> bbox = {10, 10};
GridType grid(MPI_COMM_WORLD, bbox, elements, std::bitset(0), 1);
typedef GridType::LeafGridView GridView; GridView gridView = grid.leafGridView();
for (auto it = gridView.template begin<0, Dune::Interior_Partition>(); it != gridView.template end<0, Dune::Interior_Partition>(); ++it) std::cout << gridView.comm().rank() << ": foo " << std::endl;
return 0; }