DUNE-FEM (unstable)

default.hh
1#ifndef DUNE_FEM_HPDG_SPACE_DISCONTINUOUSGALERKIN_DEFAULT_HH
2#define DUNE_FEM_HPDG_SPACE_DISCONTINUOUSGALERKIN_DEFAULT_HH
3
4#include <memory>
5
6#include <dune/grid/common/gridenums.hh>
7
8#include <dune/fem/operator/matrix/istlmatrixadapter.hh>
9#include <dune/fem/space/common/commoperations.hh>
10#include <dune/fem/space/common/defaultcommhandler.hh>
11#include <dune/fem/space/common/localrestrictprolong.hh>
12#include <dune/fem/space/discontinuousgalerkin/localrestrictprolong.hh>
13
14#include "blockmapper.hh"
15#include "space.hh"
16
17namespace Dune
18{
19
20 namespace Fem
21 {
22
23 namespace hpDG
24 {
25
26 // Internal forward declaration
27 // ----------------------------
28
29 template< class BasisFunctionSets >
30 class DefaultDiscontinuousGalerkinSpace;
31
32
33
34#ifndef DOXYGEN
35
36 // DefaultDiscontinuousGalerkinSpaceTraits
37 // ---------------------------------------
38
39 template< class BasisFunctionSets >
40 struct DefaultDiscontinuousGalerkinSpaceTraits
41 {
42 using DiscreteFunctionSpaceType = hpDG::DefaultDiscontinuousGalerkinSpace< BasisFunctionSets >;
43
44 using BasisFunctionSetsType = BasisFunctionSets;
45 using BasisFunctionSetType = typename BasisFunctionSetsType::BasisFunctionSetType;
46
47 using FunctionSpaceType = typename BasisFunctionSetType::FunctionSpaceType;
48 using GridPartType = typename BasisFunctionSetsType::GridPartType;
49
50 static const int codimension = BasisFunctionSetType::EntityType::codimension;
51
52 using BlockMapperType = hpDG::DiscontinuousGalerkinBlockMapper< GridPartType, BasisFunctionSetsType >;
53 static const int localBlockSize = BasisFunctionSetsType::localBlockSize;
54
55 template< class DiscreteFunction, class Operation = Dune::Fem::DFCommunicationOperation::Copy >
56 struct CommDataHandle
57 {
58 using OperationType = Operation;
60 };
61 };
62
63#endif // #ifndef DOXYGEN
64
65
66
67 // DefaultDiscontinuousGalerkinSpace
68 // ---------------------------------
69
76 template< class BasisFunctionSets >
78 : public hpDG::DiscontinuousGalerkinSpace< DefaultDiscontinuousGalerkinSpaceTraits< BasisFunctionSets > >
79 {
81
82 public:
88 using KeyType = typename BaseType::KeyType;
89
96 const KeyType &key,
99 : BaseType( gridPart, basisFunctionSets, key, interface, direction )
100 {}
101
103 };
104
105
106
107 // make_space
108 // ----------
109
124 template< class BasisFunctionSets >
125 std::unique_ptr< DefaultDiscontinuousGalerkinSpace< BasisFunctionSets > >
126 make_space ( typename BasisFunctionSets::GridPartType &gridPart,
127 const BasisFunctionSets &basisFunctionSets,
128 const typename BasisFunctionSets::KeyType &key,
131 {
132 using DiscreteFunctionSpaceType = DefaultDiscontinuousGalerkinSpace< BasisFunctionSets >;
133 return std::unique_ptr< DiscreteFunctionSpaceType >( new DiscreteFunctionSpaceType( gridPart, basisFunctionSets, key, interface, direction ) );
134 }
135
136 } // namespace hpDG
137
138
139
140#ifndef DOXYGEN
141
142 // DefaultLocalRestrictProlong
143 // ---------------------------
144
145 template< class BasisFunctionSets >
146 class DefaultLocalRestrictProlong< hpDG::DefaultDiscontinuousGalerkinSpace< BasisFunctionSets > >
147 : public DiscontinuousGalerkinLocalRestrictProlong< hpDG::DefaultDiscontinuousGalerkinSpace< BasisFunctionSets >, !BasisFunctionSets::orthogonal() >
148 {
149 using BaseType = DiscontinuousGalerkinLocalRestrictProlong< hpDG::DefaultDiscontinuousGalerkinSpace< BasisFunctionSets >, !BasisFunctionSets::orthogonal() >;
150
151 public:
152 explicit DefaultLocalRestrictProlong ( const typename BaseType::DiscreteFunctionSpaceType &space )
153 : BaseType( space )
154 {}
155 };
156
157
158
159#endif // #ifndef DOXYGEN
160
161 } // namespace Fem
162
163} // namespace Dune
164
165#endif // #ifndef DUNE_FEM_HPDG_SPACE_DISCONTINUOUSGALERKIN_DEFAULT_HH
interface class representing a family of basis function sets
Definition: basisfunctionsets.hh:24
Default communication handler for discrete functions.
Definition: defaultcommhandler.hh:38
A vector valued function space.
Definition: functionspace.hh:60
typename Traits::KeyType KeyType
key type
Definition: basisfunctionsets.hh:39
typename Traits::GridPartType GridPartType
grid part type
Definition: basisfunctionsets.hh:36
Default implementation of an -adaptive discrete function space given a family of local basis function...
Definition: default.hh:79
typename BaseType::KeyType KeyType
key type identifying a basis function set
Definition: default.hh:88
typename BaseType::GridPartType GridPartType
grid part type
Definition: default.hh:84
typename BaseType::BasisFunctionSetsType BasisFunctionSetsType
basis function sets type
Definition: default.hh:86
Generic implementation of a -adaptive discontinuous finite element space.
Definition: space.hh:46
const KeyType & key(const EntityType &entity) const
get identifiying basis function set key assigned to given entity
Definition: space.hh:231
typename Traits::BasisFunctionSetsType BasisFunctionSetsType
basis function sets type
Definition: space.hh:56
typename BasisFunctionSetsType::KeyType KeyType
key type identifying a basis function set
Definition: space.hh:58
typename BaseType::GridPartType GridPartType
grid part type
Definition: space.hh:51
const BasisFunctionSetsType & basisFunctionSets() const
return basis function sets
Definition: space.hh:287
CommunicationDirection
Define a type for communication direction parameter.
Definition: gridenums.hh:170
InterfaceType
Parameter to be used for the communication functions.
Definition: gridenums.hh:86
@ ForwardCommunication
communicate as given in InterfaceType
Definition: gridenums.hh:171
@ InteriorBorder_All_Interface
send interior and border, receive all entities
Definition: gridenums.hh:88
Dune namespace.
Definition: alignedallocator.hh:13
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 21, 23:30, 2024)