dune-geometry 3.0-git
geometrytraits.hh
Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef DUNE_GEOMETRY_GENERICGEOMETRY_GEOMETRYTRAITS_HH
4#define DUNE_GEOMETRY_GENERICGEOMETRY_GEOMETRYTRAITS_HH
5
6#include "../type.hh"
7#include "matrixhelper.hh"
8
9namespace Dune
10{
11 namespace GenericGeometry
12 {
13
14 // DuneCoordTraits
15 // ---------------
16
17 template< class ct >
19 {
20 typedef ct ctype;
21
22 template< int dim >
23 struct Vector
24 {
25 typedef FieldVector< ctype, dim > type;
26 };
27
28 template< int rows, int cols >
29 struct Matrix
30 {
31 typedef FieldMatrix< ctype, rows, cols > type;
32 };
33
34 // This limit is, e.g., used in the termination criterion of the Newton
35 // scheme within the generic implementation of the method local
36 static const ctype epsilon ()
37 {
38 return 1e-6;
39 }
40 };
41
42 } // namespace GenericGeometry
43
44} // namespace Dune
45
46#endif // #ifndef DUNE_GEOMETRY_GENERICGEOMETRY_GEOMETRYTRAITS_HH
Definition affinegeometry.hh:19
Definition geometrytraits.hh:19
static const ctype epsilon()
Definition geometrytraits.hh:36
ct ctype
Definition geometrytraits.hh:20
Definition geometrytraits.hh:24
FieldVector< ctype, dim > type
Definition geometrytraits.hh:25
Definition geometrytraits.hh:30
FieldMatrix< ctype, rows, cols > type
Definition geometrytraits.hh:31