/usr/include/dune/grid-glue/adapter/intersectionindexset.hh is in libdune-grid-glue-dev 2.5.0-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 | #ifndef DUNE_GRIDGLUE_ADAPTER_INTERSECTIONINDEXSET_HH
#define DUNE_GRIDGLUE_ADAPTER_INTERSECTIONINDEXSET_HH
#include <dune/grid-glue/gridglue.hh>
#include <dune/grid-glue/adapter/intersection.hh>
#ifndef ONLY_SIMPLEX_INTERSECTIONS
// we currently support only one intersection type. If we want to support more,
// we have to think about the semantics of our IndexSet
#error Not Implemented
#endif
namespace Dune {
namespace GridGlue {
template<typename P0, typename P1>
class IntersectionIndexSet
{
friend class ::Dune::GridGlue::GridGlue<P0,P1>;
typedef ::Dune::GridGlue::GridGlue<P0,P1> GridGlue;
public:
/** \brief The type used for the indices */
typedef typename GridGlue::IndexType IndexType;
/** \brief The type used for the size */
typedef size_t SizeType;
/** @brief Map Dune::GridGlue::Intersection to index.
*/
template<int I, int O>
IndexType index (const Intersection<P0,P1,I,O> & i) const
{
return i.i_->index_;
}
/** @brief Return total number of intersections.
*/
SizeType size () const
{
return glue_->size();
}
private:
/** construct from a given GridGlue object */
IntersectionIndexSet(const GridGlue * g) :
glue_(g) {}
const GridGlue * glue_;
};
} // end namespace GridGlue
} // end namespace Dune
#endif // DUNE_GRIDGLUE_ADAPTER_INTERSECTIONINDEXSET_HH
|