Loading [MathJax]/extensions/tex2jax.js

DUNE MultiDomainGrid (2.9)

geometry.hh
1#ifndef DUNE_MULTIDOMAINGRID_GEOMETRY_HH
2#define DUNE_MULTIDOMAINGRID_GEOMETRY_HH
3
4#include <dune/grid/common/geometry.hh>
5
6namespace Dune {
7
8namespace mdgrid {
9
10template<int mydim, int coorddim, typename GridImp>
11class GeometryWrapper
12{
13
14 template<int,int,typename>
15 friend class EntityWrapperBase;
16
17 template<int,int,typename>
18 friend class EntityWrapper;
19
20 template<typename,typename>
21 friend class IntersectionWrapper;
22
23 template<typename,typename,typename,typename>
24 friend class SubDomainInterface;
25
26public:
27
28 typedef typename GridImp::ctype ctype;
29 static const int dimension = GridImp::dimension;
30 static const int dimensionworld = GridImp::dimensionworld;
31 static const int mydimension = mydim;
32 static const int coorddimension = coorddim;
33
34private:
35
36 typedef typename GridImp::HostGrid::Traits::template Codim<dimension-mydim>::Geometry HostGeometry; //TODO: fix this
37
38public:
39
40 typedef typename HostGeometry::GlobalCoordinate GlobalCoordinate;
41 typedef typename HostGeometry::LocalCoordinate LocalCoordinate;
42 typedef typename HostGeometry::Volume Volume;
43 typedef typename HostGeometry::JacobianInverseTransposed JacobianInverseTransposed;
44 typedef typename HostGeometry::JacobianTransposed JacobianTransposed;
45 typedef typename HostGeometry::JacobianInverse JacobianInverse;
46 typedef typename HostGeometry::Jacobian Jacobian;
47
48 GeometryType type() const {
49 return _wrappedGeometry.type();
50 }
51
52 int corners() const {
53 return _wrappedGeometry.corners();
54 }
55
56 bool affine() const {
57 return _wrappedGeometry.affine();
58 }
59
60 GlobalCoordinate corner(int i) const {
61 return _wrappedGeometry.corner(i);
62 }
63
64 GlobalCoordinate global(const LocalCoordinate& local) const {
65 return _wrappedGeometry.global(local);
66 }
67
68 LocalCoordinate local(const GlobalCoordinate& global) const {
69 return _wrappedGeometry.local(global);
70 }
71
72 bool checkInside(const LocalCoordinate& local) const {
73 return _wrappedGeometry.checkInside(local);
74 }
75
76 Volume integrationElement(const LocalCoordinate& local) const {
77 return _wrappedGeometry.integrationElement(local);
78 }
79
80 Volume volume() const {
81 return _wrappedGeometry.volume();
82 }
83
84 GlobalCoordinate center() const {
85 return _wrappedGeometry.center();
86 }
87
88 JacobianTransposed jacobianTransposed(const LocalCoordinate& local) const {
89 return _wrappedGeometry.jacobianTransposed(local);
90 }
91
92 JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate& local) const {
93 return _wrappedGeometry.jacobianInverseTransposed(local);
94 }
95
96 Jacobian jacobian(const LocalCoordinate& local) const
97 {
98 return _wrappedGeometry.jacobian(local);
99 }
100
101 JacobianInverse jacobianInverse(const LocalCoordinate& local) const
102 {
103 return _wrappedGeometry.jacobianInverse(local);
104 }
105
106private:
107
108 GeometryWrapper(const HostGeometry& wrappedGeometry)
109 : _wrappedGeometry(wrappedGeometry)
110 {}
111
112 const HostGeometry _wrappedGeometry;
113
114};
115
116} // namespace mdgrid
117
118} // namespace Dune
119
120#endif // DUNE_MULTIDOMAINGRID_GEOMETRY_HH
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden & Uni Heidelberg  |  generated with Hugo v0.111.3 (Apr 6, 22:49, 2025)