dune-grid
2.11
Toggle main menu visibility
Loading...
Searching...
No Matches
dune
grid
geometrygrid
hostcorners.hh
Go to the documentation of this file.
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
8
#include <dune/geometry/type.hh>
9
10
#include <
dune/grid/common/entity.hh
>
11
12
namespace
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
Dune
Include standard header files.
Definition
agrid.hh:60
Dune::GeoGrid
namespace containing the implementations of GeometryGrid
Definition
geometrygrid/backuprestore.hh:20
Dune::GeoGrid::HostCorners::type
GeometryType type() const
Definition
hostcorners.hh:32
Dune::GeoGrid::HostCorners::operator[]
Coordinate operator[](int i) const
Definition
hostcorners.hh:37
Dune::GeoGrid::HostCorners::HostCorners
HostCorners(const HostEntity &hostEntity)
Definition
hostcorners.hh:28
Dune::GeoGrid::HostCorners::Coordinate
HostGeometry::GlobalCoordinate Coordinate
Definition
hostcorners.hh:26
Dune::GeoGrid::HostCorners::size
std::size_t size() const
Definition
hostcorners.hh:42
entity.hh
Generated by
1.17.0