3 #ifndef DUNE_PDELAB_GRIDFUNCTIONSPACE_SUBSPACELOCALFUNCTIONSPACE_HH
4 #define DUNE_PDELAB_GRIDFUNCTIONSPACE_SUBSPACELOCALFUNCTIONSPACE_HH
26 void extract_tree_path_elements(TypeTree::StaticTreePath<>, It it)
31 template<
typename TP,
typename It>
32 void extract_tree_path_elements(TP, It it)
35 extract_tree_path_elements(
typename TypeTree::TreePathPopBack<TP>::type(),++it);
44 template<
typename GFS,
typename LFS>
45 class SubSpaceLocalFunctionSpaceNode
51 typedef typename LFS::Traits Traits;
53 template<
typename... T>
54 SubSpaceLocalFunctionSpaceNode(T&&... t)
55 : LFS(std::forward<T>(t)...)
57 extract_tree_path_elements(
typename GFS::SubSpacePath(),_tree_path.begin());
65 for (
auto di= this->_dof_index_storage.begin(), end=this->_dof_index_storage.end();
67 complete_dof_index(*di);
70 std::size_t subSpaceDepth()
const
72 return this->gridFunctionSpace().subSpaceDepth();
78 void complete_dof_index(
typename Traits::DOFIndex& di)
const
80 std::copy(_tree_path.begin(),_tree_path.end(),std::back_inserter(di.treeIndex()));
88 template<
typename GFS,
typename TreePath>
96 template <
typename BaseGFS,
typename SubSpaceTreePath>
98 :
public gfs::SubSpaceLocalFunctionSpaceNode<gfs::GridFunctionSubSpace<BaseGFS,SubSpaceTreePath>,
99 typename TypeTree::TransformTree<
100 gfs::GridFunctionSubSpace<BaseGFS,SubSpaceTreePath>,
101 gfs_to_lfs<gfs::GridFunctionSubSpace<
110 typedef gfs::GridFunctionSubSpace<BaseGFS,SubSpaceTreePath> GFS;
112 typedef gfs::SubSpaceLocalFunctionSpaceNode<
114 typename TypeTree::TransformTree<
126 template<
typename,
bool>
129 template<
typename,
bool>
135 : BaseT(TypeTree::TransformTree<GFS,gfs_to_lfs<GFS> >::transform(gfs))
137 this->_dof_indices = &(this->_dof_index_storage);
142 : BaseT(*TypeTree::TransformTree<GFS,gfs_to_lfs<GFS> >::transform_storage(pgfs))
144 this->_dof_indices = &(this->_dof_index_storage);
154 this->_dof_indices = &(this->_dof_index_storage);
165 #endif // DUNE_PDELAB_GRIDFUNCTIONSPACE_SUBSPACELOCALFUNCTIONSPACE_HH