Dune Core Modules (2.3.1)

geometrytraits.hh
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
10namespace Dune
11{
12 namespace GenericGeometry
13 {
14
15 // DuneCoordTraits
16 // ---------------
17
18 template< class ct >
19 struct DuneCoordTraits
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 >
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
64 JacobianType;
65 typedef typename CoordTraits :: template Matrix< dimension, dimWorld > :: type
66 JacobianTransposedType;
67
68 typedef GenericGeometry :: MatrixHelper< CoordTraits > MatrixHelper;
69 };
70
71
72
76 enum EvaluationType
77 {
79 ComputeOnDemand,
81 PreCompute
82 };
83
84
85
86 // DefaultGeometryTraits
87 // ---------------------
88
112 template< class ctype, int dimG, int dimW, bool alwaysAffine = false >
114 {
116 typedef DuneCoordTraits< ctype > CoordTraits;
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 {
160 typedef CoordStorage< CoordTraits, Topology, dimWorld > CornerStorage;
162 };
163
175 struct Caching
176 {
177 static const EvaluationType evaluateJacobianTransposed = ComputeOnDemand;
178 static const EvaluationType evaluateJacobianInverseTransposed = ComputeOnDemand;
179 static const EvaluationType evaluateIntegrationElement = ComputeOnDemand;
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
implementation of GenericGeometry::Mapping for first order lagrange type reference mappings.
Definition: cornermapping.hh:528
Grid abstract base class.
Definition: grid.hh:386
A generic dynamic dense matrix.
Definition: matrix.hh:25
Dune namespace.
Definition: alignment.hh:14
specifies how constant values are to be cached
Definition: geometrytraits.hh:176
specifies the reference mapping to be used
Definition: geometrytraits.hh:159
type of additional user data to be stored in each mapping
Definition: geometrytraits.hh:187
will there be only one geometry type for a dimension?
Definition: geometrytraits.hh:141
default settings for BasicGeometry
Definition: geometrytraits.hh:114
DuneCoordTraits< ctype > CoordTraits
types needed in matrix-vector operations
Definition: geometrytraits.hh:116
static const int dimWorld
dimension of the world
Definition: geometrytraits.hh:119
grid specific information required by GenericGeometry::Geometry
Definition: geometrytraits.hh:244
grid specific information required by GenericGeometry::LocalGeometry
Definition: geometrytraits.hh:305
Default mapping traits using Dune::FieldVector and Dune::FieldMatrix.
Definition: geometrytraits.hh:53
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 15, 22:36, 2024)