]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
keep types in types and numbers in numbers
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 29 Aug 2012 13:10:23 +0000 (13:10 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 29 Aug 2012 13:10:23 +0000 (13:10 +0000)
git-svn-id: https://svn.dealii.org/trunk@26153 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 0a51cea75f5b5bba3ac594813803d28fa8a8644e..84791ec2bb6416bd64f17858a99b3baf00b46afd 100644 (file)
@@ -14,6 +14,7 @@
 
 
 #include <deal.II/base/config.h>
+#include <deal.II/base/types.h>
 #include <complex>
 
 DEAL_II_NAMESPACE_OPEN
@@ -53,6 +54,64 @@ namespace numbers
   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 be5ecda5383f4e5b5041baa8b4da414f91a77a97..b94be7f37b340906ea9687b2d78ccf69c7c05778 100644 (file)
@@ -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<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.
+                                    * @deprecated Use numbers::artificial_subdomain_id
                                     */
   const unsigned int artificial_subdomain_id = static_cast<subdomain_id>(-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<global_dof_index>(-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<boundary_id>(-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<material_id>(-1);
 

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.