dune-geometry  2.3.1
Static Public Attributes | List of all members
Dune::GenericGeometry::DefaultGeometryTraits< ctype, dimG, dimW, alwaysAffine >::hasSingleGeometryType< dim > Struct Template Reference

will there be only one geometry type for a dimension? More...

#include <dune/geometry/genericgeometry/geometrytraits.hh>

Static Public Attributes

static const bool v = false
 
static const unsigned int topologyId = ~0u
 

Detailed Description

template<class ctype, int dimG, int dimW, bool alwaysAffine = false>
template<int dim>
struct Dune::GenericGeometry::DefaultGeometryTraits< ctype, dimG, dimW, alwaysAffine >::hasSingleGeometryType< dim >

will there be only one geometry type for a dimension?

If multiple geometry types are requested for a dimension, all methods of the geometry implementation are virtual (but no other branching for the geometry type is used).

If there is only a single geometry type for a certain dimension, hasSingleGeometryType::v can be set to true. In this case, virtual methods are not necessary and the geometries are a little faster.

If hasSingleGeometryType::v is set to true, an additional parameter topologyId is required. Here's an example:

static const unsigned int topologyId = SimplexTopology< dim >::type::id;

Member Data Documentation

template<class ctype, int dimG, int dimW, bool alwaysAffine = false>
template<int dim>
const unsigned int Dune::GenericGeometry::DefaultGeometryTraits< ctype, dimG, dimW, alwaysAffine >::hasSingleGeometryType< dim >::topologyId = ~0u
static
template<class ctype, int dimG, int dimW, bool alwaysAffine = false>
template<int dim>
const bool Dune::GenericGeometry::DefaultGeometryTraits< ctype, dimG, dimW, alwaysAffine >::hasSingleGeometryType< dim >::v = false
static

The documentation for this struct was generated from the following file: