]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
move parts from numbers.h into types.h to fix circular inclusion of types, numbers...
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 10 Sep 2012 15:23:17 +0000 (15:23 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 10 Sep 2012 15:23:17 +0000 (15:23 +0000)
git-svn-id: https://svn.dealii.org/trunk@26269 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/base/numbers.h
deal.II/include/deal.II/base/types.h

index 84791ec2bb6416bd64f17858a99b3baf00b46afd..05cdce2e968871f3efa90f473aec1b8f65085d7c 100644 (file)
@@ -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<unsigned int> (-1);
-
-                                  /**
-                                    * An invalid value for indices of degrees
-                                    * of freedom.
-                                    */
-  const types::global_dof_index invalid_dof_index = static_cast<types::global_dof_index>(-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<types::material_id>(-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<types::boundary_id>(-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<types::subdomain_id>(-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<types::subdomain_id>(-2);
-
-
                                    /**
                                     * e
                                     */
index a59a8f06e6e9e8f9cb3fe4b6bca3c44bab4c1d2b..e0a7aac194051d59e43d815df61a7d1696bf6cb3 100644 (file)
@@ -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<unsigned int> (-1);
+
+                                  /**
+                                    * An invalid value for indices of degrees
+                                    * of freedom.
+                                    */
+  const types::global_dof_index invalid_dof_index = static_cast<types::global_dof_index>(-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<types::material_id>(-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<types::boundary_id>(-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<types::subdomain_id>(-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<types::subdomain_id>(-2);
+
+}
+
 
 DEAL_II_NAMESPACE_CLOSE
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.