Skip to content
Snippets Groups Projects

Fix GeometryGrid's fake iterators

Merged Ansgar Burchardt requested to merge bugfix/geometrygrid-fake-iterators into master

The fake iterators provided by GeometryGrid were buggy. Code using them would fail to build.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Why is the test you wrote GeometryGrid-only? Doesn't it test something that should hold for all grids, and therefore be integrated into the main test?

  • @oliver.sander I think this is already checked in the grid check, however GeometryGrid only uses YaspGrid as the host grid. So the fake iterators are not tested. I guess a better solution might be to use UGGrid as a second host grid for the tests. I'll have a look if this also triggers the problem.

    I also noticed that my code now compiles, but there seem to be further bugs. So I'll set this merge request to WIP for now.

  • Ansgar Burchardt Marked this merge request as a Work In Progress

    Marked this merge request as a Work In Progress

  • Building test-geogrid also with UGGrid as the host grid works with a few more patches, however:

    % ./dune/grid/test/test-geogrid-uggrid 2>&1 | grep -c Error:
    1944

    Interestingly the test still returns 0 (success)...

  • Ansgar Burchardt mentioned in issue #12

    mentioned in issue #12

  • Ansgar Burchardt Added 12 commits:

    Added 12 commits:

    • 8458d064...b88410cd - 3 commits from branch master
    • 1384fec0 - Typo: defualt -> default
    • 2ccf5e84 - EntityBase (fake): add missing constructor
    • 5a4baaa9 - Pass correct template argument
    • c3228003 - Use correct host iterators
    • 8399aed1 - Do not dereference entities
    • eae5f4ff - vertexPartitionType: return type of ith vertex
    • 11f80614 - Also copy grid_ member variable
    • a0284945 - Also test GeometryGrid with UGGrid as host grid
    • b4d36b28 - Reorder initializer lists
  • I replaced the new test by building a second version of test-geogrid.cc with UGGrid as the backend. This showed a few more bugs that had to be addressed, but the grid check now passes.

  • Ansgar Burchardt Unmarked this merge request as a Work In Progress

    Unmarked this merge request as a Work In Progress

  • Is there still anything to be done before this can be merged?

  • Oliver Sander mentioned in commit 4baece1f

    mentioned in commit 4baece1f

  • Oliver Sander Status changed to merged

    Status changed to merged

    • Developer

      This leads to a test failure for me. Is that known? Here's what I get:

      [ 75%] Building CXX object dune/grid/test/CMakeFiles/test-geogrid-uggrid.dir/test-geogrid.cc.o
      In file included from /home/mi/pipping/dune/dune-grid/dune/grid/test/test-geogrid.cc:21:
      In file included from /home/mi/pipping/dune/dune-grid/dune/grid/geometrygrid.hh:3:
      In file included from /home/mi/pipping/dune/dune-grid/dune/grid/geometrygrid/grid.hh:12:
      In file included from /home/mi/pipping/dune/dune-grid/dune/grid/geometrygrid/datahandle.hh:11:
      /home/mi/pipping/dune/dune-grid/dune/grid/geometrygrid/entity.hh:578:9: error: value of
            type 'const Dune::GeoGrid::EntityBase<1, const Dune::GeometryGrid<Dune::UGGrid<2>,
            Dune::IdenticalCoordFunction<double, 2>, std::allocator<void> >, true>' is not
            contextually convertible to 'bool'
              assert( *this );
              ^~~~~~~~~~~~~~~
    • Argh, assert in tests :( No, I didn't notice this as I ran the testsuite with my usual compiler options which include -DNDEBUG. I'll try to take a look at this tomorrow.

    • Please register or sign in to reply
  • Oliver Sander Mentioned in commit 4baece1f

    Mentioned in commit 4baece1f

Please register or sign in to reply
Loading