dune-geometry  2.3.1
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 #include "cornermapping.hh"
9 
10 namespace Dune
11 {
12  namespace GenericGeometry
13  {
14 
15  // DuneCoordTraits
16  // ---------------
17 
18  template< class ct >
20  {
21  typedef ct ctype;
22 
23  template< int dim >
24  struct Vector
25  {
26  typedef FieldVector< ctype, dim > type;
27  };
28 
29  template< int rows, int cols >
30  struct Matrix
31  {
32  typedef FieldMatrix< ctype, rows, cols > type;
33  };
34 
35  // This limit is, e.g., used in the termination criterion of the Newton
36  // scheme within the generic implementation of the method local
37  static const ctype epsilon ()
38  {
39  return 1e-6;
40  }
41  };
42 
43 
44 
45  // MappingTraits
46  // -------------
51  template< class CT, unsigned int dim, unsigned int dimW >
52  struct MappingTraits
53  {
54  typedef CT CoordTraits;
55 
56  static const unsigned int dimension = dim;
57  static const unsigned int dimWorld = dimW;
58 
59  typedef typename CoordTraits :: ctype FieldType;
60  typedef typename CoordTraits :: template Vector< dimension > :: type LocalCoordinate;
61  typedef typename CoordTraits :: template Vector< dimWorld > :: type GlobalCoordinate;
62 
63  typedef typename CoordTraits :: template Matrix< dimWorld, dimension > :: type
65  typedef typename CoordTraits :: template Matrix< dimension, dimWorld > :: type
67 
69  };
70 
71 
72 
77  {
82  };
83 
84 
85 
86  // DefaultGeometryTraits
87  // ---------------------
88 
112  template< class ctype, int dimG, int dimW, bool alwaysAffine = false >
114  {
117 
119  static const int dimWorld = dimW;
120 
139  template< int dim >
141  {
142  static const bool v = false;
143  static const unsigned int topologyId = ~0u;
144  };
145 
157  template< class Topology >
158  struct Mapping
159  {
162  };
163 
175  struct Caching
176  {
180  };
181 
187  struct UserData {};
188  };
189 
190 
191 
243  template< class Grid >
245 
246  template< class Grid >
247  struct GlobalGeometryTraits< const Grid >
248  : public GlobalGeometryTraits< Grid >
249  {};
250 
251 
252 
304  template< class Grid >
306 
307  template< class Grid >
308  struct LocalGeometryTraits< const Grid >
309  : public LocalGeometryTraits< Grid >
310  {};
311  }
312 
313 }
314 
315 #endif // #ifndef DUNE_GEOMETRY_GENERICGEOMETRY_GEOMETRYTRAITS_HH
static const unsigned int dimWorld
Definition: geometrytraits.hh:57
static const EvaluationType evaluateJacobianTransposed
Definition: geometrytraits.hh:177
default settings for BasicGeometry
Definition: geometrytraits.hh:113
Definition: matrixhelper.hh:33
static const unsigned int topologyId
Definition: geometrytraits.hh:143
CoordStorage< CoordTraits, Topology, dimWorld > CornerStorage
Definition: geometrytraits.hh:160
grid specific information required by GenericGeometry::LocalGeometry
Definition: geometrytraits.hh:305
CoordTraits::template Matrix< dimension, dimWorld >::type JacobianTransposedType
Definition: geometrytraits.hh:66
EvaluationType
If not affine only volume is cached (based on intElCompute) otherwise all quantities can be cached...
Definition: geometrytraits.hh:76
static const unsigned int dimension
Definition: geometrytraits.hh:56
static const bool v
Definition: geometrytraits.hh:142
assign if method called using barycenter
Definition: geometrytraits.hh:79
specifies the reference mapping to be used
Definition: geometrytraits.hh:158
CornerMapping< CoordTraits, Topology, dimWorld, CornerStorage, alwaysAffine > type
Definition: geometrytraits.hh:161
CoordTraits::template Vector< dimWorld >::type GlobalCoordinate
Definition: geometrytraits.hh:61
grid specific information required by GenericGeometry::Geometry
Definition: geometrytraits.hh:244
Definition: geometrytraits.hh:24
Definition: geometrytraits.hh:30
static const ctype epsilon()
Definition: geometrytraits.hh:37
assign in constructor using barycenter
Definition: geometrytraits.hh:81
static const EvaluationType evaluateIntegrationElement
Definition: geometrytraits.hh:179
static const EvaluationType evaluateJacobianInverseTransposed
Definition: geometrytraits.hh:178
FieldVector< ctype, dim > type
Definition: geometrytraits.hh:26
GenericGeometry::MatrixHelper< CoordTraits > MatrixHelper
Definition: geometrytraits.hh:68
ct ctype
Definition: geometrytraits.hh:21
type of additional user data to be stored in each mapping
Definition: geometrytraits.hh:187
implementation of GenericGeometry::Mapping for first order lagrange type reference mappings...
Definition: cornermapping.hh:527
CoordTraits::template Vector< dimension >::type LocalCoordinate
Definition: geometrytraits.hh:60
Definition: geometrytraits.hh:19
DuneCoordTraits< ctype > CoordTraits
types needed in matrix-vector operations
Definition: geometrytraits.hh:116
FieldMatrix< ctype, rows, cols > type
Definition: geometrytraits.hh:32
will there be only one geometry type for a dimension?
Definition: geometrytraits.hh:140
CoordTraits::ctype FieldType
Definition: geometrytraits.hh:59
Definition: cornermapping.hh:438
CT CoordTraits
Definition: geometrytraits.hh:54
static const int dimWorld
dimension of the world
Definition: geometrytraits.hh:119
CoordTraits::template Matrix< dimWorld, dimension >::type JacobianType
Definition: geometrytraits.hh:64
specifies how constant values are to be cached
Definition: geometrytraits.hh:175