Loading [MathJax]/extensions/tex2jax.js

DUNE MultiDomainGrid (2.8)

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