From: heister Date: Mon, 10 Sep 2012 15:23:17 +0000 (+0000) Subject: move parts from numbers.h into types.h to fix circular inclusion of types, numbers... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cfc6003e5c85949ca5364c4c8bf577a2e66037cf;p=dealii-svn.git move parts from numbers.h into types.h to fix circular inclusion of types, numbers, and config. git-svn-id: https://svn.dealii.org/trunk@26269 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 84791ec2bb..05cdce2e96 100644 --- a/deal.II/include/deal.II/base/numbers.h +++ b/deal.II/include/deal.II/base/numbers.h @@ -36,82 +36,6 @@ DEAL_II_NAMESPACE_OPEN */ namespace numbers { - /** - * Representation of the - * largest number that - * can be put into an - * unsigned integer. This - * value is widely used - * throughout the library - * as a marker for an - * invalid unsigned - * integer value, such as - * an invalid array - * index, an invalid - * array size, and the - * like. - */ - 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 a59a8f06e6..e0a7aac194 100644 --- a/deal.II/include/deal.II/base/types.h +++ b/deal.II/include/deal.II/base/types.h @@ -97,6 +97,88 @@ namespace types } +// this part of the namespace numbers got moved to the bottom types.h file, +// because otherwise we get a circular inclusion of config.h, types.h, and +// numbers.h +namespace numbers +{ + /** + * Representation of the + * largest number that + * can be put into an + * unsigned integer. This + * value is widely used + * throughout the library + * as a marker for an + * invalid unsigned + * integer value, such as + * an invalid array + * index, an invalid + * array size, and the + * like. + */ + 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); + +} + DEAL_II_NAMESPACE_CLOSE