dune-pdelab 2.7-git
Loading...
Searching...
No Matches
powercompositegridfunctionspacebase.hh
Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef DUNE_PDELAB_GRIDFUNCTIONSPACE_POWERCOMPOSITEGRIDFUNCTIONSPACEBASE_HH
4#define DUNE_PDELAB_GRIDFUNCTIONSPACE_POWERCOMPOSITEGRIDFUNCTIONSPACEBASE_HH
5
6#include <algorithm>
7#include <cstddef>
8#include <functional>
9#include <vector>
10
11#include <dune/typetree/fixedcapacitystack.hh>
12#include <dune/typetree/traversal.hh>
13#include <dune/typetree/traversalutilities.hh>
14#include <dune/typetree/utility.hh>
15#include <dune/typetree/transformation.hh>
16#include <dune/typetree/visitor.hh>
17
24
25namespace Dune {
26 namespace PDELab {
27
31
33 template<typename G, typename B, typename O, std::size_t k>
35 {
36 enum{
40 noChilds = k
41 };
42
43 const static std::size_t CHILDREN = k;
44
45 using EntitySet = G;
46
47 using GridView = typename EntitySet::GridView;
48
51
53 typedef B BackendType;
54
55 typedef B Backend;
56
58 typedef O MapperType;
59
60 typedef O OrderingTag;
61
63 typedef typename B::size_type SizeType;
64 };
65
67 template<typename GridFunctionSpace, typename GV, typename B, typename O, std::size_t k>
69 : public GridFunctionSpaceBase<
70 GridFunctionSpace,
71 PowerCompositeGridFunctionSpaceTraits<GV,B,O,k>
72 >
73 {
74
75#ifndef DOXYGEN
76
77 const GridFunctionSpace& gfs() const
78 {
79 return static_cast<const GridFunctionSpace&>(*this);
80 }
81
83 {
84 return static_cast<GridFunctionSpace&>(*this);
85 }
86
87#endif // DOXYGEN
88
89 public:
90
93
94 private:
95
97
98 public:
99
100 typedef O OrderingTag;
101
103 const typename Traits::GridView& gridView () const
104 {
105 return gfs().template child<0>().gridView();
106 }
107
109 const typename Traits::EntitySet& entitySet () const
110 {
111 return gfs().template child<0>().entitySet();
112 }
113
115 : BaseT(backend,ordering_tag)
116 {}
117
118 };
119
120 }
121
122}
124#endif // DUNE_PDELAB_GRIDFUNCTIONSPACE_POWERCOMPOSITEGRIDFUNCTIONSPACEBASE_HH
B Backend
Definition powercompositegridfunctionspacebase.hh:55
const Traits::EntitySet & entitySet() const
get grid view partition
Definition powercompositegridfunctionspacebase.hh:109
PowerCompositeGridFunctionSpaceTraits< GV, B, O, k > Traits
export traits class
Definition powercompositegridfunctionspacebase.hh:92
GridView GridViewType
the grid view where grid function is defined upon
Definition powercompositegridfunctionspacebase.hh:50
O OrderingTag
Definition powercompositegridfunctionspacebase.hh:100
B BackendType
vector backend
Definition powercompositegridfunctionspacebase.hh:53
const Traits::GridView & gridView() const
get grid view
Definition powercompositegridfunctionspacebase.hh:103
O OrderingTag
Definition powercompositegridfunctionspacebase.hh:60
B::size_type SizeType
short cut for size type exported by Backend
Definition powercompositegridfunctionspacebase.hh:63
PowerCompositeGridFunctionSpaceBase(const B &backend, const OrderingTag &ordering_tag)
Definition powercompositegridfunctionspacebase.hh:114
static const std::size_t CHILDREN
Definition powercompositegridfunctionspacebase.hh:43
O MapperType
mapper
Definition powercompositegridfunctionspacebase.hh:58
typename EntitySet::GridView GridView
Definition powercompositegridfunctionspacebase.hh:47
G EntitySet
Definition powercompositegridfunctionspacebase.hh:45
@ isComposite
True if this grid function space is composed of others.
Definition powercompositegridfunctionspacebase.hh:38
@ noChilds
number of child spaces
Definition powercompositegridfunctionspacebase.hh:40
For backward compatibility – Do not use this!
Definition adaptivity.hh:28
A grid function space.
Definition gridfunctionspace.hh:186
Definition gridfunctionspacebase.hh:136
Trait class for the multi component grid function spaces.
Definition powercompositegridfunctionspacebase.hh:35
Mixin class providing common functionality of PowerGridFunctionSpace and CompositeGridFunctionSpace.
Definition powercompositegridfunctionspacebase.hh:73