3 #ifndef DUNE_PDELAB_GRIDFUNCTIONSPACE_SUBSPACELOCALFUNCTIONSPACE_HH 4 #define DUNE_PDELAB_GRIDFUNCTIONSPACE_SUBSPACELOCALFUNCTIONSPACE_HH 25 void extract_tree_path_elements(TypeTree::TreePath<>, It it)
30 template<
typename TP,
typename It>
31 void extract_tree_path_elements(TP, It it)
34 extract_tree_path_elements(
typename TypeTree::TreePathPopBack<TP>::type(),++it);
43 template<
typename GFS,
typename LFS>
44 class SubSpaceLocalFunctionSpaceNode
50 typedef typename LFS::Traits Traits;
52 template<
typename... T>
53 SubSpaceLocalFunctionSpaceNode(T&&... t)
54 : LFS(
std::forward<T>(t)...)
56 extract_tree_path_elements(
typename GFS::SubSpacePath(),_tree_path.begin());
64 for (
auto di= this->_dof_index_storage.begin(), end=this->_dof_index_storage.end();
66 complete_dof_index(*di);
69 std::size_t subSpaceDepth()
const 71 return this->gridFunctionSpace().subSpaceDepth();
77 void complete_dof_index(
typename Traits::DOFIndex& di)
const 79 std::copy(_tree_path.begin(),_tree_path.end(),std::back_inserter(di.treeIndex()));
87 template<
typename GFS,
typename TreePath>
95 template <
typename BaseGFS,
typename SubSpaceTreePath>
97 :
public gfs::SubSpaceLocalFunctionSpaceNode<gfs::GridFunctionSubSpace<BaseGFS,SubSpaceTreePath>,
98 typename TypeTree::TransformTree<
99 gfs::GridFunctionSubSpace<BaseGFS,SubSpaceTreePath>,
100 gfs_to_lfs<gfs::GridFunctionSubSpace<
109 typedef gfs::GridFunctionSubSpace<BaseGFS,SubSpaceTreePath> GFS;
111 typedef gfs::SubSpaceLocalFunctionSpaceNode<
113 typename TypeTree::TransformTree<
120 friend struct PropagateGlobalStorageVisitor;
123 friend struct ClearSizeVisitor;
126 friend struct ComputeSizeVisitor;
129 friend struct FillIndicesVisitor;
133 LocalFunctionSpace(
const GFS & gfs)
134 : BaseT(TypeTree::TransformTree<GFS,gfs_to_lfs<GFS> >::transform(gfs))
136 this->_dof_indices = &(this->_dof_index_storage);
140 LocalFunctionSpace(std::shared_ptr<const GFS> pgfs)
141 : BaseT(TypeTree::TransformTree<GFS,gfs_to_lfs<GFS> >::transform_storage(pgfs))
143 this->_dof_indices = &(this->_dof_index_storage);
147 LocalFunctionSpace(
const LocalFunctionSpace & lfs)
153 this->_dof_indices = &(this->_dof_index_storage);
164 #endif // DUNE_PDELAB_GRIDFUNCTIONSPACE_SUBSPACELOCALFUNCTIONSPACE_HH
gfs::GridFunctionSubSpace< GFS, TreePath > GridFunctionSubSpace
Non-nesting implementation of GridFunctionSubSpace.
Definition: subspace.hh:568
static const unsigned int value
Definition: gridfunctionspace/tags.hh:177
Definition: adaptivity.hh:27
const Entity & e
Definition: localfunctionspace.hh:111