From 56f9043d17dcc45b4c890af92271e24722fd07fc Mon Sep 17 00:00:00 2001 From: David Wells Date: Sun, 1 Jan 2017 23:34:21 -0500 Subject: [PATCH] Group DoFTools coupling functions together. --- include/deal.II/dofs/dof_tools.h | 113 +++++++++++++++++-------------- 1 file changed, 61 insertions(+), 52 deletions(-) diff --git a/include/deal.II/dofs/dof_tools.h b/include/deal.II/dofs/dof_tools.h index f5bbe4199c..a92426e15c 100644 --- a/include/deal.II/dofs/dof_tools.h +++ b/include/deal.II/dofs/dof_tools.h @@ -175,6 +175,7 @@ namespace GridTools */ namespace DoFTools { + /** * The flags used in tables by certain make_*_pattern functions to * describe whether two components of the solution couple in the bilinear @@ -204,6 +205,66 @@ namespace DoFTools nonzero }; + /** + * @name DoF couplings + * @{ + */ + + /** + * Map a coupling table from the user friendly organization by components to + * the organization by blocks. Specializations of this function for + * DoFHandler and hp::DoFHandler are required due to the different results + * of their finite element access. + * + * The return vector will be initialized to the correct length inside this + * function. + */ + template + void + convert_couplings_to_blocks (const hp::DoFHandler &dof_handler, + const Table<2, Coupling> &table_by_component, + std::vector > &tables_by_block); + + /** + * Map a coupling table from the user friendly organization by components to + * the organization by blocks. Specializations of this function for + * DoFHandler and hp::DoFHandler are required due to the different results + * of their finite element access. + * + * The return vector will be initialized to the correct length inside this + * function. + */ + template + void + convert_couplings_to_blocks (const DoFHandler &dof_handler, + const Table<2, Coupling> &table_by_component, + std::vector > &tables_by_block); + + /** + * Given a finite element and a table how the vector components of it couple + * with each other, compute and return a table that describes how the + * individual shape functions couple with each other. + */ + template + Table<2,Coupling> + dof_couplings_from_component_couplings (const FiniteElement &fe, + const Table<2,Coupling> &component_couplings); + + /** + * Same function as above for a collection of finite elements, returning a + * collection of tables. + * + * The function currently treats DoFTools::Couplings::nonzero the same as + * DoFTools::Couplings::always . + */ + template + std::vector > + dof_couplings_from_component_couplings (const hp::FECollection &fe, + const Table<2,Coupling> &component_couplings); + /** + * @} + */ + /** * Take a vector of values which live on cells (e.g. an error per cell) and * distribute it to the dofs in such a way that a finite element field @@ -2226,21 +2287,6 @@ namespace DoFTools const std::map > &support_points); - /** - * Map a coupling table from the user friendly organization by components to - * the organization by blocks. Specializations of this function for - * DoFHandler and hp::DoFHandler are required due to the different results - * of their finite element access. - * - * The return vector will be initialized to the correct length inside this - * function. - */ - template - void - convert_couplings_to_blocks (const hp::DoFHandler &dof_handler, - const Table<2, Coupling> &table_by_component, - std::vector > &tables_by_block); - /** * Make a constraint matrix for the constraints that result from zero * boundary values on the given boundary indicator. @@ -2304,43 +2350,6 @@ namespace DoFTools ConstraintMatrix &zero_boundary_constraints, const ComponentMask &component_mask = ComponentMask()); - - /** - * Map a coupling table from the user friendly organization by components to - * the organization by blocks. Specializations of this function for - * DoFHandler and hp::DoFHandler are required due to the different results - * of their finite element access. - * - * The return vector will be initialized to the correct length inside this - * function. - */ - template - void - convert_couplings_to_blocks (const DoFHandler &dof_handler, - const Table<2, Coupling> &table_by_component, - std::vector > &tables_by_block); - - /** - * Given a finite element and a table how the vector components of it couple - * with each other, compute and return a table that describes how the - * individual shape functions couple with each other. - */ - template - Table<2,Coupling> - dof_couplings_from_component_couplings (const FiniteElement &fe, - const Table<2,Coupling> &component_couplings); - - /** - * Same function as above for a collection of finite elements, returning a - * collection of tables. - * - * The function currently treats DoFTools::Couplings::nonzero the same as - * DoFTools::Couplings::always . - */ - template - std::vector > - dof_couplings_from_component_couplings (const hp::FECollection &fe, - const Table<2,Coupling> &component_couplings); /** * @todo Write description * -- 2.39.5