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