]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Change unsigned int to types::global_dof_index.
authorbuerg <buerg@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 10 Aug 2012 10:18:40 +0000 (10:18 +0000)
committerbuerg <buerg@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 10 Aug 2012 10:18:40 +0000 (10:18 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_3@25870 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/hp/dof_handler.h
deal.II/source/hp/dof_handler.cc

index 46d232eb61dd5ea8a37b651e6ee329df1c752424..2ff8ec08114f15a5b1db09d8177d054a707a5c96 100644 (file)
@@ -249,7 +249,7 @@ namespace hp
                                         * number of the degree of
                                         * freedom referenced.
                                         */
-      void renumber_dofs (const std::vector<unsigned int> &new_numbers);
+      void renumber_dofs (const std::vector<types::global_dof_index> &new_numbers);
 
                                        /**
                                         * Return the maximum number of
@@ -831,13 +831,13 @@ namespace hp
                                         * DoFs which are constrained by
                                         * hanging nodes, see @ref constraints.
                                         */
-      unsigned int n_dofs () const;
+      types::global_dof_index n_dofs () const;
 
                                        /**
                                         * Return the number of degrees of freedom
                                         * located on the boundary.
                                         */
-      unsigned int n_boundary_dofs () const;
+      types::global_dof_index n_boundary_dofs () const;
 
                                        /**
                                         * Return the number of degrees
@@ -852,7 +852,7 @@ namespace hp
                                         * @p make_boundary_sparsity_pattern
                                         * function.
                                         */
-      unsigned int
+      types::global_dof_index
       n_boundary_dofs (const FunctionMap &boundary_indicators) const;
 
                                        /**
@@ -863,7 +863,7 @@ namespace hp
                                         * indicators under
                                         * consideration.
                                         */
-      unsigned int
+      types::global_dof_index
       n_boundary_dofs (const std::set<types::boundary_id_t> &boundary_indicators) const;
 
                                        /**
@@ -1103,8 +1103,8 @@ namespace hp
         public:
           MGVertexDoFs ();
           ~MGVertexDoFs ();
-          unsigned int get_index (const unsigned int level, const unsigned int dof_number) const;
-          void set_index (const unsigned int level, const unsigned int dof_number, const unsigned int index);
+          types::global_dof_index get_index (const unsigned int level, const unsigned int dof_number) const;
+          void set_index (const unsigned int level, const unsigned int dof_number, const types::global_dof_index index);
       };
 
                                        /**
@@ -1113,10 +1113,10 @@ namespace hp
       void clear_space ();
       
       template<int structdim>
-      unsigned int get_dof_index (const unsigned int obj_level, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index) const;
+      types::global_dof_index get_dof_index (const unsigned int obj_level, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index) const;
       
       template<int structdim>
-      void set_dof_index (const unsigned int obj_level, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const unsigned int global_index) const;
+      void set_dof_index (const unsigned int obj_level, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const types::global_dof_index global_index) const;
 
                                        /**
                                         *  Create default tables for
@@ -1157,7 +1157,7 @@ namespace hp
                                         * distribute_dofs().
                                         */
       void
-      compute_vertex_dof_identities (std::vector<unsigned int> &new_dof_indices) const;
+      compute_vertex_dof_identities (std::vector<types::global_dof_index> &new_dof_indices) const;
 
                                        /**
                                         * Compute identities between
@@ -1166,7 +1166,7 @@ namespace hp
                                         * distribute_dofs().
                                         */
       void
-      compute_line_dof_identities (std::vector<unsigned int> &new_dof_indices) const;
+      compute_line_dof_identities (std::vector<types::global_dof_index> &new_dof_indices) const;
 
                                        /**
                                         * Compute identities between
@@ -1175,7 +1175,7 @@ namespace hp
                                         * distribute_dofs().
                                         */
       void
-      compute_quad_dof_identities (std::vector<unsigned int> &new_dof_indices) const;
+      compute_quad_dof_identities (std::vector<types::global_dof_index> &new_dof_indices) const;
 
                                        /**
                                         * Renumber the objects with
@@ -1202,16 +1202,16 @@ namespace hp
                                         * co-located on the same
                                         * entity.
                                         */
-      void renumber_dofs_internal (const std::vector<unsigned int> &new_numbers,
+      void renumber_dofs_internal (const std::vector<types::global_dof_index> &new_numbers,
                                                   dealii::internal::int2type<0>);
 
-      void renumber_dofs_internal (const std::vector<unsigned int> &new_numbers,
+      void renumber_dofs_internal (const std::vector<types::global_dof_index> &new_numbers,
                                                   dealii::internal::int2type<1>);
 
-      void renumber_dofs_internal (const std::vector<unsigned int> &new_numbers,
+      void renumber_dofs_internal (const std::vector<types::global_dof_index> &new_numbers,
                                                   dealii::internal::int2type<2>);
 
-      void renumber_dofs_internal (const std::vector<unsigned int> &new_numbers,
+      void renumber_dofs_internal (const std::vector<types::global_dof_index> &new_numbers,
                                                   dealii::internal::int2type<3>);
 
                                        /**
@@ -1267,7 +1267,7 @@ namespace hp
                                         * actual data format used to
                                         * the present class.
                                         */
-      std::vector<unsigned int>      vertex_dofs;
+      std::vector<types::global_dof_index>      vertex_dofs;
 
                                        /**
                                         * For each vertex in the
@@ -1341,7 +1341,7 @@ namespace hp
 
   template <int dim, int spacedim>
   inline
-  unsigned int
+  types::global_dof_index
   DoFHandler<dim,spacedim>::n_dofs () const
   {
     return number_cache.n_global_dofs;
@@ -1403,14 +1403,14 @@ namespace hp
 
   template<int dim, int spacedim>
   inline
-  unsigned int DoFHandler<dim, spacedim>::MGVertexDoFs::get_index (const unsigned int level, const unsigned int dof_number) const {
+  types::global_dof_index DoFHandler<dim, spacedim>::MGVertexDoFs::get_index (const unsigned int level, const unsigned int dof_number) const {
     Assert (false, ExcNotImplemented ());
     return invalid_dof_index;
   }
   
   template<int dim, int spacedim>
   inline
-  void DoFHandler<dim, spacedim>::MGVertexDoFs::set_index (const unsigned int level, const unsigned int dof_number, const unsigned int index) {
+  void DoFHandler<dim, spacedim>::MGVertexDoFs::set_index (const unsigned int level, const unsigned int dof_number, const types::global_dof_index index) {
     Assert (false, ExcNotImplemented ());
   }
 
index 6d1c147187aa4a1212b413b85190d32ebf87c2fb..6362c78416f9f461d8040821143f4da5a2c05643 100644 (file)
@@ -322,9 +322,9 @@ namespace internal
                                             */
              template <int spacedim>
              static
-             unsigned int
+             types::global_dof_index
              distribute_dofs_on_cell (const typename dealii::hp::DoFHandler<1,spacedim>::active_cell_iterator &cell,
-                                                  unsigned int          next_free_dof)
+                                      types::global_dof_index                                                 next_free_dof)
                {
                  const unsigned int dim = 1;
 
@@ -367,9 +367,9 @@ namespace internal
 
              template <int spacedim>
              static
-             unsigned int
+             types::global_dof_index
              distribute_dofs_on_cell (const typename dealii::hp::DoFHandler<2,spacedim>::active_cell_iterator &cell,
-                                                  unsigned int          next_free_dof)
+                                      types::global_dof_index                                                 next_free_dof)
                {
                  const unsigned int dim = 2;
 
@@ -430,9 +430,9 @@ namespace internal
 
              template <int spacedim>
              static
-             unsigned int
+             types::global_dof_index
              distribute_dofs_on_cell (const typename dealii::hp::DoFHandler<3,spacedim>::active_cell_iterator &cell,
-                                                  unsigned int          next_free_dof)
+                                      types::global_dof_index                                                 next_free_dof)
                {
                  const unsigned int dim = 3;
 
@@ -577,7 +577,7 @@ namespace internal
                            = std::vector<unsigned int> (dof_handler.tria->n_raw_lines(level),
                                                                         DoFHandler<dim,spacedim>::invalid_dof_index);
 
-                         unsigned int next_free_dof = 0;
+                         types::global_dof_index next_free_dof = 0;
                          for (typename DoFHandler<dim,spacedim>::active_cell_iterator
                                     cell=dof_handler.begin_active(level);
                               cell!=dof_handler.end_active(level); ++cell)
@@ -588,7 +588,7 @@ namespace internal
                              }
 
                          dof_handler.levels[level]->lines.dofs
-                           = std::vector<unsigned int> (next_free_dof,
+                           = std::vector<types::global_dof_index> (next_free_dof,
                                                                         DoFHandler<dim,spacedim>::invalid_dof_index);
                        }
 
@@ -602,7 +602,7 @@ namespace internal
 #ifdef DEBUG
                  for (unsigned int level=0; level<dof_handler.tria->n_levels(); ++level)
                        {
-                         unsigned int counter = 0;
+                   types::global_dof_index counter = 0;
                          for (typename DoFHandler<dim,spacedim>::cell_iterator
                                     cell=dof_handler.begin_active(level);
                               cell!=dof_handler.end_active(level); ++cell)
@@ -693,7 +693,7 @@ namespace internal
                            = std::vector<unsigned int> (dof_handler.tria->n_raw_quads(level),
                                                                         DoFHandler<dim,spacedim>::invalid_dof_index);
 
-                         unsigned int next_free_dof = 0;
+                         types::global_dof_index next_free_dof = 0;
                          for (typename DoFHandler<dim,spacedim>::active_cell_iterator
                                     cell=dof_handler.begin_active(level);
                               cell!=dof_handler.end_active(level); ++cell)
@@ -704,7 +704,7 @@ namespace internal
                              }
 
                          dof_handler.levels[level]->quads.dofs
-                           = std::vector<unsigned int> (next_free_dof,
+                           = std::vector<types::global_dof_index> (next_free_dof,
                                                                         DoFHandler<dim,spacedim>::invalid_dof_index);
                        }
 
@@ -718,7 +718,7 @@ namespace internal
 #ifdef DEBUG
                  for (unsigned int level=0; level<dof_handler.tria->n_levels(); ++level)
                        {
-                         unsigned int counter = 0;
+                   types::global_dof_index counter = 0;
                          for (typename DoFHandler<dim,spacedim>::cell_iterator
                                     cell=dof_handler.begin_active(level);
                               cell!=dof_handler.end_active(level); ++cell)
@@ -844,7 +844,7 @@ namespace internal
                          = std::vector<unsigned int> (dof_handler.tria->n_raw_lines(),
                                                                   DoFHandler<dim,spacedim>::invalid_dof_index);
                        dof_handler.faces->lines.dofs
-                         = std::vector<unsigned int> (n_line_slots,
+                         = std::vector<types::global_dof_index> (n_line_slots,
                                                                   DoFHandler<dim,spacedim>::invalid_dof_index);
 
                                                  // with the memory now
@@ -1057,7 +1057,7 @@ namespace internal
                            = std::vector<unsigned int> (dof_handler.tria->n_raw_hexs(level),
                                                                         DoFHandler<dim,spacedim>::invalid_dof_index);
 
-                         unsigned int next_free_dof = 0;
+                         types::global_dof_index next_free_dof = 0;
                          for (typename DoFHandler<dim,spacedim>::active_cell_iterator
                                     cell=dof_handler.begin_active(level);
                               cell!=dof_handler.end_active(level); ++cell)
@@ -1068,8 +1068,8 @@ namespace internal
                              }
 
                          dof_handler.levels[level]->hexes.dofs
-                           = std::vector<unsigned int> (next_free_dof,
-                                                                        DoFHandler<dim,spacedim>::invalid_dof_index);
+                           = std::vector<types::global_dof_index> (next_free_dof,
+                                                                                           DoFHandler<dim,spacedim>::invalid_dof_index);
                        }
 
                                                // safety check: make sure that
@@ -1082,7 +1082,7 @@ namespace internal
 #ifdef DEBUG
                  for (unsigned int level=0; level<dof_handler.tria->n_levels(); ++level)
                        {
-                         unsigned int counter = 0;
+                   types::global_dof_index counter = 0;
                          for (typename DoFHandler<dim,spacedim>::cell_iterator
                                     cell=dof_handler.begin_active(level);
                               cell!=dof_handler.end_active(level); ++cell)
@@ -1212,8 +1212,8 @@ namespace internal
                              = std::vector<unsigned int> (dof_handler.tria->n_raw_quads(),
                                                                           DoFHandler<dim,spacedim>::invalid_dof_index);
                            dof_handler.faces->quads.dofs
-                             = std::vector<unsigned int> (n_quad_slots,
-                                                                          DoFHandler<dim,spacedim>::invalid_dof_index);
+                             = std::vector<types::global_dof_index> (n_quad_slots,
+                                                                                             DoFHandler<dim,spacedim>::invalid_dof_index);
                          }
 
                                                  // with the memory now
@@ -2681,12 +2681,12 @@ namespace hp
 
 
   template <>
-  unsigned int DoFHandler<1>::n_boundary_dofs () const
+  types::global_dof_index DoFHandler<1>::n_boundary_dofs () const
   {
     Assert (finite_elements != 0, ExcNoFESelected());
 
     DoFHandler<1,1>::cell_iterator cell;
-    unsigned int n = 0;
+    types::global_dof_index n = 0;
 
                                      // search left-most cell
     cell = this->begin_active();
@@ -2706,7 +2706,7 @@ namespace hp
 
 
   template <>
-  unsigned int DoFHandler<1>::n_boundary_dofs (const FunctionMap &boundary_indicators) const
+  types::global_dof_index DoFHandler<1>::n_boundary_dofs (const FunctionMap &boundary_indicators) const
   {
     Assert (finite_elements != 0, ExcNoFESelected());
 
@@ -2719,7 +2719,7 @@ namespace hp
               ExcInvalidBoundaryIndicator());
 
     DoFHandler<1,1>::active_cell_iterator cell;
-    unsigned int n = 0;
+    types::global_dof_index n = 0;
 
                                      // search left-most cell
     if (boundary_indicators.find (0) != boundary_indicators.end())
@@ -2745,7 +2745,7 @@ namespace hp
 
 
   template <>
-  unsigned int DoFHandler<1>::n_boundary_dofs (const std::set<types::boundary_id_t> &boundary_indicators) const
+  types::global_dof_index DoFHandler<1>::n_boundary_dofs (const std::set<types::boundary_id_t> &boundary_indicators) const
   {
     Assert (finite_elements != 0, ExcNoFESelected());
 
@@ -2758,7 +2758,7 @@ namespace hp
               ExcInvalidBoundaryIndicator());
 
     DoFHandler<1,1>::active_cell_iterator cell;
-    unsigned int n = 0;
+    types::global_dof_index n = 0;
 
                                      // search left-most cell
     if (boundary_indicators.find (0) != boundary_indicators.end())
@@ -2783,21 +2783,21 @@ namespace hp
 
 
   template <>
-  unsigned int DoFHandler<1,2>::n_boundary_dofs () const
+  types::global_dof_index DoFHandler<1,2>::n_boundary_dofs () const
   {
     Assert(false,ExcNotImplemented());
     return 0;
   }
 
   template <>
-  unsigned int DoFHandler<1,2>::n_boundary_dofs (const FunctionMap &) const
+  types::global_dof_index DoFHandler<1,2>::n_boundary_dofs (const FunctionMap &) const
   {
     Assert(false,ExcNotImplemented());
     return 0;
   }
 
   template <>
-  unsigned int DoFHandler<1,2>::n_boundary_dofs (const std::set<types::boundary_id_t> &) const
+  types::global_dof_index DoFHandler<1,2>::n_boundary_dofs (const std::set<types::boundary_id_t> &) const
   {
     Assert(false,ExcNotImplemented());
     return 0;
@@ -2806,21 +2806,21 @@ namespace hp
 
 
 template <>
-  unsigned int DoFHandler<1,3>::n_boundary_dofs () const
+types::global_dof_index DoFHandler<1,3>::n_boundary_dofs () const
   {
     Assert(false,ExcNotImplemented());
     return 0;
   }
 
   template <>
-  unsigned int DoFHandler<1,3>::n_boundary_dofs (const FunctionMap &) const
+  types::global_dof_index DoFHandler<1,3>::n_boundary_dofs (const FunctionMap &) const
   {
     Assert(false,ExcNotImplemented());
     return 0;
   }
 
   template <>
-  unsigned int DoFHandler<1,3>::n_boundary_dofs (const std::set<types::boundary_id_t> &) const
+  types::global_dof_index DoFHandler<1,3>::n_boundary_dofs (const std::set<types::boundary_id_t> &) const
   {
     Assert(false,ExcNotImplemented());
     return 0;
@@ -2828,12 +2828,12 @@ template <>
 
 
   template<int dim, int spacedim>
-  unsigned int DoFHandler<dim,spacedim>::n_boundary_dofs () const
+  types::global_dof_index DoFHandler<dim,spacedim>::n_boundary_dofs () const
   {
     Assert (finite_elements != 0, ExcNoFESelected());
 
-    std::set<int> boundary_dofs;
-    std::vector<unsigned int> dofs_on_face;
+    std::set<types::global_dof_index> boundary_dofs;
+    std::vector<types::global_dof_index> dofs_on_face;
     dofs_on_face.reserve (this->get_fe ().max_dofs_per_face());
 
                                      // loop over all faces to check
@@ -2866,7 +2866,7 @@ template <>
 
 
   template<int dim, int spacedim>
-  unsigned int
+  types::global_dof_index
   DoFHandler<dim,spacedim>::n_boundary_dofs (const FunctionMap &boundary_indicators) const
   {
     Assert (finite_elements != 0, ExcNoFESelected());
@@ -2876,8 +2876,8 @@ template <>
                                      // same as above, but with
                                      // additional checks for set of
                                      // boundary indicators
-    std::set<int> boundary_dofs;
-    std::vector<unsigned int> dofs_on_face;
+    std::set<types::global_dof_index> boundary_dofs;
+    std::vector<types::global_dof_index> dofs_on_face;
     dofs_on_face.reserve (this->get_fe ().max_dofs_per_face());
 
     typename DoFHandler<dim,spacedim>::active_cell_iterator cell = this->begin_active (),
@@ -2902,7 +2902,7 @@ template <>
 
 
   template<int dim, int spacedim>
-  unsigned int
+  types::global_dof_index
   DoFHandler<dim,spacedim>::n_boundary_dofs (const std::set<types::boundary_id_t> &boundary_indicators) const
   {
     Assert (finite_elements != 0, ExcNoFESelected());
@@ -2912,8 +2912,8 @@ template <>
                                      // same as above, but with
                                      // additional checks for set of
                                      // boundary indicators
-    std::set<int> boundary_dofs;
-    std::vector<unsigned int> dofs_on_face;
+    std::set<types::global_dof_index> boundary_dofs;
+    std::vector<types::global_dof_index> dofs_on_face;
     dofs_on_face.reserve (this->get_fe ().max_dofs_per_face());
 
     typename DoFHandler<dim,spacedim>::active_cell_iterator cell = this->begin_active (),
@@ -2937,7 +2937,7 @@ template <>
 
 
   template <>
-  unsigned int DoFHandler<2,3>::n_boundary_dofs () const
+  types::global_dof_index DoFHandler<2,3>::n_boundary_dofs () const
   {
     Assert(false,ExcNotImplemented());
     return 0;
@@ -2946,7 +2946,7 @@ template <>
 
 
   template <>
-  unsigned int DoFHandler<2,3>::n_boundary_dofs (const FunctionMap &) const
+  types::global_dof_index DoFHandler<2,3>::n_boundary_dofs (const FunctionMap &) const
   {
     Assert(false,ExcNotImplemented());
     return 0;
@@ -2955,7 +2955,7 @@ template <>
 
 
   template <>
-  unsigned int DoFHandler<2,3>::n_boundary_dofs (const std::set<types::boundary_id_t> &) const
+  types::global_dof_index DoFHandler<2,3>::n_boundary_dofs (const std::set<types::boundary_id_t> &) const
   {
     Assert(false,ExcNotImplemented());
     return 0;
@@ -2988,7 +2988,7 @@ template <>
   template<int dim, int spacedim>
   void
   DoFHandler<dim,spacedim>::
-  compute_vertex_dof_identities (std::vector<unsigned int> &new_dof_indices) const
+  compute_vertex_dof_identities (std::vector<types::global_dof_index> &new_dof_indices) const
   {
                                      // Note: we may wish to have
                                      // something here similar to what
@@ -3070,13 +3070,13 @@ template <>
                          = *vertex_dof_identities[first_fe_index][other_fe_index];
                        for (unsigned int i=0; i<identities.size(); ++i)
                          {
-                           const unsigned int lower_dof_index
+                           const types::global_dof_index lower_dof_index
                              = internal::DoFAccessor::Implementation::
                              get_vertex_dof_index (*this,
                                                                vertex_index,
                                                                first_fe_index,
                                                                identities[i].first);
-                           const unsigned int higher_dof_index
+                           const types::global_dof_index higher_dof_index
                              = internal::DoFAccessor::Implementation::
                              get_vertex_dof_index (*this,
                                                                vertex_index,
@@ -3102,7 +3102,7 @@ template <>
   template <>
   void
   DoFHandler<1,1>::
-  compute_line_dof_identities (std::vector<unsigned int> &) const
+  compute_line_dof_identities (std::vector<types::global_dof_index> &) const
   {}
 
 
@@ -3110,20 +3110,20 @@ template <>
   template <>
   void
   DoFHandler<1,2>::
-  compute_line_dof_identities (std::vector<unsigned int> &) const
+  compute_line_dof_identities (std::vector<types::global_dof_index> &) const
   {}
 
   template <>
   void
   DoFHandler<1,3>::
-  compute_line_dof_identities (std::vector<unsigned int> &) const
+  compute_line_dof_identities (std::vector<types::global_dof_index> &) const
   {}
 
 
   template<int dim, int spacedim>
   void
   DoFHandler<dim,spacedim>::
-  compute_line_dof_identities (std::vector<unsigned int> &new_dof_indices) const
+  compute_line_dof_identities (std::vector<types::global_dof_index> &new_dof_indices) const
   {
                                      // An implementation of the
                                      // algorithm described in the hp
@@ -3227,9 +3227,9 @@ template <>
 
                                      for (unsigned int j=0; j<(*finite_elements)[fe_index_1].dofs_per_line; ++j)
                                        {
-                                         const unsigned int master_dof_index
+                                         const types::global_dof_index master_dof_index
                                                = line->dof_index (j, fe_index_1);
-                                         const unsigned int slave_dof_index
+                                         const types::global_dof_index slave_dof_index
                                                = line->dof_index (j, fe_index_2);
 
                                                                // if master dof
@@ -3314,9 +3314,9 @@ template <>
                            = *line_dof_identities[most_dominating_fe_index][other_fe_index];
                          for (unsigned int i=0; i<identities.size(); ++i)
                            {
-                             const unsigned int master_dof_index
+                             const types::global_dof_index master_dof_index
                                    = line->dof_index (identities[i].first, most_dominating_fe_index);
-                             const unsigned int slave_dof_index
+                             const types::global_dof_index slave_dof_index
                                    = line->dof_index (identities[i].second, other_fe_index);
 
                              Assert ((new_dof_indices[master_dof_index] ==
@@ -3338,25 +3338,25 @@ template <>
   template <>
   void
   DoFHandler<1>::
-  compute_quad_dof_identities (std::vector<unsigned int> &) const
+  compute_quad_dof_identities (std::vector<types::global_dof_index> &) const
   {}
 
   template <>
   void
   DoFHandler<1,2>::
-  compute_quad_dof_identities (std::vector<unsigned int> &) const
+  compute_quad_dof_identities (std::vector<types::global_dof_index> &) const
   {}
 
   template <>
   void
   DoFHandler<1,3>::
-  compute_quad_dof_identities (std::vector<unsigned int> &) const
+  compute_quad_dof_identities (std::vector<types::global_dof_index> &) const
   {}
 
   template <>
   void
   DoFHandler<2>::
-  compute_quad_dof_identities (std::vector<unsigned int> &) const
+  compute_quad_dof_identities (std::vector<types::global_dof_index> &) const
   {}
 
 
@@ -3364,7 +3364,7 @@ template <>
   template <>
   void
   DoFHandler<2,3>::
-  compute_quad_dof_identities (std::vector<unsigned int> &) const
+  compute_quad_dof_identities (std::vector<types::global_dof_index> &) const
   {}
 
 
@@ -3372,7 +3372,7 @@ template <>
   template<int dim, int spacedim>
   void
   DoFHandler<dim,spacedim>::
-  compute_quad_dof_identities (std::vector<unsigned int> &new_dof_indices) const
+  compute_quad_dof_identities (std::vector<types::global_dof_index> &new_dof_indices) const
   {
                                      // An implementation of the
                                      // algorithm described in the hp
@@ -3433,9 +3433,9 @@ template <>
                   = *quad_dof_identities[most_dominating_fe_index][other_fe_index];
                 for (unsigned int i=0; i<identities.size(); ++i)
                   {
-                    const unsigned int master_dof_index
+                    const types::global_dof_index master_dof_index
                       = quad->dof_index (identities[i].first, most_dominating_fe_index);
-                    const unsigned int slave_dof_index
+                    const types::global_dof_index slave_dof_index
                       = quad->dof_index (identities[i].second, other_fe_index);
 
                     Assert ((new_dof_indices[master_dof_index] ==
@@ -3536,7 +3536,7 @@ template <>
                                      // Step 1: distribute DoFs on all
                                      // active entities
     {
-      unsigned int next_free_dof = 0;
+      types::global_dof_index next_free_dof = 0;
       active_cell_iterator cell = begin_active(),
                                       endc = end();
 
@@ -3558,7 +3558,7 @@ template <>
                                      // faces and other
                                      // lower-dimensional objects
                                      // where elements come together
-    std::vector<unsigned int>
+    std::vector<types::global_dof_index>
       constrained_indices (number_cache.n_global_dofs, numbers::invalid_unsigned_int);
     compute_vertex_dof_identities (constrained_indices);
     compute_line_dof_identities (constrained_indices);
@@ -3567,10 +3567,10 @@ template <>
                                      // loop over all dofs and assign
                                      // new numbers to those which are
                                      // not constrained
-    std::vector<unsigned int>
+    std::vector<types::global_dof_index>
       new_dof_indices (number_cache.n_global_dofs, numbers::invalid_unsigned_int);
-    unsigned int next_free_dof = 0;
-    for (unsigned int i=0; i<number_cache.n_global_dofs; ++i)
+    types::global_dof_index next_free_dof = 0;
+    for (types::global_dof_index i=0; i<number_cache.n_global_dofs; ++i)
       if (constrained_indices[i] == numbers::invalid_unsigned_int)
            {
              new_dof_indices[i] = next_free_dof;
@@ -3580,7 +3580,7 @@ template <>
                                      // then loop over all those that
                                      // are constrained and record the
                                      // new dof number for those:
-    for (unsigned int i=0; i<number_cache.n_global_dofs; ++i)
+    for (types::global_dof_index i=0; i<number_cache.n_global_dofs; ++i)
       if (constrained_indices[i] != numbers::invalid_unsigned_int)
            {
              Assert (new_dof_indices[constrained_indices[i]] !=
@@ -3590,7 +3590,7 @@ template <>
              new_dof_indices[i] = new_dof_indices[constrained_indices[i]];
            }
 
-    for (unsigned int i=0; i<number_cache.n_global_dofs; ++i)
+    for (types::global_dof_index i=0; i<number_cache.n_global_dofs; ++i)
       {
            Assert (new_dof_indices[i] != numbers::invalid_unsigned_int,
                        ExcInternalError());
@@ -3612,10 +3612,11 @@ template <>
       = IndexSet (number_cache.n_global_dofs);
     number_cache.locally_owned_dofs.add_range (0,
                                                                   number_cache.n_global_dofs);
-
+    Assert (number_cache.n_global_dofs < std::numeric_limits<unsigned int>::max (),
+            ExcMessage ("Global number of degrees of freedom is too large."));
     number_cache.n_locally_owned_dofs_per_processor
       = std::vector<unsigned int> (1,
-                                                  number_cache.n_global_dofs);
+                                                          (unsigned int) number_cache.n_global_dofs);
 
     number_cache.locally_owned_dofs_per_processor
       = std::vector<IndexSet> (1,
@@ -3640,7 +3641,7 @@ template <>
 
 
   template<int dim, int spacedim>
-  void DoFHandler<dim,spacedim>::renumber_dofs (const std::vector<unsigned int> &new_numbers)
+  void DoFHandler<dim,spacedim>::renumber_dofs (const std::vector<types::global_dof_index> &new_numbers)
   {
     Assert (new_numbers.size() == n_dofs(), ExcRenumberingIncomplete());
 #ifdef DEBUG
@@ -3648,10 +3649,10 @@ template <>
                                      // consecutively numbered
     if (true)
       {
-        std::vector<unsigned int> tmp(new_numbers);
+        std::vector<types::global_dof_index> tmp(new_numbers);
         std::sort (tmp.begin(), tmp.end());
-        std::vector<unsigned int>::const_iterator p = tmp.begin();
-        unsigned int                         i = 0;
+        std::vector<types::global_dof_index>::const_iterator p = tmp.begin();
+        types::global_dof_index                              i = 0;
         for (; p!=tmp.end(); ++p, ++i)
           Assert (*p == i, ExcNewNumbersNotConsecutive(i));
       }
@@ -3665,7 +3666,7 @@ template <>
   template<int dim, int spacedim>
   void
   DoFHandler<dim,spacedim>::
-  renumber_dofs_internal (const std::vector<unsigned int> &new_numbers,
+  renumber_dofs_internal (const std::vector<types::global_dof_index> &new_numbers,
                                      internal::int2type<0>)
   {
     Assert (new_numbers.size() == n_dofs(), ExcRenumberingIncomplete());
@@ -3685,7 +3686,7 @@ template <>
 
                for (unsigned int d=0; d<(*finite_elements)[fe_index].dofs_per_vertex; ++d)
                  {
-                       const unsigned int vertex_dof_index
+                       const types::global_dof_index vertex_dof_index
                          = internal::DoFAccessor::Implementation::
                          get_vertex_dof_index(*this,
                                                       vertex_index,
@@ -3707,7 +3708,7 @@ template <>
   template<int dim, int spacedim>
   void
   DoFHandler<dim,spacedim>::
-  renumber_dofs_internal (const std::vector<unsigned int> &new_numbers,
+  renumber_dofs_internal (const std::vector<types::global_dof_index> &new_numbers,
                                      internal::int2type<1>)
   {
     Assert (new_numbers.size() == n_dofs(), ExcRenumberingIncomplete());
@@ -3738,7 +3739,7 @@ template <>
   template<>
   void
   DoFHandler<2,2>::
-  renumber_dofs_internal (const std::vector<unsigned int> &new_numbers,
+  renumber_dofs_internal (const std::vector<types::global_dof_index> &new_numbers,
                                      internal::int2type<2>)
   {
     Assert (new_numbers.size() == n_dofs(), ExcRenumberingIncomplete());
@@ -3768,7 +3769,7 @@ template <>
   template<>
   void
   DoFHandler<2,3>::
-  renumber_dofs_internal (const std::vector<unsigned int> &new_numbers,
+  renumber_dofs_internal (const std::vector<types::global_dof_index> &new_numbers,
                                      internal::int2type<2>)
   {
     Assert (new_numbers.size() == n_dofs(), ExcRenumberingIncomplete());
@@ -3797,7 +3798,7 @@ template <>
   template<>
   void
   DoFHandler<3,3>::
-  renumber_dofs_internal (const std::vector<unsigned int> &new_numbers,
+  renumber_dofs_internal (const std::vector<types::global_dof_index> &new_numbers,
                                      internal::int2type<2>)
   {
     Assert (new_numbers.size() == n_dofs(), ExcRenumberingIncomplete());
@@ -3826,7 +3827,7 @@ template <>
   template<>
   void
   DoFHandler<3,3>::
-  renumber_dofs_internal (const std::vector<unsigned int> &new_numbers,
+  renumber_dofs_internal (const std::vector<types::global_dof_index> &new_numbers,
                                      internal::int2type<3>)
   {
     Assert (new_numbers.size() == n_dofs(), ExcRenumberingIncomplete());
@@ -4144,7 +4145,7 @@ template <>
 
   template <int dim, int spacedim>
   template <int structdim>
-  unsigned int
+  types::global_dof_index
   DoFHandler<dim,spacedim>::get_dof_index (const unsigned int       obj_level,
                                            const unsigned int       obj_index,
                                            const unsigned int       fe_index,
@@ -4161,7 +4162,7 @@ template <>
                                            const unsigned int obj_index,
                                            const unsigned int fe_index,
                                            const unsigned int local_index,
-                                           const unsigned int global_index) const
+                                           const types::global_dof_index global_index) const
   {
     
   }
@@ -4177,7 +4178,7 @@ template <>
     faces = NULL;
 
     {
-      std::vector<unsigned int> tmp;
+      std::vector<types::global_dof_index> tmp;
       std::swap (vertex_dofs, tmp);
     }
 

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.