dune-geometry  2.4
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 
9 namespace 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:18
Definition: geometrytraits.hh:18
ct ctype
Definition: geometrytraits.hh:20
FieldVector< ctype, dim > type
Definition: geometrytraits.hh:25
Definition: geometrytraits.hh:29
FieldMatrix< ctype, rows, cols > type
Definition: geometrytraits.hh:31
static const ctype epsilon()
Definition: geometrytraits.hh:36
Definition: geometrytraits.hh:23