From: Wolfgang Bangerth Date: Mon, 2 Mar 2020 03:40:12 +0000 (-0700) Subject: Introduce types::global_cell_index. X-Git-Tag: v9.2.0-rc1~461^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ec6aa676a27956a07f513585f407a954678ae52;p=dealii.git Introduce types::global_cell_index. While there, also clean up a bit of the documentation around that point in the file. --- diff --git a/include/deal.II/base/types.h b/include/deal.II/base/types.h index 48ff55ac0d..d76b48da40 100644 --- a/include/deal.II/base/types.h +++ b/include/deal.II/base/types.h @@ -56,13 +56,17 @@ namespace types #ifdef DEAL_II_WITH_64BIT_INDICES /** - * The type used for global indices of degrees of freedom. While in - * sequential computations the 4 billion indices of 32-bit unsigned integers - * is plenty, parallel computations using the + * The type used to denote the global index of degrees of freedom. This + * type is then also used for querying the global *number* of degrees + * of freedom, since the number is simply the largest index plus one. + * + * While in sequential computations the 4 billion indices of 32-bit unsigned + * integers is plenty, parallel computations using (for example) the * parallel::distributed::Triangulation class can overflow this number and - * we need a bigger index space. + * consequently, deal.II chooses a larger integer type when + * configured to use 64-bit indices. * - * The data type always indicates an unsigned integer type. + * The data type always corresponds to an unsigned integer type. * * See the * @ref GlobalDoFIndex @@ -78,13 +82,21 @@ namespace types #else /** - * The type used for global indices of degrees of freedom. While in - * sequential computations the 4 billion indices of 32-bit unsigned integers - * is plenty, parallel computations using the + * The type used to denote the global index of degrees of freedom. This + * type is then also used for querying the global *number* of degrees + * of freedom, since the number is simply the largest index plus one. + * + * While in sequential computations the 4 billion indices of 32-bit unsigned + * integers is plenty, parallel computations using (for example) the * parallel::distributed::Triangulation class can overflow this number and - * we need a bigger index space. + * consequently, deal.II chooses a larger integer type when + * configured to use 64-bit indices. * - * The data type always indicates an unsigned integer type. + * The data type always corresponds to an unsigned integer type. + * + * See the + * @ref GlobalDoFIndex + * page for guidance on when this type should or should not be used. */ using global_dof_index = unsigned int; @@ -95,19 +107,30 @@ namespace types # define DEAL_II_DOF_INDEX_MPI_TYPE MPI_UNSIGNED #endif -#ifdef DEAL_II_WITH_64BIT_INDICES /** - * The type used for coarse-cell ids. See the glossary - * entry on @ref GlossCoarseCellId "coarse cell IDs" for more information. + * The type used to denote the global index of a cell. This type + * is then also used for querying the global *number* of cells in + * a triangulation since the number is simply the largest index plus one. + * + * While in sequential computations the 4 billion indices of 32-bit unsigned + * integers is plenty, parallel computations using (for example) the + * parallel::distributed::Triangulation class can overflow this number and + * consequently, deal.II chooses a larger integer type when + * configured to use 64-bit indices. + * + * The data type always corresponds to an unsigned integer type. */ - using coarse_cell_id = uint64_t; +#ifdef DEAL_II_WITH_64BIT_INDICES + using global_cell_index = uint64_t; #else + using global_cell_index = unsigned int; +#endif + /** * The type used for coarse-cell ids. See the glossary * entry on @ref GlossCoarseCellId "coarse cell IDs" for more information. */ - using coarse_cell_id = unsigned int; -#endif + using coarse_cell_id = global_cell_index; /** * The type used to denote boundary indicators associated with every piece