dune-fem 2.8.0
Loading...
Searching...
No Matches
fourier/space.hh
Go to the documentation of this file.
1#ifndef DUNE_FEM_SPACE_FOURIER_SPACE_HH
2#define DUNE_FEM_SPACE_FOURIER_SPACE_HH
3
4#include <cassert>
5#include <limits>
6
16
22
23namespace Dune
24{
25
26 namespace Fem
27 {
28
29 // FourierDiscreteFunctionSpaceTraits
30 // ----------------------------------
31
32 template< class FunctionSpace, class GridPart, int order >
34 {
36
37 typedef GridPart GridPartType;
39
40 static const int codimension = 0;
41 typedef typename GridPartType::template Codim< codimension >::EntityType EntityType;
42
43 typedef typename FunctionSpaceType::ScalarFunctionSpaceType ScalarFunctionSpaceType;
48
50
52
54
55 template< class DiscreteFunction, class Operation = Dune::Fem::DFCommunicationOperation::Add >
57 {
59 typedef Operation OperationType;
60 };
61 };
62
63
64
65 // FourierDiscreteFunctionSpace
66 // ----------------------------
67
68 template< class FunctionSpace, class GridPart, int Order >
70 : public DiscreteFunctionSpaceDefault< FourierDiscreteFunctionSpaceTraits< FunctionSpace, GridPart, Order > >
71 {
74
75 public:
76 typedef typename BaseType::Traits Traits;
77
78 static const int polynomialOrder = Order+1;
79
84
86
89
91
92 protected:
93 static const InterfaceType defaultInterface = InteriorBorder_All_Interface;
94 static const CommunicationDirection defaultDirection = ForwardCommunication;
95
96 public:
97 using BaseType::order;
98
100 int order = std::numeric_limits< int >::max(),
101 const InterfaceType commInterface = defaultInterface,
102 const CommunicationDirection commDirection = defaultDirection )
103 : BaseType( gridPart, commInterface, commDirection ),
104 functionSet_( order )
105 {}
106
109
112 {
113 typedef typename Traits::LocalFunctionSetType LocalFunctionSetType;
115 return BasisFunctionSetType( ScalarBasisFunctionSetType( LocalFunctionSetType( entity, &functionSet_ ) ) );
116 }
117
119 bool continuous () const { return true; }
120
122 bool continuous ( const IntersectionType &intersection ) const { return true; }
123
125 int order () const { return functionSet_.order(); }
126
128 BlockMapperType &blockMapper () const { return blockMapper_; }
129
130 const FunctionSetType &functionSet () const { return functionSet_; }
131
132 private:
133 mutable BlockMapperType blockMapper_;
134 FunctionSetType functionSet_;
135 };
136
137 } // namespace Fem
138
139} // namespace Dune
140
141#endif // #ifndef DUNE_FEM_SPACE_FOURIER_SPACE_HH
DFSpaceIdentifier
enumerator for identification of spaces
Definition: discretefunctionspace.hh:94
@ FourierSpace_id
id for Fourier space
Definition: discretefunctionspace.hh:99
Definition: bindguard.hh:11
typename Impl::GridFunctionSpace< GridPart, T >::Type GridFunctionSpace
Definition: functionspace.hh:317
Definition: hybrid.hh:86
Proxy for a FunctionSet.
Definition: function/common/functionset.hh:117
convert (global) function set to local function set
Definition: localfunctionsetadapter.hh:27
This class is a simple basis function set which is needed for global basis functions sets (Fourier sp...
Definition: space/basisfunctionset/simple.hh:32
Builds a vectorial basis function set from given scalar basis function set.
Definition: basisfunctionset/vectorial.hh:279
Default communication handler for discrete functions.
Definition: defaultcommhandler.hh:29
Traits::FunctionSpaceType FunctionSpaceType
type of function space
Definition: discretefunctionspace.hh:193
Traits::BasisFunctionSetType BasisFunctionSetType
type of basis function set of this space
Definition: discretefunctionspace.hh:200
GridPartType::IntersectionType IntersectionType
type of the intersections
Definition: discretefunctionspace.hh:225
int order() const
get global order of space
Definition: discretefunctionspace.hh:345
This is the class with default implementations for discrete function. The methods not marked with hav...
Definition: discretefunctionspace.hh:628
Definition: fourier/space.hh:71
BasisFunctionSetType basisFunctionSet(const EntityType &entity) const
get basis function set for given entity
Definition: fourier/space.hh:111
BaseType::BlockMapperType BlockMapperType
Definition: fourier/space.hh:90
const FunctionSetType & functionSet() const
Definition: fourier/space.hh:130
DFSpaceIdentifier type() const
return type identifier of discrete function space
Definition: fourier/space.hh:108
static const int polynomialOrder
Definition: fourier/space.hh:78
BaseType::IntersectionType IntersectionType
Definition: fourier/space.hh:83
static const InterfaceType defaultInterface
Definition: fourier/space.hh:93
BaseType::FunctionSpaceType FunctionSpaceType
Definition: fourier/space.hh:80
FourierDiscreteFunctionSpace(GridPartType &gridPart, int order=std::numeric_limits< int >::max(), const InterfaceType commInterface=defaultInterface, const CommunicationDirection commDirection=defaultDirection)
Definition: fourier/space.hh:99
BlockMapperType & blockMapper() const
get a reference to the block mapper
Definition: fourier/space.hh:128
Traits::ScalarBasisFunctionSetType ScalarBasisFunctionSetType
Definition: fourier/space.hh:87
Traits::FunctionSetType FunctionSetType
Definition: fourier/space.hh:85
BaseType::GridPartType GridPartType
Definition: fourier/space.hh:81
static const CommunicationDirection defaultDirection
Definition: fourier/space.hh:94
BaseType::BasisFunctionSetType BasisFunctionSetType
Definition: fourier/space.hh:88
bool continuous() const
returns true if the space contains only globally continuous functions
Definition: fourier/space.hh:119
int order() const
get global order of space
Definition: fourier/space.hh:125
BaseType::Traits Traits
Definition: fourier/space.hh:76
BaseType::EntityType EntityType
Definition: fourier/space.hh:82
bool continuous(const IntersectionType &intersection) const
returns true if the space contains only globally continuous functions
Definition: fourier/space.hh:122
Definition: fourier/dofmapper.hh:43
Definition: space/fourier/functionset.hh:38
Definition: fourier/space.hh:34
FunctionSetProxy< FunctionSetType > FunctionSetProxyType
Definition: fourier/space.hh:45
FourierDiscreteFunctionSpace< FunctionSpace, GridPart, order > DiscreteFunctionSpaceType
Definition: fourier/space.hh:35
SimpleBasisFunctionSet< LocalFunctionSetType > ScalarBasisFunctionSetType
Definition: fourier/space.hh:47
FunctionSpaceType::ScalarFunctionSpaceType ScalarFunctionSpaceType
Definition: fourier/space.hh:43
FourierFunctionSet< ScalarFunctionSpaceType, order > FunctionSetType
Definition: fourier/space.hh:44
static const int codimension
Definition: fourier/space.hh:40
Hybrid::IndexRange< int, FunctionSpaceType::dimRange *FourierFunctionSetSize< FunctionSpaceType::dimDomain, order >::v > LocalBlockIndices
Definition: fourier/space.hh:51
GridFunctionSpace< GridPartType, FunctionSpace > FunctionSpaceType
Definition: fourier/space.hh:38
FourierDofMapper< GridPartType, order > BlockMapperType
Definition: fourier/space.hh:53
VectorialBasisFunctionSet< ScalarBasisFunctionSetType, typename FunctionSpaceType::RangeType > BasisFunctionSetType
Definition: fourier/space.hh:49
LocalFunctionSetAdapter< EntityType, FunctionSetProxyType > LocalFunctionSetType
Definition: fourier/space.hh:46
GridPart GridPartType
Definition: fourier/space.hh:37
GridPartType::template Codim< codimension >::EntityType EntityType
Definition: fourier/space.hh:41
Dune::Fem::DefaultCommunicationHandler< DiscreteFunction, Operation > Type
Definition: fourier/space.hh:58
Operation OperationType
Definition: fourier/space.hh:59