dune-fem  2.8-git
dataprojection/dataprojection.hh
Go to the documentation of this file.
1 #ifndef DUNE_FEM_HPDG_SPACE_COMMON_DATAPROJECTION_HH
2 #define DUNE_FEM_HPDG_SPACE_COMMON_DATAPROJECTION_HH
3 
4 #include <cstddef>
5 
6 #include <vector>
7 
8 namespace Dune
9 {
10 
11  namespace Fem
12  {
13 
14  namespace hpDG
15  {
16 
17  // DataProjection
18  // --------------
19 
27  template< class DiscreteFunctionSpace, class Implementation >
29  {
31 
32  public:
36  using BasisFunctionSetType = typename DiscreteFunctionSpaceType::BasisFunctionSetType;
38  using EntityType = typename BasisFunctionSetType::EntityType;
39 
40  protected:
42 
43  public:
48  DataProjection ( DataProjection && ) = default;
49 
51 
58  DataProjection ( const ThisType & ) = delete;
59 
60  ThisType &operator= ( const ThisType & ) = delete;
61 
76  void operator() ( const EntityType &entity,
77  const BasisFunctionSetType &prior,
78  const BasisFunctionSetType &present,
79  const std::vector< std::size_t > &origin,
80  const std::vector< std::size_t > &destination )
81  {
82  asImp()( entity, prior, present, origin, destination );
83  }
84 
89  template <class TemporaryStorage>
90  void operator () ( TemporaryStorage& tmp )
91  {
92  asImp()( tmp );
93  }
94 
99  template< class Communicator >
100  void addToList ( Communicator &comm )
101  {
102  asImp().addToList( comm );
103  }
104 
107  protected:
108  Implementation &asImp () { return static_cast< Implementation & >( *this ); }
109 
110  const Implementation &asImp () const { return static_cast< const Implementation & >( *this ); }
111  };
112 
113  } // namespace hpDG
114 
115  // forward types to Fem namespace for convenience
116  using hpDG::DataProjection ;
117 
118  } // namespace Fem
119 
120 } // namespace Dune
121 
122 #endif // #ifndef DUNE_FEM_HPDG_SPACE_COMMON_DATAPROJECTION_HH
Definition: bindguard.hh:11
Abstract definition of the local restriction and prolongation of discrete functions.
Definition: dataprojection/dataprojection.hh:29
void operator()(const EntityType &entity, const BasisFunctionSetType &prior, const BasisFunctionSetType &present, const std::vector< std::size_t > &origin, const std::vector< std::size_t > &destination)
please doc me
Definition: dataprojection/dataprojection.hh:76
typename BasisFunctionSetType::EntityType EntityType
entity type
Definition: dataprojection/dataprojection.hh:38
DataProjection & operator=(DataProjection &&)=default
const Implementation & asImp() const
Definition: dataprojection/dataprojection.hh:110
Implementation & asImp()
Definition: dataprojection/dataprojection.hh:108
DataProjection(const ThisType &)=delete
DataProjection(DataProjection &&)=default
typename DiscreteFunctionSpaceType::BasisFunctionSetType BasisFunctionSetType
basis function set type
Definition: dataprojection/dataprojection.hh:36
DataProjection()
Definition: dataprojection/dataprojection.hh:41
void addToList(Communicator &comm)
add discrete function to communicator
Definition: dataprojection/dataprojection.hh:100
discrete function space