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<
125 template<
typename,
bool>
128 template<
typename,
bool>
134 : BaseT(TypeTree::TransformTree<GFS,gfs_to_lfs<GFS> >::transform(gfs))
136 this->_dof_indices = &(this->_dof_index_storage);
141 : BaseT(TypeTree::TransformTree<GFS,gfs_to_lfs<GFS> >::transform_storage(pgfs))
143 this->_dof_indices = &(this->_dof_index_storage);
153 this->_dof_indices = &(this->_dof_index_storage);
164 #endif // DUNE_PDELAB_GRIDFUNCTIONSPACE_SUBSPACELOCALFUNCTIONSPACE_HH