From: kanschat Date: Wed, 29 Aug 2012 13:10:23 +0000 (+0000) Subject: keep types in types and numbers in numbers X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c0c6977a8605c3261f15a499c24298acd84aa464;p=dealii-svn.git keep types in types and numbers in numbers git-svn-id: https://svn.dealii.org/trunk@26153 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/base/numbers.h b/deal.II/include/deal.II/base/numbers.h index 0a51cea75f..84791ec2bb 100644 --- a/deal.II/include/deal.II/base/numbers.h +++ b/deal.II/include/deal.II/base/numbers.h @@ -14,6 +14,7 @@ #include +#include #include DEAL_II_NAMESPACE_OPEN @@ -53,6 +54,64 @@ namespace numbers static const unsigned int invalid_unsigned_int = static_cast (-1); + /** + * An invalid value for indices of degrees + * of freedom. + */ + const types::global_dof_index invalid_dof_index = static_cast(-1); + + /** + * Invalid material_id which we + * need in several places as a + * default value. We assume that + * all material_ids lie in the + * range [0, invalid_material_id). + */ + const types::material_id invalid_material_id = static_cast(-1); + + /** + * The number which we reserve for + * internal faces. We assume that + * all boundary_ids lie in the + * range [0, + * internal_face_boundary_id). + */ + const types::boundary_id internal_face_boundary_id = static_cast(-1); + + /** + * A special id for an invalid + * subdomain id. This value may not + * be used as a valid id but is + * used, for example, for default + * arguments to indicate a + * subdomain id that is not to be + * used. + * + * See the @ref GlossSubdomainId + * "glossary" for more information. + */ + const types::subdomain_id invalid_subdomain_id = static_cast(-1); + + /** + * The subdomain id assigned to a + * cell whose true subdomain id we + * don't know, for example because + * it resides on a different + * processor on a mesh that is kept + * distributed on many + * processors. Such cells are + * called "artificial". + * + * See the glossary entries on @ref + * GlossSubdomainId "subdomain ids" + * and @ref GlossArtificialCell + * "artificial cells" as well as + * the @ref distributed module for + * more information. + */ + const types::subdomain_id artificial_subdomain_id = static_cast(-2); + + /** * e */ diff --git a/deal.II/include/deal.II/base/types.h b/deal.II/include/deal.II/base/types.h index be5ecda538..b94be7f37b 100644 --- a/deal.II/include/deal.II/base/types.h +++ b/deal.II/include/deal.II/base/types.h @@ -33,41 +33,17 @@ namespace types typedef unsigned int subdomain_id; /** - * Old name for the typedef above. - * @deprecated + * @deprecated Old name for the typedef above. */ typedef subdomain_id subdomain_id_t; /** - * A special id for an invalid - * subdomain id. This value may not - * be used as a valid id but is - * used, for example, for default - * arguments to indicate a - * subdomain id that is not to be - * used. - * - * See the @ref GlossSubdomainId - * "glossary" for more information. + * @deprecated Use numbers::invalid_subdomain_id */ const unsigned int invalid_subdomain_id = static_cast(-1); /** - * The subdomain id assigned to a - * cell whose true subdomain id we - * don't know, for example because - * it resides on a different - * processor on a mesh that is kept - * distributed on many - * processors. Such cells are - * called "artificial". - * - * See the glossary entries on @ref - * GlossSubdomainId "subdomain ids" - * and @ref GlossArtificialCell - * "artificial cells" as well as - * the @ref distributed module for - * more information. + * @deprecated Use numbers::artificial_subdomain_id */ const unsigned int artificial_subdomain_id = static_cast(-2); @@ -78,8 +54,7 @@ namespace types typedef unsigned int global_dof_index; /** - * An invalid value for indices of degrees - * of freedom. + * @deprecated Use numbers::invalid_dof_index */ const global_dof_index invalid_dof_index = static_cast(-1); @@ -91,14 +66,12 @@ namespace types typedef unsigned char boundary_id; /** - * Old name for the typedef above. - * @deprecated + * @deprecated Old name for the typedef above. */ typedef boundary_id boundary_id_t; /** - * The number which we reserve for internal faces. - * We assume that all boundary_ids lie in the range [0, internal_face_boundary_id). + * @deprecated Use numbers::internal_face_boundary_id */ const boundary_id internal_face_boundary_id = static_cast(-1); @@ -109,14 +82,12 @@ namespace types typedef unsigned char material_id; /** - * Old name for the typedef above. - * @deprecated + * @deprecated Old name for the typedef above. */ typedef material_id material_id_t; /** - * Invalid material_id which we need in several places as a default value. - * We assume that all material_ids lie in the range [0, invalid_material_id). + * @deprecated Use numbers::invalid_material_id */ const material_id invalid_material_id = static_cast(-1);