dune-multidomaingrid 2.10-git
Loading...
Searching...
No Matches
localgeometry.hh
Go to the documentation of this file.
1#ifndef DUNE_MULTIDOMAINGRID_LOCALGEOMETRY_HH
2#define DUNE_MULTIDOMAINGRID_LOCALGEOMETRY_HH
3
4#include <dune/grid/common/geometry.hh>
5
6namespace Dune {
7
8namespace mdgrid {
9
10
11template<int mydim, int coorddim, typename GridImp>
13{
14
15 template<int,int,typename>
16 friend class EntityWrapper;
17
18 template<typename,typename>
19 friend class IntersectionWrapper;
20
21 template<typename,typename,typename,typename>
22 friend class SubDomainInterface;
23
24public:
25
26 typedef typename GridImp::ctype ctype;
27 static const int dimension = GridImp::dimension;
28 static const int dimensionworld = GridImp::dimensionworld;
29 static const int mydimension = mydim;
30 static const int coorddimension = coorddim;
31
32private:
33
34 typedef typename GridImp::HostGrid::Traits::template Codim<dimension-mydim>::LocalGeometry HostLocalGeometry; //TODO: fix this
35
36public:
37
38 typedef typename HostLocalGeometry::GlobalCoordinate GlobalCoordinate;
39 typedef typename HostLocalGeometry::LocalCoordinate LocalCoordinate;
40 typedef typename HostLocalGeometry::Volume Volume;
41 typedef typename HostLocalGeometry::JacobianInverseTransposed JacobianInverseTransposed;
42 typedef typename HostLocalGeometry::JacobianTransposed JacobianTransposed;
43 typedef typename HostLocalGeometry::JacobianInverse JacobianInverse;
44 typedef typename HostLocalGeometry::Jacobian Jacobian;
45
47 return _wrappedLocalGeometry.type();
48 }
49
50 int corners() const {
51 return _wrappedLocalGeometry.corners();
52 }
53
54 bool affine() const {
55 return _wrappedLocalGeometry.affine();
56 }
57
59 return _wrappedLocalGeometry.corner(i);
60 }
61
63 return _wrappedLocalGeometry.global(local);
64 }
65
67 return _wrappedLocalGeometry.local(global);
68 }
69
70 bool checkInside(const LocalCoordinate& local) const {
71 return _wrappedLocalGeometry.checkInside(local);
72 }
73
75 return _wrappedLocalGeometry.integrationElement(local);
76 }
77
78 Volume volume() const {
79 return _wrappedLocalGeometry.volume();
80 }
81
83 return _wrappedLocalGeometry.center();
84 }
85
87 return _wrappedLocalGeometry.jacobianTransposed(local);
88 }
89
91 return _wrappedLocalGeometry.jacobianInverseTransposed(local);
92 }
93
95 {
96 return _wrappedLocalGeometry.jacobian(local);
97 }
98
100 {
101 return _wrappedLocalGeometry.jacobianInverse(local);
102 }
103
104private:
105
106 const HostLocalGeometry _wrappedLocalGeometry;
107
108 LocalGeometryWrapper(const HostLocalGeometry& wrappedLocalGeometry)
109 : _wrappedLocalGeometry(wrappedLocalGeometry)
110 {}
111
112
113};
114
115} // namespace mdgrid
116
117} // namespace Dune
118
119#endif // DUNE_MULTIDOMAINGRID_LOCALGEOMETRY_HH
bool setContains(const ArrayBasedSet< SI, capacity > &a, const ArrayBasedSet< SI, capacity > &b)
const GlobalIndex & global() const
LocalIndex & local()
Definition entity.hh:142
Definition intersection.hh:18
Definition localgeometry.hh:13
static const int dimension
Definition localgeometry.hh:27
JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate &local) const
Definition localgeometry.hh:90
JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const
Definition localgeometry.hh:86
GlobalCoordinate global(const LocalCoordinate &local) const
Definition localgeometry.hh:62
HostLocalGeometry::JacobianTransposed JacobianTransposed
Definition localgeometry.hh:42
Jacobian jacobian(const LocalCoordinate &local) const
Definition localgeometry.hh:94
Volume volume() const
Definition localgeometry.hh:78
HostLocalGeometry::JacobianInverse JacobianInverse
Definition localgeometry.hh:43
GeometryType type() const
Definition localgeometry.hh:46
HostLocalGeometry::LocalCoordinate LocalCoordinate
Definition localgeometry.hh:39
HostLocalGeometry::GlobalCoordinate GlobalCoordinate
Definition localgeometry.hh:38
static const int coorddimension
Definition localgeometry.hh:30
Volume integrationElement(const LocalCoordinate &local) const
Definition localgeometry.hh:74
HostLocalGeometry::Volume Volume
Definition localgeometry.hh:40
bool checkInside(const LocalCoordinate &local) const
Definition localgeometry.hh:70
LocalCoordinate local(const GlobalCoordinate &global) const
Definition localgeometry.hh:66
int corners() const
Definition localgeometry.hh:50
GridImp::ctype ctype
Definition localgeometry.hh:26
HostLocalGeometry::Jacobian Jacobian
Definition localgeometry.hh:44
JacobianInverse jacobianInverse(const LocalCoordinate &local) const
Definition localgeometry.hh:99
static const int mydimension
Definition localgeometry.hh:29
HostLocalGeometry::JacobianInverseTransposed JacobianInverseTransposed
Definition localgeometry.hh:41
GlobalCoordinate center() const
Definition localgeometry.hh:82
bool affine() const
Definition localgeometry.hh:54
static const int dimensionworld
Definition localgeometry.hh:28
GlobalCoordinate corner(int i) const
Definition localgeometry.hh:58
An intersection that forms part of the interface between two subdomains.
Definition subdomaininterfaceiterator.hh:32