1#ifndef DUNE_FEM_FUNCTION_TUPLEDISCRETEFUNCTION_FUNCTOR_HH
2#define DUNE_FEM_FUNCTION_TUPLEDISCRETEFUNCTION_FUNCTOR_HH
17 template<
class ... DofVectors,
class Functor >
22 : dofVector_( dofVector ), functor_(
std::move( functor ) ) {}
24 template<
class GlobalKey >
25 void operator() ( std::size_t local,
const GlobalKey &globalKey )
const
27 const int localBlockSize
28 = std::decay< decltype( std::get< GlobalKey::component() >( dofVector_ ) ) >::type::blockSize;
30 const int index = globalKey.index();
32 std::get< GlobalKey::component() >( dofVector_ ) [ index / localBlockSize ][ index % localBlockSize ] );
36 DofVector &dofVector_;
44 template<
class ... DofVectors,
class Functor >
49 : dofVector_( dofVector ), functor_(
std::move( functor ) ) {}
51 template<
class GlobalKey >
52 void operator() ( std::size_t local,
const GlobalKey &globalKey )
const
54 const int localBlockSize
55 = std::decay< decltype( std::get< GlobalKey::component() >( dofVector_ ) ) >::type::blockSize;
57 const int index = globalKey.index();
59 std::get< GlobalKey::component() >( dofVector_ ) [ index / localBlockSize ][ index % localBlockSize ] );
63 const DofVector &dofVector_;
Definition: bindguard.hh:11
Definition: function/common/functor.hh:106
void operator()(std::size_t local, const GlobalKey &globalKey) const
Definition: function/common/functor.hh:115
Definition: tuplediscretefunction/dofvector.hh:30
DofBlockFunctor(DofVector &dofVector, Functor functor)
Definition: function/tuplediscretefunction/functor.hh:21
TupleDofVector< DofVectors ... > DofVector
Definition: function/tuplediscretefunction/functor.hh:20
DofBlockFunctor(const DofVector &dofVector, Functor functor)
Definition: function/tuplediscretefunction/functor.hh:48
TupleDofVector< DofVectors ... > DofVector
Definition: function/tuplediscretefunction/functor.hh:47