Vertex iterator over empty grid returns a vertex

An empty FoamGrid has an non-empty iterator over vertices.

Example:

GridFactory< FoamGrid<2, 2> > factory;
std::shared_ptr< FoamGrid<2,2> > grid = factory.createGrid();
const auto& gridView = grid->leafGridView();

std::cout << gridView.size(2) << std::endl;     // returns: 0

for ( const auto& vertex : vertices( gridView ) )
    std::cout << vertex.geometry().center() << std::endl;     // returns: 0 0   (that should not happen!)
Edited by Samuel Burbulla
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information