From e20e487f0c079a2b46d4e43739211f7470b672dd Mon Sep 17 00:00:00 2001 From: bangerth Date: Thu, 9 Aug 2012 21:04:01 +0000 Subject: [PATCH] Add missing piece. git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_3@25845 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/base/types.h | 55 ++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 4 deletions(-) diff --git a/deal.II/include/deal.II/base/types.h b/deal.II/include/deal.II/base/types.h index a1d59a4418..dcb2595182 100644 --- a/deal.II/include/deal.II/base/types.h +++ b/deal.II/include/deal.II/base/types.h @@ -65,12 +65,57 @@ namespace types */ const unsigned int artificial_subdomain_id = static_cast(-2); - /** - * The type used to denote global dof - * indices. - */ + +#ifdef DEAL_II_USE_LARGE_INDEX_TYPE + /** + * 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 + * parallel::distributed::Triangulation + * class can overflow this number and we + * need a bigger index space. + * + * The data type always indicates an + * unsigned integer type. + */ + typedef unsigned long long int global_dof_index; + + /** + * An identifier that denotes the MPI type + * associated with types::global_dof_index. + */ +# define DEAL_II_DOF_INDEX_MPI_TYPE MPI_UNSIGNED_LONG_LONG +#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 + * parallel::distributed::Triangulation + * class can overflow this number and we + * need a bigger index space. + * + * The data type always indicates an + * unsigned integer type. + */ typedef unsigned int global_dof_index; + /** + * An identifier that denotes the MPI type + * associated with types::global_dof_index. + */ +# define DEAL_II_DOF_INDEX_MPI_TYPE MPI_UNSIGNED +#endif + + /** + * An invalid value for indices of degrees + * of freedom. + */ + const global_dof_index invalid_dof_index = static_cast(-1); + /** * An invalid value for indices of degrees * of freedom. @@ -102,6 +147,8 @@ namespace types */ const material_id_t invalid_material_id = static_cast(-1); + + } -- 2.39.5