dune-multidomaingrid 2.10-git
Loading...
Searching...
No Matches
geometry.hh
Go to the documentation of this file.
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>
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
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
61 return _wrappedGeometry.corner(i);
62 }
63
65 return _wrappedGeometry.global(local);
66 }
67
69 return _wrappedGeometry.local(global);
70 }
71
72 bool checkInside(const LocalCoordinate& local) const {
73 return _wrappedGeometry.checkInside(local);
74 }
75
77 return _wrappedGeometry.integrationElement(local);
78 }
79
80 Volume volume() const {
81 return _wrappedGeometry.volume();
82 }
83
85 return _wrappedGeometry.center();
86 }
87
89 return _wrappedGeometry.jacobianTransposed(local);
90 }
91
93 return _wrappedGeometry.jacobianInverseTransposed(local);
94 }
95
97 {
98 return _wrappedGeometry.jacobian(local);
99 }
100
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
bool setContains(const ArrayBasedSet< SI, capacity > &a, const ArrayBasedSet< SI, capacity > &b)
const GlobalIndex & global() const
LocalIndex & local()
Definition entity.hh:142
Definition entity.hh:77
Definition geometry.hh:12
GridImp::ctype ctype
Definition geometry.hh:28
GlobalCoordinate corner(int i) const
Definition geometry.hh:60
Jacobian jacobian(const LocalCoordinate &local) const
Definition geometry.hh:96
HostGeometry::Volume Volume
Definition geometry.hh:42
LocalCoordinate local(const GlobalCoordinate &global) const
Definition geometry.hh:68
Volume integrationElement(const LocalCoordinate &local) const
Definition geometry.hh:76
HostGeometry::JacobianInverseTransposed JacobianInverseTransposed
Definition geometry.hh:43
JacobianInverse jacobianInverse(const LocalCoordinate &local) const
Definition geometry.hh:101
HostGeometry::JacobianInverse JacobianInverse
Definition geometry.hh:45
GlobalCoordinate center() const
Definition geometry.hh:84
static const int coorddimension
Definition geometry.hh:32
JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const
Definition geometry.hh:88
Volume volume() const
Definition geometry.hh:80
int corners() const
Definition geometry.hh:52
HostGeometry::LocalCoordinate LocalCoordinate
Definition geometry.hh:41
bool affine() const
Definition geometry.hh:56
JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate &local) const
Definition geometry.hh:92
HostGeometry::JacobianTransposed JacobianTransposed
Definition geometry.hh:44
GlobalCoordinate global(const LocalCoordinate &local) const
Definition geometry.hh:64
HostGeometry::GlobalCoordinate GlobalCoordinate
Definition geometry.hh:40
static const int dimension
Definition geometry.hh:29
HostGeometry::Jacobian Jacobian
Definition geometry.hh:46
static const int dimensionworld
Definition geometry.hh:30
static const int mydimension
Definition geometry.hh:31
bool checkInside(const LocalCoordinate &local) const
Definition geometry.hh:72
GeometryType type() const
Definition geometry.hh:48
Definition intersection.hh:18
An intersection that forms part of the interface between two subdomains.
Definition subdomaininterfaceiterator.hh:32