Dune Core Modules (2.7.0)

hostcorners.hh
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef DUNE_GEOGRID_HOSTCORNERS_HH
4#define DUNE_GEOGRID_HOSTCORNERS_HH
5
7
8#include <dune/grid/common/entity.hh>
9
10namespace Dune
11{
12 namespace GeoGrid
13 {
14
15 // HostCorners
16 // -----------
17
18 template< class HostEntity >
19 class HostCorners
20 {
21 typedef typename HostEntity::Geometry HostGeometry;
22
23 public:
24 typedef typename HostGeometry::GlobalCoordinate Coordinate;
25
26 explicit HostCorners ( const HostEntity &hostEntity )
27 : hostGeometry_( hostEntity.geometry() )
28 {}
29
30 GeometryType type () const
31 {
32 return hostGeometry_.type();
33 }
34
35 Coordinate operator[] ( int i ) const
36 {
37 return hostGeometry_.corner( i );
38 }
39
40 std::size_t size () const
41 {
42 return hostGeometry_.corners();
43 }
44
45 private:
46 HostGeometry hostGeometry_;
47 };
48
49 } // namespace GeoGrid
50
51} // namespace Dune
52
53#endif // #ifndef DUNE_GEOGRID_HOSTCORNERS_HH
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:180
Dune namespace.
Definition: alignedallocator.hh:14
A unique label for each type of element that can occur in a grid.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 15, 22:36, 2024)