1#ifndef DUNE_FEM_SPACE_LAGRANGE_DOFMAPPER_HH
2#define DUNE_FEM_SPACE_LAGRANGE_DOFMAPPER_HH
5#include <dune/geometry/referenceelements.hh>
6#include <dune/geometry/type.hh>
7#include <dune/geometry/typeindex.hh>
23 template<
class LagrangePo
intSetContainer >
27 : lagrangePointSets_( lagrangePointSets )
30 template<
class RefElement,
31 std::enable_if_t< std::is_same< std::decay_t< decltype( std::declval< const RefElement & >().size( 0 ) ) >,
int >::value,
int > = 0,
32 std::enable_if_t< std::is_same< std::decay_t<
decltype( std::declval< const RefElement & >().type( 0, 0 ) ) >, GeometryType >::value,
int > = 0 >
35 const GeometryType type = refElement.type();
36 if( lagrangePointSets_.exists( type ) )
37 return compile( refElement, lagrangePointSets_[ type ] );
43 const LagrangePointSetContainer &lagrangePointSets_;
56 template<
class Gr
idPart >
59 static const int dimension = GridPart::dimension;
63 explicit Mapping (
bool reverse =
false ) : reverse_( reverse ) {}
65 template<
class Iterator,
class Functor >
66 void operator() ( std::size_t index,
unsigned int numDofs, Iterator begin, Iterator end, Functor functor )
const
72 functor( *(begin++), --index );
77 functor( *(begin++), index++ );
86 : localIdSet_( gridPart.grid().localIdSet() )
89 Mapping operator() (
const typename GridPart::template Codim< 0 >::EntityType &element,
unsigned int subEntity,
unsigned int codim )
const
91 if( codim == dimension-1 )
93 const auto &refElement = ReferenceElements< typename GridPart::ctype, GridPart::dimension >::general( element.type() );
94 assert( refElement.size( subEntity, codim, dimension ) == 2 );
95 const int vx[ 2 ] = { refElement.subEntity( subEntity, codim, 0, dimension ), refElement.subEntity( subEntity, codim, 1, dimension ) };
96 return Mapping( localIdSet_.subId(
gridEntity( element ), vx[ 1 ], dimension ) < localIdSet_.subId(
gridEntity( element ), vx[ 0 ], dimension ) );
103 const typename GridPart::GridType::LocalIdSet &localIdSet_;
Definition: bindguard.hh:11
const GridEntityAccess< Entity >::GridEntityType & gridEntity(const Entity &entity)
Definition: gridpart.hh:412
DofMapperCode compile(const RefElement &refElement, const LocalCoefficients &localCoefficients)
Definition: compile.hh:50
Definition: dofmappercode.hh:25
LagrangeDofMapperCodeFactory(const LagrangePointSetContainer &lagrangePointSets)
Definition: dofmappercode.hh:26
Definition: dofmappercode.hh:58
LagrangeLocalDofMapping(const GridPart &gridPart)
Definition: dofmappercode.hh:85