From: MichaƂ Wichrowski Date: Thu, 17 Apr 2025 11:45:39 +0000 (+0200) Subject: fix typos, improve doc X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd546908d610da019fa91a5fb8bebc12bfafd738;p=dealii.git fix typos, improve doc --- diff --git a/include/deal.II/numerics/matrix_creator.h b/include/deal.II/numerics/matrix_creator.h index 1745ca76e3..864d2818bd 100644 --- a/include/deal.II/numerics/matrix_creator.h +++ b/include/deal.II/numerics/matrix_creator.h @@ -612,11 +612,12 @@ namespace MatrixCreator * element size). * * @param include_endpoints A pair of booleans indicating whether to include - * the first and last dof in the matrix. Setting either one to false only - * makes sense if the idexing of DoF in the matrix is lexicographic, i.e. for - * FE_Q numbering is required while FE_DGQ can be precessed as it is. + * the first and last dof in the matrix. By excluding those DoFs, one can set + * a Dirichlet BC on either side. Setting either one to false only makes sense + * if the indexing of DoFs in the matrix is lexicographic, i.e., for FE_Q + * numbering is required, while FE_DGQ can be processed as it is. * - * @param numbering A vector of unsigned integers representing the + * @param numbering A vector of unsigned integers representing the * numbering of the degrees of freedom. If empty, the * numbering of the finite element is used. * @@ -634,17 +635,19 @@ namespace MatrixCreator /** * Computes a 1D cell derivative matrix for a given finite element. + * * @param fe The finite element object defining the shape functions. * - * @param h The cell size used to scale the integration (typically the + * @param h The cell size used to scale the integration (typically the * element size). * * @param include_endpoints A pair of booleans indicating whether to include - * the first and last dof in the matrix. Setting either one to false only - * makes sense if the idexing of DoF in the matrix is lexicographic, i.e. for - * FE_Q numbering is required while FE_DGQ can be precessed as it is. + * the first and last dof in the matrix. By excluding those DoFs, one can set + * a Dirichlet BC on either side. Setting either one to false only makes sense + * if the indexing of DoFs in the matrix is lexicographic, i.e., for FE_Q + * numbering is required, while FE_DGQ can be processed as it is. * - * @param numbering A vector of unsigned integers representing the + * @param numbering A vector of unsigned integers representing the * numbering of the degrees of freedom. If empty, the * numbering of the finite element is used. */ diff --git a/source/numerics/matrix_creator.cc b/source/numerics/matrix_creator.cc index 425abd8eac..fbb9972864 100644 --- a/source/numerics/matrix_creator.cc +++ b/source/numerics/matrix_creator.cc @@ -40,7 +40,7 @@ namespace MatrixCreator Assert( include_endpoints.first == true && include_endpoints.second == true, ExcMessage( - "You tried to genereate a 1D mass matrix with excluding boundary " + "You tried to generate a 1D mass matrix with excluding boundary " "dofs for a non-DGQ element without providing a numbering.")); } @@ -82,6 +82,16 @@ namespace MatrixCreator const std::pair include_endpoints, std::vector numbering) { + if (dynamic_cast *>(&fe) == nullptr && + numbering.size() == 0) + { + Assert( + include_endpoints.first == true && include_endpoints.second == true, + ExcMessage( + "You tried to generate a 1D derivative matrix with excluding boundary " + "dofs for a non-DGQ element without providing a numbering.")); + } + if (numbering.size() == 0) { numbering.resize(fe.dofs_per_cell);