1#ifndef DUNE_FEM_OPERATOR_MATRIX_FUNCTOR_HH
2#define DUNE_FEM_OPERATOR_MATRIX_FUNCTOR_HH
16 template<
class Functor,
class LocalIndex,
class GlobalIndex >
19 constexpr IndexFunctor ( Functor functor,
const LocalIndex &localIndex,
const GlobalIndex &globalIndex )
20 : functor_( functor ),
21 localIndex_( localIndex ),
22 globalIndex_( globalIndex )
25 template<
class LocalKey,
class GlobalKey >
26 void operator() (
const LocalKey localKey,
const GlobalKey &globalKey )
const
28 functor_( std::make_pair( localIndex_, localKey ), std::make_pair( globalIndex_, globalKey ) );
33 LocalIndex localIndex_;
34 GlobalIndex globalIndex_;
41 template<
class Mapper,
class Entity,
class Functor >
44 PairFunctor (
const Mapper &mapper,
const Entity &entity, Functor functor )
45 : mapper_( mapper ), entity_( entity ), functor_(
std::move( functor ) )
48 template<
class LocalKey,
class GlobalKey >
49 void operator() (
const LocalKey &localKey,
const GlobalKey &globalKey )
const
51 mapper_.mapEach( entity_, IndexFunctor< Functor, LocalKey, GlobalKey >( functor_, localKey, globalKey ) );
55 const Mapper &mapper_;
56 const Entity &entity_;
64 template<
class Mapper,
class Entity,
class Functor >
65 PairFunctor< Mapper, Entity, Functor > makePairFunctor (
const Mapper &mapper,
const Entity &entity, Functor functor )
67 return PairFunctor< Mapper, Entity, Functor >( mapper, entity, std::move( functor ) );
Dune namespace.
Definition: alignedallocator.hh:13