dune-fem  2.4.1-rc
lagrangepointsetexporter.hh
Go to the documentation of this file.
1 #ifndef DUNE_FEM_SPACE_COMBINEDSPACE_LAGRANGEPOINTSETEXPORTER_HH
2 #define DUNE_FEM_SPACE_COMBINEDSPACE_LAGRANGEPOINTSETEXPORTER_HH
3 
4 
5 namespace Dune
6 {
7 
8  namespace Fem
9  {
10 
11  namespace CombinedSpaceHelper
12  {
13 
14  // forward declaration of LagrangeDiscreteFunctionSpace
15  // ----------------------------------------------------
16  template< class FunctionSpaceImp,
17  class GridPartImp,
18  int polOrder,
19  template< class > class BasisFunctionStorageImp >
21 
22 
23 
24  // Helper class for combined space to extract the Lagrange Point Set
25  // for one of the contained spaces.
26  // -----------------------------------------------------------------
27 
28  template <class DFSpace>
30  {
31  // for arbitrary spaces nothing needs to be done
32  LagrangePointSetExporter( const DFSpace& spc ) {}
33  };
34 
35 
36  // specialization for Lagrange spaces
37  // ----------------------------------
38 
39  template <class FunctionSpaceImp, class GridPartImp, int polOrder, template <class> class BaseFunctionStorageImp >
41  LagrangeDiscreteFunctionSpace< FunctionSpaceImp, GridPartImp, polOrder, BaseFunctionStorageImp > >
42  {
43  // export the tpye of LagrangePointSet
45  typedef typename LagrangeSpaceType :: LagrangePointSetType LagrangePointSetType;
46 
47  LagrangePointSetExporter( const LagrangeSpaceType& spc )
48  : lagrangeSpace_( spc ) {}
49 
50  // return the lagrangepointset for a given entity
51  template <class Entity>
52  const LagrangePointSetType& lagrangePointSet( const Entity& entity ) const
53  {
54  return lagrangeSpace_.lagrangePointSet( entity );
55  }
56 
57  private:
58  const LagrangeSpaceType& lagrangeSpace_;
59  };
60 
61  } // namespace CombinedSpaceHelper
62 
63  } // namespace Fem
64 
65 } // namespace Dune
66 
67 #endif //#ifndef DUNE_FEM_SPACE_COMBINEDSPACE_LAGRANGEPOINTSETEXPORTER_HH
Definition: lagrangepointsetexporter.hh:20
const LagrangePointSetType & lagrangePointSet(const Entity &entity) const
Definition: lagrangepointsetexporter.hh:52
Definition: coordinate.hh:4
Definition: lagrangepointsetexporter.hh:29
LagrangePointSetExporter(const DFSpace &spc)
Definition: lagrangepointsetexporter.hh:32
LagrangeDiscreteFunctionSpace< FunctionSpaceImp, GridPartImp, polOrder, BaseFunctionStorageImp > LagrangeSpaceType
Definition: lagrangepointsetexporter.hh:44