dune-geometry  2.2.0
Classes | Public Types | Static Public Attributes
Dune::GenericGeometry::DefaultGeometryTraits< ctype, dimG, dimW, alwaysAffine > Struct Template Reference

default settings for BasicGeometry More...

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

List of all members.

Classes

struct  Caching
 specifies how constant values are to be cached More...
struct  Mapping
 specifies the reference mapping to be used More...
struct  UserData
 type of additional user data to be stored in each mapping More...

Public Types

typedef DuneCoordTraits< ctype > CoordTraits
 types needed in matrix-vector operations

Static Public Attributes

static const int dimGrid = dimG
 dimension of the grid
static const int dimWorld = dimW
 dimension of the world
static const bool hybrid = true
 may the grid contain elements of different type?

Detailed Description

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

default settings for BasicGeometry

The class BasicGeometry requires a template argument Traits. These traits specify which reference mapping shall be used by the geometry and tweaks some performance settings.

This default implementation serves two purposed. Firstly, it documents the expected parameters. Secondly, the user of BasicGeometry can derive his traits class from DefaultGeometryTraits. Then, only the non-default settings have to be specified. Moreover, deriving from DefaultGeometryTraits makes the user code more robust to changes in the generic geometries.

Note:
DefaultGeometryTraits can directly be used for the Traits argument of BasicGeometry.

Member Typedef Documentation

template<class ctype, int dimG, int dimW, bool alwaysAffine = false>
typedef DuneCoordTraits< ctype > Dune::GenericGeometry::DefaultGeometryTraits< ctype, dimG, dimW, alwaysAffine >::CoordTraits

types needed in matrix-vector operations


Member Data Documentation

template<class ctype, int dimG, int dimW, bool alwaysAffine = false>
const int Dune::GenericGeometry::DefaultGeometryTraits< ctype, dimG, dimW, alwaysAffine >::dimGrid = dimG [static]

dimension of the grid

template<class ctype, int dimG, int dimW, bool alwaysAffine = false>
const int Dune::GenericGeometry::DefaultGeometryTraits< ctype, dimG, dimW, alwaysAffine >::dimWorld = dimW [static]

dimension of the world

template<class ctype, int dimG, int dimW, bool alwaysAffine = false>
const bool Dune::GenericGeometry::DefaultGeometryTraits< ctype, dimG, dimW, alwaysAffine >::hybrid = true [static]

may the grid contain elements of different type?

If the elements (entities of codimension 0) may differ in topology type, the grid is called hybrid (and this parameter must be set to true). In this case, all methods of the geometry implementation are virtual (but no other branching for topology type is used).

If the grid is non-hybrid, hybrid can be set to false. In this case, virtual methods are not necessary and, hence, the geometries are a little faster.

If hybrid is set to false, an additional parameter topologyId is required. It specifies the topological type of all elements in the grid. Here's an example:

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

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