From: bangerth Date: Mon, 13 Aug 2012 14:37:02 +0000 (+0000) Subject: Merge from upstream. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e454e9aa18f5f6bc4cd17c845ff899129f26d91;p=dealii-svn.git Merge from upstream. git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_3@25941 0785d39b-7218-0410-832d-ea1e28bc413d --- 1e454e9aa18f5f6bc4cd17c845ff899129f26d91 diff --cc deal.II/include/deal.II/multigrid/mg_tools.h index b1695498e0,b1695498e0..d968ab4c28 --- a/deal.II/include/deal.II/multigrid/mg_tools.h +++ b/deal.II/include/deal.II/multigrid/mg_tools.h @@@ -173,11 -173,11 +173,11 @@@ namespace MGTool * for each block (access is * result[level][block]). */ -- template ++ template void -- count_dofs_per_block (const MGDoFHandler &mg_dof, -- std::vector > &result, -- std::vector target_block = std::vector()); ++ count_dofs_per_block (const DH& dof_handler, ++ std::vector >& dofs_per_block, ++ std::vector target_block); /** * Count the dofs component-wise diff --cc deal.II/source/dofs/dof_tools.cc index b91603fb0c,b385dd908b..85c08f4f0e --- a/deal.II/source/dofs/dof_tools.cc +++ b/deal.II/source/dofs/dof_tools.cc @@@ -3463,40 -3471,54 +3471,54 @@@ namespace DoFTool inline void extract_dofs_by_component (const DH &dof, - const std::vector &component_select, - const bool sort_by_blocks, - std::vector &dofs_by_component) + const std::vector &component_select, + const bool sort_by_blocks, + std::vector &dofs_by_component) { const dealii::hp::FECollection - fe_collection (dof.get_fe()); + fe_collection (dof.get_fe()); Assert (fe_collection.n_components() < 256, ExcNotImplemented()); Assert (dofs_by_component.size() == dof.n_locally_owned_dofs(), - ExcDimensionMismatch(dofs_by_component.size(), - dof.n_locally_owned_dofs())); + ExcDimensionMismatch(dofs_by_component.size(), + dof.n_locally_owned_dofs())); - // next set up a table for the - // degrees of freedom on each of - // the cells whether it is - // something interesting or not + // next set up a table for the degrees + // of freedom on each of the cells + // (regardless of the fact whether it + // is listed in the component_select + // argument or not) + // + // for each element 'f' of the + // FECollection, + // local_component_association[f][d] + // then returns the vector component + // that degree of freedom 'd' belongs + // to (or, in the case of + // sort_by_blocks, the block that it + // corresponds to) std::vector > local_component_association - (fe_collection.size()); + (fe_collection.size()); for (unsigned int f=0; f &fe = - fe_collection[f]; - local_component_association[f].resize(fe.dofs_per_cell); - if (sort_by_blocks == true) - { - for (unsigned int i=0; i &fe = + fe_collection[f]; + local_component_association[f].resize(fe.dofs_per_cell); + if (sort_by_blocks == true) + // compute the block each + // local dof belongs to + { + for (unsigned int i=0; i