1#ifndef DUNE_COPASI_GRID_HAS_SINGLE_GEOMETRY_TYPE_HH
2#define DUNE_COPASI_GRID_HAS_SINGLE_GEOMETRY_TYPE_HH
4#include <dune-copasi-config.hh>
6#include <dune/grid/common/capabilities.hh>
8#include <dune/geometry/type.hh>
10#include <dune/common/exceptions.hh>
26template<
class Gr
idView>
27std::enable_if_t<Capabilities::hasSingleGeometryType<typename GridView::Grid>::v,
45template<
class Gr
idView>
46std::enable_if_t<not Capabilities::hasSingleGeometryType<typename GridView::Grid>::v,
bool>
49 if (grid_view.size(0) == 0) {
52 GeometryType gt = grid_view.template begin<0>()->geometry().type();
53 for (
auto&& element : elements(grid_view)) {
54 if (gt != element.geometry().type()) {
Definition: axis_names.hh:7
std::enable_if_t< Capabilities::hasSingleGeometryType< typename GridView::Grid >::v, bool > constexpr has_single_geometry_type(const GridView &)
Determines if grid view has a single geometry type.
Definition: has_single_geometry_type.hh:28