DUNE PDELab (git)

powercompositegridfunctionspacebase.hh
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
18#include <dune/pdelab/constraints/common/constraintstransformation.hh>
19#include <dune/pdelab/constraints/noconstraints.hh>
20#include <dune/pdelab/gridfunctionspace/tags.hh>
21#include <dune/pdelab/gridfunctionspace/gridfunctionspacebase.hh>
22#include <dune/pdelab/ordering/lexicographicordering.hh>
23#include <dune/pdelab/ordering/entityblockedlocalordering.hh>
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
50 using GridViewType = GridView;
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
96 typedef GridFunctionSpaceBase<GridFunctionSpace,Traits> BaseT;
97
98 public:
99
100 typedef O OrderingTag;
101
103 const typename Traits::EntitySet& entitySet () const
104 {
105 if (not this->_entity_set)
106 return BaseT::_entity_set.emplace(gfs().template child<0>().entitySet());
107 return BaseT::entitySet();
108 }
109
111 typename Traits::EntitySet& entitySet ()
112 {
113 if (not this->_entity_set)
114 return BaseT::_entity_set.emplace(gfs().template child<0>().entitySet());
115 return BaseT::entitySet();
116 }
117
118 PowerCompositeGridFunctionSpaceBase(const B& backend, const OrderingTag& ordering_tag)
119 : BaseT(backend,ordering_tag)
120 {}
121
122 };
123
124 }
125
126}
128#endif // DUNE_PDELAB_GRIDFUNCTIONSPACE_POWERCOMPOSITEGRIDFUNCTIONSPACEBASE_HH
Grid view abstract base class.
Definition: gridview.hh:66
A grid function space.
Definition: gridfunctionspace.hh:191
Mixin class providing common functionality of PowerGridFunctionSpace and CompositeGridFunctionSpace.
Definition: powercompositegridfunctionspacebase.hh:73
const Traits::EntitySet & entitySet() const
get grid view partition
Definition: powercompositegridfunctionspacebase.hh:103
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
B BackendType
vector backend
Definition: powercompositegridfunctionspacebase.hh:53
B::size_type SizeType
short cut for size type exported by Backend
Definition: powercompositegridfunctionspacebase.hh:63
Traits::EntitySet & entitySet()
get grid view partition
Definition: powercompositegridfunctionspacebase.hh:111
O MapperType
mapper
Definition: powercompositegridfunctionspacebase.hh:58
@ isComposite
True if this grid function space is composed of others.
Definition: powercompositegridfunctionspacebase.hh:38
@ noChilds
number of child spaces
Definition: powercompositegridfunctionspacebase.hh:40
Dune namespace.
Definition: alignedallocator.hh:13
Trait class for the multi component grid function spaces.
Definition: powercompositegridfunctionspacebase.hh:35
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 12, 23:30, 2024)