1#ifndef DUNE_FEM_FUNCTION_TUPLEDISCRETEFUNCTION_FUNCTOR_HH 
    2#define DUNE_FEM_FUNCTION_TUPLEDISCRETEFUNCTION_FUNCTOR_HH 
    4#include <dune/fem/function/common/functor.hh> 
    5#include <dune/fem/function/tuplediscretefunction/dofvector.hh> 
   17    template< 
class ... DofVectors, 
class Functor >
 
   18    struct DofBlockFunctor< TupleDofVector< DofVectors ... >, Functor >
 
   20      typedef TupleDofVector< DofVectors ... > DofVector;
 
   21      DofBlockFunctor ( DofVector &dofVector, Functor 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 >
 
   45    struct DofBlockFunctor< const TupleDofVector< DofVectors ... >, Functor >
 
   47      typedef TupleDofVector< DofVectors ... > DofVector;
 
   48      DofBlockFunctor ( 
const DofVector &dofVector, Functor 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_;
 
Dune namespace.
Definition: alignedallocator.hh:13