DUNE-FEM (unstable)

hostcorners.hh
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4// vi: set et ts=4 sw=2 sts=2:
5#ifndef DUNE_GEOGRID_HOSTCORNERS_HH
6#define DUNE_GEOGRID_HOSTCORNERS_HH
7
9
10#include <dune/grid/common/entity.hh>
11
12namespace Dune
13{
14 namespace GeoGrid
15 {
16
17 // HostCorners
18 // -----------
19
20 template< class HostEntity >
21 class HostCorners
22 {
23 typedef typename HostEntity::Geometry HostGeometry;
24
25 public:
26 typedef typename HostGeometry::GlobalCoordinate Coordinate;
27
28 explicit HostCorners ( const HostEntity &hostEntity )
29 : hostGeometry_( hostEntity.geometry() )
30 {}
31
32 GeometryType type () const
33 {
34 return hostGeometry_.type();
35 }
36
37 Coordinate operator[] ( int i ) const
38 {
39 return hostGeometry_.corner( i );
40 }
41
42 std::size_t size () const
43 {
44 return hostGeometry_.corners();
45 }
46
47 private:
48 HostGeometry hostGeometry_;
49 };
50
51 } // namespace GeoGrid
52
53} // namespace Dune
54
55#endif // #ifndef DUNE_GEOGRID_HOSTCORNERS_HH
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:132
Dune namespace.
Definition: alignedallocator.hh:13
constexpr std::integral_constant< std::size_t, sizeof...(II)> size(std::integer_sequence< T, II... >)
Return the size of the sequence.
Definition: integersequence.hh:75
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 (Nov 21, 23:30, 2024)