/usr/include/dune/grid/yaspgrid/yaspgrididset.hh is in libdune-grid-dev 2.3.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
#ifndef DUNE_GRID_YASPGRIDIDSET_HH
#define DUNE_GRID_YASPGRIDIDSET_HH
namespace Dune {
//========================================================================
/*!
\brief persistent, globally unique Ids
*/
//========================================================================
template<class GridImp>
class YaspGlobalIdSet : public IdSet<GridImp,YaspGlobalIdSet<GridImp>,
typename remove_const<GridImp>::type::PersistentIndexType >
/*
We used the remove_const to extract the Type from the mutable class,
because the const class is not instantiated yet.
*/
{
typedef YaspGlobalIdSet< GridImp > This;
public:
//! define the type used for persisitent indices
typedef typename remove_const<GridImp>::type::PersistentIndexType IdType;
using IdSet<GridImp, This, IdType>::subId;
//! Only default-constructible
YaspGlobalIdSet()
{}
//! get id of an entity
/*
We use the remove_const to extract the Type from the mutable class,
because the const class is not instantiated yet.
*/
template<int cd>
IdType id (const typename remove_const<GridImp>::type::Traits::template Codim<cd>::Entity& e) const
{
return GridImp::getRealImplementation(e).persistentIndex();
}
//! get id of subentity
/*
We use the remove_const to extract the Type from the mutable class,
because the const class is not instantiated yet.
*/
IdType subId (const typename remove_const<GridImp>::type::Traits::template Codim< 0 >::Entity &e,
int i, unsigned int codim ) const
{
return GridImp::getRealImplementation(e).subPersistentIndex(i,codim);
}
};
} // namespace Dune
#endif // DUNE_GRID_YASPGRIDIDSET_HH
|