From ba75cfa2bf8c938ec6b12412d20b5d6ada5554e7 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 22 Feb 2001 10:49:40 +0000 Subject: [PATCH] count_dofs_per_component git-svn-id: https://svn.dealii.org/trunk@4009 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/include/dofs/dof_tools.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/deal.II/deal.II/include/dofs/dof_tools.h b/deal.II/deal.II/include/dofs/dof_tools.h index 83cf803b55..a73fba6bc3 100644 --- a/deal.II/deal.II/include/dofs/dof_tools.h +++ b/deal.II/deal.II/include/dofs/dof_tools.h @@ -566,6 +566,30 @@ class DoFTools static void extract_hanging_node_dofs (const DoFHandler &dof_handler, std::vector &selected_dofs); + + /** + * Count how many degrees of + * freedom out of the total + * number belong to each + * components. If the number of + * components the finite element + * has (i.e. you only have one + * scalar variable), then the + * number in this component + * obviously equals the total + * number of degrees of + * freedom. Otherwise, the sum of + * the DoFs in all the components + * needs to equal the total + * number. + * + * The result is returned in the + * last argument. + */ + template + static void + count_dofs_per_component (const DoFHandler &dof_handler, + std::vector &dofs_per_component); /** * This function can be used when -- 2.39.5