1#ifndef DUNE_GRID_TEST_CHECKTREE_HH
2#define DUNE_GRID_TEST_CHECKTREE_HH
7#include <dune/geometry/dimension.hh>
9#include <dune/grid/common/rangegenerators.hh>
17 template<
int,
class,
class >
20 template<
class,
class >
21 class IntersectionTree;
28 template<
class Gr
id,
class Entity,
class Predicate >
29 inline static EntityTree< Entity::codimension, Grid, Predicate >
30 makeEntityTree (
const Grid &grid,
const Entity &entity,
const Predicate &predicate )
32 return EntityTree< Entity::codimension, Grid, Predicate >( grid, entity, predicate );
40 template<
class Gr
id,
class Entity >
41 void checkEntityTree (
const Grid &grid,
const Entity &entity )
43 std::function< bool(
const Entity & ) > allLeaf = [] (
const Entity &e ) {
return true; };
44 auto tree = makeEntityTree( grid, entity, allLeaf );
46 auto noOp = [] (
const Entity &e ) {};
47 if( testForwardIterator( tree.begin(), tree.end(), noOp ) != 0 )
50 if( std::distance( tree.begin(), tree.end() ) != 1 )
54 template<
int codim,
class Gr
idView >
55 void checkEntityTree (
const GridView &gridView, Codim< codim > = Codim< codim >() )
57 for(
const auto &entity : entities( gridView, Codim< codim >() ) )
58 checkEntityTree( gridView.grid(), entity );
Base class for Dune-Exceptions.
Definition: exceptions.hh:96
#define DUNE_THROW(E, m)
Definition: exceptions.hh:218
Dune namespace.
Definition: alignedallocator.hh:13