dune-grid
2.11
Toggle main menu visibility
Loading...
Searching...
No Matches
dune
grid
yaspgrid
yaspgrididset.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_GRID_YASPGRIDIDSET_HH
6
#define DUNE_GRID_YASPGRIDIDSET_HH
7
8
9
namespace
Dune
{
10
11
//========================================================================
16
//========================================================================
17
18
template
<
class
Gr
id
Imp>
19
class
YaspGlobalIdSet
:
public
IdSet
<GridImp,YaspGlobalIdSet<GridImp>,
20
typename std::remove_const<GridImp>::type::PersistentIndexType >
21
/*
22
We used the remove_const to extract the Type from the mutable class,
23
because the const class is not instantiated yet.
24
*/
25
{
26
typedef
YaspGlobalIdSet< GridImp >
This;
27
28
public
:
30
typedef
typename
std::remove_const<GridImp>::type::PersistentIndexType
IdType
;
31
32
using
IdSet
<GridImp, This,
IdType
>
::subId
;
33
35
YaspGlobalIdSet
()
36
{}
37
39
/*
40
We use the remove_const to extract the Type from the mutable class,
41
because the const class is not instantiated yet.
42
*/
43
template
<
int
cd>
44
IdType
id
(
const
typename
std::remove_const<GridImp>::type::Traits::template
Codim<cd>::Entity
& e)
const
45
{
46
return
e.impl().persistentIndex();
47
}
48
50
/*
51
We use the remove_const to extract the Type from the mutable class,
52
because the const class is not instantiated yet.
53
*/
54
IdType
subId
(
const
typename
std::remove_const<GridImp>::type::Traits::template
Codim< 0 >::Entity
&e,
55
int
i,
unsigned
int
codim )
const
56
{
57
return
e.impl().subPersistentIndex(i,codim);
58
}
59
60
};
61
62
}
// namespace Dune
63
64
#endif
// DUNE_GRID_YASPGRIDIDSET_HH
Dune
Include standard header files.
Definition
agrid.hh:60
Dune::IdSet< GridImp, YaspGlobalIdSet< GridImp >, std::remove_const< GridImp >::type::PersistentIndexType >::IdSet
IdSet()=default
Dune::IdSet::Codim
Export the type of the entity used as parameter in the id(...) method.
Definition
common/indexidset.hh:457
Dune::YaspGlobalIdSet< YaspGrid< dim, Coordinates > >::subId
IdType subId(const typename std::remove_const< YaspGrid< dim, Coordinates > >::type::Traits::template Codim< 0 >::Entity &e, int i, unsigned int codim) const
Definition
yaspgrididset.hh:54
Dune::YaspGlobalIdSet< YaspGrid< dim, Coordinates > >::IdType
std::remove_const< YaspGrid< dim, Coordinates > >::type::PersistentIndexType IdType
Definition
yaspgrididset.hh:30
Dune::YaspGlobalIdSet::YaspGlobalIdSet
YaspGlobalIdSet()
Only default-constructible.
Definition
yaspgrididset.hh:35
Dune::YaspGlobalIdSet::id
IdType id(const typename std::remove_const< GridImp >::type::Traits::template Codim< cd >::Entity &e) const
get id of an entity
Definition
yaspgrididset.hh:44
Generated by
1.17.0