]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
conversion to types::global_dof_index
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 10 Aug 2012 15:26:10 +0000 (15:26 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 10 Aug 2012 15:26:10 +0000 (15:26 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_3@25882 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/dofs/dof_accessor.h
deal.II/include/deal.II/dofs/dof_accessor.templates.h

index a58ba09acc33a0b04c77a6de56baec8c76fc1ea2..2f3ac77cc620a24fcff440d32efa045a878240bf 100644 (file)
@@ -404,10 +404,10 @@ class DoFAccessor : public dealii::internal::DoFAccessor::Inheritance<structdim,
                                       * <code>cell-@>active_fe_index</code>
                                       * as last argument.
                                       */
-    void get_dof_indices (std::vector<unsigned int> &dof_indices,
+    void get_dof_indices (std::vector<types::global_dof_index> &dof_indices,
                                      const unsigned int fe_index = DH::default_fe_index) const;
     
-    void get_mg_dof_indices (const int level, std::vector<unsigned int>& dof_indices, const unsigned int fe_index = DH::default_fe_index) const;
+    void get_mg_dof_indices (const int level, std::vector<types::global_dof_index>& dof_indices, const unsigned int fe_index = DH::default_fe_index) const;
 
                                      /**
                                       * Global DoF index of the <i>i</i>
@@ -445,11 +445,11 @@ class DoFAccessor : public dealii::internal::DoFAccessor::Inheritance<structdim,
                                       * match the result of
                                       * active_fe_index().
                                       */
-    unsigned int vertex_dof_index (const unsigned int vertex,
+    types::global_dof_index vertex_dof_index (const unsigned int vertex,
                                                   const unsigned int i,
                                                   const unsigned int fe_index = DH::default_fe_index) const;
        
-       unsigned int mg_vertex_dof_index (const int level, const unsigned int vertex, const unsigned int i, const unsigned int fe_index = DH::default_fe_index) const;
+       types::global_dof_index mg_vertex_dof_index (const int level, const unsigned int vertex, const unsigned int i, const unsigned int fe_index = DH::default_fe_index) const;
 
                                      /**
                                       * Index of the <i>i</i>th degree
@@ -505,10 +505,10 @@ class DoFAccessor : public dealii::internal::DoFAccessor::Inheritance<structdim,
                                      * degrees are defined in the interior of
                                      * the face.
                                       */
-    unsigned int dof_index (const unsigned int i,
-                                       const unsigned int fe_index = DH::default_fe_index) const;
+    types::global_dof_index dof_index (const unsigned int i,
+                                      const unsigned int fe_index = DH::default_fe_index) const;
        
-       unsigned int mg_dof_index (const int level, const unsigned int i) const;
+    types::global_dof_index mg_dof_index (const int level, const unsigned int i) const;
 
                                      /**
                                       * @}
@@ -695,10 +695,10 @@ class DoFAccessor : public dealii::internal::DoFAccessor::Inheritance<structdim,
                                       * active_fe_index().
                                       */
     void set_dof_index (const unsigned int i,
-                                   const unsigned int index,
+                                   const types::global_dof_index index,
                                    const unsigned int fe_index = DH::default_fe_index) const;
     
-    void set_mg_dof_index (const int level, const unsigned int i, const unsigned int index) const;
+    void set_mg_dof_index (const int level, const unsigned int i, const types::global_dof_index index) const;
 
                                      /**
                                       * Set the global index of the <i>i</i>
@@ -738,10 +738,10 @@ class DoFAccessor : public dealii::internal::DoFAccessor::Inheritance<structdim,
                                       */
     void set_vertex_dof_index (const unsigned int vertex,
                                           const unsigned int i,
-                                          const unsigned int index,
+                                          const types::global_dof_index index,
                                           const unsigned int fe_index = DH::default_fe_index) const;
        
-       void set_mg_vertex_dof_index (const int level, const unsigned int vertex, const unsigned int i, const unsigned int index, const unsigned int fe_index = DH::default_fe_index) const;
+       void set_mg_vertex_dof_index (const int level, const unsigned int vertex, const unsigned int i, const types::global_dof_index index, const unsigned int fe_index = DH::default_fe_index) const;
 
                                      /**
                                       * Iterator classes need to be friends
@@ -1078,7 +1078,7 @@ class DoFAccessor<0,DH<1,spacedim> > : public TriaAccessor<0,1,spacedim>
                                       * <code>cell-@>active_fe_index</code>
                                       * as last argument.
                                       */
-    void get_dof_indices (std::vector<unsigned int> &dof_indices,
+    void get_dof_indices (std::vector<types::global_dof_index> &dof_indices,
                                      const unsigned int fe_index = AccessorData::default_fe_index) const;
 
                                      /**
@@ -1117,7 +1117,7 @@ class DoFAccessor<0,DH<1,spacedim> > : public TriaAccessor<0,1,spacedim>
                                       * match the result of
                                       * active_fe_index().
                                       */
-    unsigned int vertex_dof_index (const unsigned int vertex,
+    types::global_dof_index vertex_dof_index (const unsigned int vertex,
                                                   const unsigned int i,
                                                   const unsigned int fe_index = AccessorData::default_fe_index) const;
 
@@ -1175,7 +1175,7 @@ class DoFAccessor<0,DH<1,spacedim> > : public TriaAccessor<0,1,spacedim>
                                      * degrees are defined in the interior of
                                      * the face.
                                       */
-    unsigned int dof_index (const unsigned int i,
+    types::global_dof_index dof_index (const unsigned int i,
                                        const unsigned int fe_index = AccessorData::default_fe_index) const;
 
                                      /**
@@ -1363,7 +1363,7 @@ class DoFAccessor<0,DH<1,spacedim> > : public TriaAccessor<0,1,spacedim>
                                       * active_fe_index().
                                       */
     void set_dof_index (const unsigned int i,
-                                   const unsigned int index,
+                                   const types::global_dof_index index,
                                    const unsigned int fe_index = AccessorData::default_fe_index) const;
 
                                      /**
@@ -1404,7 +1404,7 @@ class DoFAccessor<0,DH<1,spacedim> > : public TriaAccessor<0,1,spacedim>
                                       */
     void set_vertex_dof_index (const unsigned int vertex,
                                           const unsigned int i,
-                                          const unsigned int index,
+                                          const types::global_dof_index index,
                                           const unsigned int fe_index = AccessorData::default_fe_index) const;
 
                                      /**
@@ -2032,9 +2032,9 @@ class DoFCellAccessor :  public DoFAccessor<DH::dimension,DH>
                                       * degrees of freedom associated
                                       * with them at all.
                                       */
-    void get_dof_indices (std::vector<unsigned int> &dof_indices) const;
+    void get_dof_indices (std::vector<types::global_dof_index> &dof_indices) const;
     
-    void get_mg_dof_indices (std::vector<unsigned int>& dof_indices) const;
+    void get_mg_dof_indices (std::vector<types::global_dof_index>& dof_indices) const;
 
                                      /**
                                       * @}
@@ -2084,7 +2084,7 @@ class DoFCellAccessor :  public DoFAccessor<DH::dimension,DH>
                                       * cache, if one exists for the
                                       * given DoF handler class.
                                       */
-    void set_dof_indices (const std::vector<unsigned int> &dof_indices);
+    void set_dof_indices (const std::vector<types::global_dof_index> &dof_indices);
 
                                      /**
                                       * Update the cache in which we
index d528221100d148acfd9e7b43d7c586b29f573f5a..84621a8050b7c4eb43de805b22443340bc7de162 100644 (file)
@@ -218,7 +218,7 @@ namespace internal
                                           */
            template <int spacedim>
            static
-           unsigned int
+           types::global_dof_index
            get_dof_index (const dealii::DoFHandler<1,spacedim>   &dof_handler,
                               const unsigned int                      obj_level,
                               const unsigned int                      obj_index,
@@ -243,7 +243,7 @@ namespace internal
                               const unsigned int              fe_index,
                               const unsigned int              local_index,
                               dealii::internal::int2type<1>,
-                              const unsigned int              global_index)
+                              const types::global_dof_index              global_index)
              {
                dof_handler.levels[obj_level]->lines.
                  set_dof_index (dof_handler,
@@ -256,7 +256,7 @@ namespace internal
 
            template <int spacedim>
            static
-           unsigned int
+           types::global_dof_index
            get_dof_index (const dealii::DoFHandler<2,spacedim>   &dof_handler,
                               const unsigned int              obj_level,
                               const unsigned int              obj_index,
@@ -283,7 +283,7 @@ namespace internal
                               const unsigned int              fe_index,
                               const unsigned int              local_index,
                               dealii::internal::int2type<1>,
-                              const unsigned int              global_index)
+                              const types::global_dof_index              global_index)
              {
                                              // faces have no levels
                Assert (obj_level == 0, ExcInternalError());
@@ -298,7 +298,7 @@ namespace internal
 
            template <int spacedim>
            static
-       unsigned int
+       types::global_dof_index
            get_dof_index (const dealii::DoFHandler<2,spacedim>   &dof_handler,
                               const unsigned int              obj_level,
                               const unsigned int              obj_index,
@@ -323,7 +323,7 @@ namespace internal
                               const unsigned int              fe_index,
                               const unsigned int              local_index,
                               dealii::internal::int2type<2>,
-                              const unsigned int              global_index)
+                              const types::global_dof_index              global_index)
              {
                dof_handler.levels[obj_level]->quads.
                  set_dof_index (dof_handler,
@@ -336,7 +336,7 @@ namespace internal
 
            template <int spacedim>
            static
-           unsigned int
+           types::global_dof_index
            get_dof_index (const dealii::DoFHandler<3,spacedim>   &dof_handler,
                               const unsigned int              obj_level,
                               const unsigned int              obj_index,
@@ -363,7 +363,7 @@ namespace internal
                               const unsigned int              fe_index,
                               const unsigned int              local_index,
                               dealii::internal::int2type<1>,
-                              const unsigned int              global_index)
+                              const types::global_dof_index              global_index)
              {
                                              // faces have no levels
                Assert (obj_level == 0, ExcInternalError());
@@ -379,7 +379,7 @@ namespace internal
 
            template <int spacedim>
            static
-           unsigned int
+           types::global_dof_index
            get_dof_index (const dealii::DoFHandler<3,spacedim>   &dof_handler,
                               const unsigned int              obj_level,
                               const unsigned int              obj_index,
@@ -406,7 +406,7 @@ namespace internal
                               const unsigned int              fe_index,
                               const unsigned int              local_index,
                               dealii::internal::int2type<2>,
-                              const unsigned int              global_index)
+                              const types::global_dof_index              global_index)
              {
                                              // faces have no levels
                Assert (obj_level == 0, ExcInternalError());
@@ -422,7 +422,7 @@ namespace internal
 
            template <int spacedim>
            static
-           unsigned int
+           types::global_dof_index
            get_dof_index (const dealii::DoFHandler<3,spacedim>   &dof_handler,
                               const unsigned int              obj_level,
                               const unsigned int              obj_index,
@@ -447,7 +447,7 @@ namespace internal
                               const unsigned int              fe_index,
                               const unsigned int              local_index,
                               dealii::internal::int2type<3>,
-                              const unsigned int              global_index)
+                              const types::global_dof_index              global_index)
              {
                dof_handler.levels[obj_level]->hexes.
                  set_dof_index (dof_handler,
@@ -460,7 +460,7 @@ namespace internal
 
            template <int spacedim>
            static
-           unsigned int
+           types::global_dof_index
            get_dof_index (const dealii::hp::DoFHandler<1,spacedim> &dof_handler,
                               const unsigned int       obj_level,
                               const unsigned int       obj_index,
@@ -486,7 +486,7 @@ namespace internal
                               const unsigned int       fe_index,
                               const unsigned int       local_index,
                               const dealii::internal::int2type<1> &,
-                              const unsigned int       global_index)
+                              const types::global_dof_index       global_index)
              {
                dof_handler.levels[obj_level]->lines.
                  set_dof_index (dof_handler,
@@ -500,7 +500,7 @@ namespace internal
 
            template <int spacedim>
            static
-           unsigned int
+           types::global_dof_index
            get_dof_index (const dealii::hp::DoFHandler<2,spacedim> &dof_handler,
                               const unsigned int       obj_level,
                               const unsigned int       obj_index,
@@ -526,7 +526,7 @@ namespace internal
                               const unsigned int       fe_index,
                               const unsigned int       local_index,
                               const dealii::internal::int2type<1> &,
-                              const unsigned int       global_index)
+                              const types::global_dof_index       global_index)
              {
                dof_handler.faces->lines.
                  set_dof_index (dof_handler,
@@ -540,7 +540,7 @@ namespace internal
 
            template <int spacedim>
            static
-           unsigned int
+           types::global_dof_index
            get_dof_index (const dealii::hp::DoFHandler<2,spacedim> &dof_handler,
                               const unsigned int       obj_level,
                               const unsigned int       obj_index,
@@ -566,7 +566,7 @@ namespace internal
                               const unsigned int       fe_index,
                               const unsigned int       local_index,
                               const dealii::internal::int2type<2> &,
-                              const unsigned int       global_index)
+                              const types::global_dof_index       global_index)
              {
                dof_handler.levels[obj_level]->quads.
                  set_dof_index (dof_handler,
@@ -580,7 +580,7 @@ namespace internal
 
            template <int spacedim>
            static
-           unsigned int
+           types::global_dof_index
            get_dof_index (const dealii::hp::DoFHandler<3,spacedim> &dof_handler,
                               const unsigned int       obj_level,
                               const unsigned int       obj_index,
@@ -606,7 +606,7 @@ namespace internal
                               const unsigned int       fe_index,
                               const unsigned int       local_index,
                               const dealii::internal::int2type<1> &,
-                              const unsigned int       global_index)
+                              const types::global_dof_index       global_index)
              {
                dof_handler.faces->lines.
                  set_dof_index (dof_handler,
@@ -620,7 +620,7 @@ namespace internal
 
            template <int spacedim>
            static
-           unsigned int
+           types::global_dof_index
            get_dof_index (const dealii::hp::DoFHandler<3,spacedim> &dof_handler,
                               const unsigned int       obj_level,
                               const unsigned int       obj_index,
@@ -646,7 +646,7 @@ namespace internal
                               const unsigned int       fe_index,
                               const unsigned int       local_index,
                               const dealii::internal::int2type<2> &,
-                              const unsigned int       global_index)
+                              const types::global_dof_index       global_index)
              {
                dof_handler.faces->quads.
                  set_dof_index (dof_handler,
@@ -660,7 +660,7 @@ namespace internal
 
            template <int spacedim>
            static
-           unsigned int
+           types::global_dof_index
            get_dof_index (const dealii::hp::DoFHandler<3,spacedim> &dof_handler,
                               const unsigned int       obj_level,
                               const unsigned int       obj_index,
@@ -686,7 +686,7 @@ namespace internal
                               const unsigned int       fe_index,
                               const unsigned int       local_index,
                               const dealii::internal::int2type<3> &,
-                              const unsigned int       global_index)
+                              const types::global_dof_index       global_index)
              {
                dof_handler.levels[obj_level]->hexes.
                  set_dof_index (dof_handler,
@@ -1106,7 +1106,7 @@ namespace internal
                                          const unsigned int vertex_index,
                                          const unsigned int fe_index,
                                          const unsigned int local_index,
-                                         const unsigned int global_index)
+                                         const types::global_dof_index global_index)
              {
                Assert ((fe_index == dealii::DoFHandler<dim,spacedim>::default_fe_index),
                            ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
@@ -1131,7 +1131,7 @@ namespace internal
                                          const unsigned int vertex_index,
                                          const unsigned int fe_index,
                                          const unsigned int local_index,
-                                         const unsigned int global_index)
+                                         const types::global_dof_index global_index)
              {
                Assert ( (fe_index != dealii::hp::DoFHandler<dim,spacedim>::default_fe_index),
                             ExcMessage ("You need to specify a FE index when working "
@@ -1156,12 +1156,14 @@ namespace internal
                                              // we can't find a set for this
                                              // particular fe_index
                const unsigned int starting_offset = dof_handler.vertex_dofs_offsets[vertex_index];
-               unsigned int *pointer              = &dof_handler.vertex_dofs[starting_offset];
+               types::global_dof_index *pointer = &dof_handler.vertex_dofs[starting_offset];
                while (true)
                  {
                        Assert (pointer <= &dof_handler.vertex_dofs.back(), ExcInternalError());
 
-                       const unsigned int this_fe_index = *pointer;
+                                                        // a fe index is always small
+                       Assert((*pointer)<numeric_limits<unsigned int>::max(), ExcInternalError());
+                       const unsigned int this_fe_index = static_cast<unsigned int>(*pointer);
 
                        Assert (this_fe_index != numbers::invalid_unsigned_int,
                                    ExcInternalError());
@@ -1246,12 +1248,13 @@ namespace internal
                                              // we can't find a set for this
                                              // particular fe_index
                const unsigned int starting_offset = dof_handler.vertex_dofs_offsets[vertex_index];
-               const unsigned int *pointer        = &dof_handler.vertex_dofs[starting_offset];
+               const types:global_dof_index *pointer = &dof_handler.vertex_dofs[starting_offset];
                while (true)
                  {
                        Assert (pointer <= &dof_handler.vertex_dofs.back(), ExcInternalError());
 
-                       const unsigned int this_fe_index = *pointer;
+                       Assert((*pointer)<numeric_limits<unsigned int>::max(), ExcInternalError());
+                       const unsigned int this_fe_index = static_cast<unsigned int>(*pointer);
 
                        Assert (this_fe_index != numbers::invalid_unsigned_int,
                                    ExcInternalError());
@@ -1290,7 +1293,7 @@ namespace internal
                                              // sets and count the number of
                                              // hops
                const unsigned int starting_offset = dof_handler.vertex_dofs_offsets[vertex_index];
-               const unsigned int *pointer        = &dof_handler.vertex_dofs[starting_offset];
+               const types::global_dof_index *pointer = &dof_handler.vertex_dofs[starting_offset];
 
                Assert (*pointer != numbers::invalid_unsigned_int,
                            ExcInternalError());
@@ -1300,7 +1303,8 @@ namespace internal
                  {
                        Assert (pointer <= &dof_handler.vertex_dofs.back(), ExcInternalError());
 
-                       const unsigned int this_fe_index = *pointer;
+                       Assert((*pointer)<numeric_limits<unsigned int>::max(), ExcInternalError());
+                       const unsigned int this_fe_index = static_cast<unsigned int>(*pointer);
 
                        if (this_fe_index == numbers::invalid_unsigned_int)
                          return counter;
@@ -1342,7 +1346,7 @@ namespace internal
                                              // sets and count the number of
                                              // hops
                const unsigned int starting_offset = dof_handler.vertex_dofs_offsets[vertex_index];
-               const unsigned int *pointer        = &dof_handler.vertex_dofs[starting_offset];
+               const types::global_dof_index *pointer = &dof_handler.vertex_dofs[starting_offset];
 
                Assert (*pointer != numbers::invalid_unsigned_int,
                            ExcInternalError());
@@ -1352,7 +1356,8 @@ namespace internal
                  {
                        Assert (pointer <= &dof_handler.vertex_dofs.back(), ExcInternalError());
 
-                       const unsigned int this_fe_index = *pointer;
+                       Assert((*pointer)<numeric_limits<unsigned int>::max(), ExcInternalError());
+                       const unsigned int this_fe_index = static_cast<unsigned int>(*pointer);
 
                        Assert (this_fe_index < dof_handler.finite_elements->size(),
                                    ExcInternalError());
@@ -1402,7 +1407,7 @@ namespace internal
                                              // sets and see whether we find
                                              // the given index
                const unsigned int starting_offset = dof_handler.vertex_dofs_offsets[vertex_index];
-               const unsigned int *pointer        = &dof_handler.vertex_dofs[starting_offset];
+               const types::global_dof_index *pointer = &dof_handler.vertex_dofs[starting_offset];
 
                Assert (*pointer != numbers::invalid_unsigned_int,
                            ExcInternalError());
@@ -1411,7 +1416,8 @@ namespace internal
                  {
                        Assert (pointer <= &dof_handler.vertex_dofs.back(), ExcInternalError());
 
-                       const unsigned int this_fe_index = *pointer;
+                       Assert((*pointer)<numeric_limits<unsigned int>::max(), ExcInternalError());
+                       const unsigned int this_fe_index = static_cast<unsigned int>(*pointer);
 
                        Assert (this_fe_index < dof_handler.finite_elements->size(),
                                ExcInternalError());
@@ -1450,7 +1456,7 @@ DoFAccessor<dim,DH>::dof_index (const unsigned int i,
 
 template<int structdim, class DH>
 inline
-unsigned int DoFAccessor<structdim, DH>::mg_dof_index (const int level, const unsigned int i) const {
+types::global_dof_index DoFAccessor<structdim, DH>::mg_dof_index (const int level, const unsigned int i) const {
   return this->dof_handler->template get_dof_index<structdim> (level, this->present_index, 0, i);
 }
 
@@ -1459,7 +1465,7 @@ template <int dim, class DH>
 inline
 void
 DoFAccessor<dim,DH>::set_dof_index (const unsigned int i,
-                                                   const unsigned int index,
+                                                   const types::global_dof_index index,
                                                    const unsigned int fe_index) const
 {
                                    // access the respective DoF
@@ -1543,6 +1549,7 @@ DoFAccessor<structdim, DH>::vertex_dof_index (const unsigned int vertex,
 template<int structdim, class DH>
 inline
 unsigned
+types::global_dof_index
 DoFAccessor<structdim, DH>::mg_vertex_dof_index (const int level, const unsigned int vertex, const unsigned int i, const unsigned int fe_index) const {
   Assert (this->dof_handler != 0, ExcInvalidObject ());
   Assert (&this->dof_handler->get_fe () != 0, ExcInvalidObject ());
@@ -1557,7 +1564,7 @@ inline
 void
 DoFAccessor<structdim, DH>::set_vertex_dof_index (const unsigned int vertex,
                                                                          const unsigned int i,
-                                                                         const unsigned int index,
+                                                                         const types::global_dof_index index,
                                                                          const unsigned int fe_index) const
 {
   dealii::internal::DoFAccessor::Implementation::set_vertex_dof_index
@@ -1572,7 +1579,7 @@ DoFAccessor<structdim, DH>::set_vertex_dof_index (const unsigned int vertex,
 template<int structdim, class DH>
 inline
 void
-DoFAccessor<structdim, DH>::set_mg_vertex_dof_index (const int level, const unsigned int vertex, const unsigned int i, const unsigned int index, const unsigned int fe_index) const {
+DoFAccessor<structdim, DH>::set_mg_vertex_dof_index (const int level, const unsigned int vertex, const unsigned int i, const types::global_dof_index index, const unsigned int fe_index) const {
   Assert (this->dof_handler != 0, ExcInvalidObject ());
   Assert (&this->dof_handler->get_fe () != 0, ExcInvalidObject ());
   Assert (vertex < GeometryInfo<structdim>::vertices_per_cell, ExcIndexRange (vertex, 0, GeometryInfo<structdim>::vertices_per_cell));
@@ -1584,7 +1591,7 @@ DoFAccessor<structdim, DH>::set_mg_vertex_dof_index (const int level, const unsi
 template<int structdim, class DH>
 inline
 void
-DoFAccessor<structdim, DH>::set_mg_dof_index (const int level, const unsigned int i, const unsigned int index) const {
+DoFAccessor<structdim, DH>::set_mg_dof_index (const int level, const unsigned int i, const types::global_dof_index index) const {
   this->dof_handler->template set_dof_index<structdim> (level, this->present_index, 0, i, index);
 }
 
@@ -1635,12 +1642,12 @@ namespace internal
   {
     template <class DH>
     void get_dof_indices (const dealii::DoFAccessor<1,DH>   &accessor,
-                                     std::vector<unsigned int> &dof_indices,
+                                     std::vector<types::global_dof_index> &dof_indices,
                                      const unsigned int         fe_index)
     {
       const unsigned int dofs_per_vertex = accessor.get_fe(fe_index).dofs_per_vertex,
                                     dofs_per_line   = accessor.get_fe(fe_index).dofs_per_line;
-      std::vector<unsigned int>::iterator next = dof_indices.begin();
+      std::vector<types::global_dof_index>::iterator next = dof_indices.begin();
       for (unsigned int vertex=0; vertex<2; ++vertex)
            for (unsigned int d=0; d<dofs_per_vertex; ++d)
              *next++ = accessor.vertex_dof_index(vertex,d,fe_index);
@@ -1652,13 +1659,13 @@ namespace internal
 
     template <class DH>
     void get_dof_indices (const dealii::DoFAccessor<2,DH>   &accessor,
-                                     std::vector<unsigned int> &dof_indices,
+                                     std::vector<types::global_dof_index> &dof_indices,
                                      const unsigned int         fe_index)
     {
       const unsigned int dofs_per_vertex = accessor.get_fe(fe_index).dofs_per_vertex,
                                     dofs_per_line   = accessor.get_fe(fe_index).dofs_per_line,
                                     dofs_per_quad   = accessor.get_fe(fe_index).dofs_per_quad;
-      std::vector<unsigned int>::iterator next = dof_indices.begin();
+      std::vector<types::global_dof_index>::iterator next = dof_indices.begin();
       for (unsigned int vertex=0; vertex<4; ++vertex)
            for (unsigned int d=0; d<dofs_per_vertex; ++d)
              *next++ = accessor.vertex_dof_index(vertex,d,fe_index);
@@ -1687,14 +1694,14 @@ namespace internal
 
     template <class DH>
     void get_dof_indices (const dealii::DoFAccessor<3,DH>   &accessor,
-                                     std::vector<unsigned int> &dof_indices,
+                                     std::vector<types::global_dof_index> &dof_indices,
                                      const unsigned int         fe_index)
     {
       const unsigned int dofs_per_vertex = accessor.get_fe(fe_index).dofs_per_vertex,
                                     dofs_per_line   = accessor.get_fe(fe_index).dofs_per_line,
                                     dofs_per_quad   = accessor.get_fe(fe_index).dofs_per_quad,
                                     dofs_per_hex    = accessor.get_fe(fe_index).dofs_per_hex;
-      std::vector<unsigned int>::iterator next = dof_indices.begin();
+      std::vector<types::global_dof_index>::iterator next = dof_indices.begin();
       for (unsigned int vertex=0; vertex<8; ++vertex)
            for (unsigned int d=0; d<dofs_per_vertex; ++d)
              *next++ = accessor.vertex_dof_index(vertex,d,fe_index);
@@ -1740,9 +1747,9 @@ namespace internal
     }
     
     template<class DH>
-    void get_mg_dof_indices (const dealii::DoFAccessor<1, DH>& accessor, const int level, std::vector<unsigned int>& dof_indices, const unsigned int fe_index) {
+    void get_mg_dof_indices (const dealii::DoFAccessor<1, DH>& accessor, const int level, std::vector<types::global_dof_index>& dof_indices, const unsigned int fe_index) {
       const FiniteElement<DH::dimension, DH::space_dimension>& fe = accessor.get_dof_handler ().get_fe ()[fe_index];
-      std::vector<unsigned int>::iterator next = dof_indices.begin ();
+      std::vector<types::global_dof_index>::iterator next = dof_indices.begin ();
       
       for (unsigned int vertex = 0; vertex < GeometryInfo<1>::vertices_per_cell; ++vertex)
         for (unsigned int dof = 0; dof < fe.dofs_per_vertex; ++dof)
@@ -1755,9 +1762,9 @@ namespace internal
     }
     
     template<class DH>
-    void get_mg_dof_indices (const dealii::DoFAccessor<2, DH>& accessor, const int level, std::vector<unsigned int>& dof_indices, const unsigned int fe_index) {
+    void get_mg_dof_indices (const dealii::DoFAccessor<2, DH>& accessor, const int level, std::vector<types::global_dof_index>& dof_indices, const unsigned int fe_index) {
       const FiniteElement<DH::dimension, DH::space_dimension>& fe = accessor.get_dof_handler ().get_fe ()[fe_index];
-      std::vector<unsigned int>::iterator next = dof_indices.begin ();
+      std::vector<types::global_dof_index>::iterator next = dof_indices.begin ();
       
       for (unsigned int vertex = 0; vertex < GeometryInfo<2>::vertices_per_cell; ++vertex)
         for (unsigned int dof = 0; dof < fe.dofs_per_vertex; ++dof)
@@ -1774,9 +1781,9 @@ namespace internal
     }
     
     template<class DH>
-    void get_mg_dof_indices (const dealii::DoFAccessor<3, DH>& accessor, const int level, std::vector<unsigned int>& dof_indices, const unsigned int fe_index) {
+    void get_mg_dof_indices (const dealii::DoFAccessor<3, DH>& accessor, const int level, std::vector<types::global_dof_index>& dof_indices, const unsigned int fe_index) {
       const FiniteElement<DH::dimension, DH::space_dimension>& fe = accessor.get_dof_handler ().get_fe ()[fe_index];
-      std::vector<unsigned int>::iterator next = dof_indices.begin ();
+      std::vector<types::global_dof_index>::iterator next = dof_indices.begin ();
       
       for (unsigned int vertex = 0; vertex < GeometryInfo<3>::vertices_per_cell; ++vertex)
         for (unsigned int dof = 0; dof < fe.dofs_per_vertex; ++dof)
@@ -1802,7 +1809,7 @@ namespace internal
 template <int structdim, class DH>
 inline
 void
-DoFAccessor<structdim,DH>::get_dof_indices (std::vector<unsigned int> &dof_indices,
+DoFAccessor<structdim,DH>::get_dof_indices (std::vector<types::global_dof_index> &dof_indices,
                                                                const unsigned int         fe_index) const
 {
   Assert (static_cast<unsigned int>(this->level()) < this->dof_handler->levels.size(),
@@ -1865,7 +1872,7 @@ DoFAccessor<structdim,DH>::get_dof_indices (std::vector<unsigned int> &dof_indic
 
 template<int structdim, class DH>
 inline
-void DoFAccessor<structdim, DH>::get_mg_dof_indices (const int level, std::vector<unsigned int>& dof_indices, const unsigned int fe_index) const {
+void DoFAccessor<structdim, DH>::get_mg_dof_indices (const int level, std::vector<types::global_dof_index>& dof_indices, const unsigned int fe_index) const {
   Assert (this->dof_handler != 0, ExcInvalidObject ());
   Assert (&this->dof_handler->get_fe () != 0, ExcInvalidObject ());
   
@@ -2018,7 +2025,7 @@ template <template <int, int> class DH, int spacedim>
 inline
 void
 DoFAccessor<0,DH<1,spacedim> >::
-get_dof_indices (std::vector<unsigned int> &dof_indices,
+get_dof_indices (std::vector<types::global_dof_index> &dof_indices,
                         const unsigned int fe_index) const
 {
   for (unsigned int i=0; i<dof_indices.size(); ++i)
@@ -2153,7 +2160,7 @@ namespace internal
                            ->cell_dof_indices_cache.size(),
                            ExcInternalError());
 
-               std::vector<unsigned int>::iterator next
+               std::vector<types::global_dof_index>::iterator next
                  = (accessor.dof_handler->levels[accessor.present_level]
                         ->cell_dof_indices_cache.begin() + accessor.present_index * dofs_per_cell);
 
@@ -2199,7 +2206,7 @@ namespace internal
                            ->cell_dof_indices_cache.size(),
                            ExcInternalError());
 
-               std::vector<unsigned int>::iterator next
+               std::vector<types::global_dof_index>::iterator next
                  = (accessor.dof_handler->levels[accessor.present_level]
                         ->cell_dof_indices_cache.begin() + accessor.present_index * dofs_per_cell);
 
@@ -2249,7 +2256,7 @@ namespace internal
                            ->cell_dof_indices_cache.size(),
                            ExcInternalError());
 
-               std::vector<unsigned int>::iterator next
+               std::vector<types::global_dof_index>::iterator next
                  = (accessor.dof_handler->levels[accessor.present_level]
                         ->cell_dof_indices_cache.begin() + accessor.present_index * dofs_per_cell);
 
@@ -2324,7 +2331,7 @@ namespace internal
            static
            void
            set_dof_indices (DoFCellAccessor<DoFHandler<1,spacedim> > &accessor,
-                                    const std::vector<unsigned int>          &local_dof_indices)
+                                    const std::vector<types::global_dof_index>          &dof_indices)
              {
                Assert (accessor.has_children() == false,
                            ExcInternalError());
@@ -2333,7 +2340,7 @@ namespace internal
                                           dofs_per_line   = accessor.get_fe().dofs_per_line,
                                           dofs_per_cell   = accessor.get_fe().dofs_per_cell;
 
-               Assert (local_dof_indices.size() == dofs_per_cell,
+               Assert (dof_indices.size() == dofs_per_cell,
                            ExcInternalError());
 
                unsigned int index = 0;
@@ -2355,7 +2362,7 @@ namespace internal
            static
            void
            set_dof_indices (DoFCellAccessor<DoFHandler<2,spacedim> > &accessor,
-                                    const std::vector<unsigned int>          &local_dof_indices)
+                                    const std::vector<types::global_dof_index>          &local_dof_indices)
              {
                Assert (accessor.has_children() == false,
                            ExcInternalError());
@@ -2391,7 +2398,7 @@ namespace internal
            static
            void
            set_dof_indices (DoFCellAccessor<DoFHandler<3,spacedim> > &accessor,
-                                    const std::vector<unsigned int>          &local_dof_indices)
+                                    const std::vector<types::global_dof_index>          &dof_indices)
              {
                Assert (accessor.has_children() == false,
                            ExcInternalError());
@@ -2402,7 +2409,7 @@ namespace internal
                                           dofs_per_hex    = accessor.get_fe().dofs_per_hex,
                                           dofs_per_cell   = accessor.get_fe().dofs_per_cell;
 
-               Assert (local_dof_indices.size() == dofs_per_cell,
+               Assert (dof_indices.size() == dofs_per_cell,
                            ExcInternalError());
 
                unsigned int index = 0;
@@ -2410,7 +2417,7 @@ namespace internal
                for (unsigned int vertex=0; vertex<8; ++vertex)
                  for (unsigned int d=0; d<dofs_per_vertex; ++d, ++index)
                        accessor.set_vertex_dof_index(vertex,d,
-                                                                 local_dof_indices[index]);
+                                                                 dof_indices[index]);
                                              // now copy dof numbers into the line. for
                                              // lines with the wrong orientation, we have
                                              // already made sure that we're ok by picking
@@ -2465,7 +2472,7 @@ namespace internal
            static
            void
            set_dof_indices (const DoFCellAccessor<dealii::hp::DoFHandler<dim,spacedim> > &,
-                                    const std::vector<unsigned int> &)
+                                    const std::vector<types::global_dof_index> &)
              {
                Assert (false, ExcNotImplemented());
              }
@@ -2484,7 +2491,7 @@ namespace internal
            static
            void
            get_dof_indices (const DoFCellAccessor<DoFHandler<dim,spacedim> > &accessor,
-                                    std::vector<unsigned int>                        &dof_indices)
+                                    std::vector<types::global_dof_index>                        &dof_indices)
              {
                typedef
                  dealii::DoFAccessor<dim,DoFHandler<dim,spacedim> >
@@ -2501,7 +2508,7 @@ namespace internal
                             accessor.get_fe().dofs_per_vertex * GeometryInfo<dim>::vertices_per_cell),
                            ExcMessage ("Cell must either be active, or all DoFs must be in vertices"));
 
-               unsigned int *cache = &accessor.dof_handler->levels[accessor.level()]
+               types::global_dof_index *cache = &accessor.dof_handler->levels[accessor.level()]
                                                  ->cell_dof_indices_cache[accessor.present_index * accessor.get_fe().dofs_per_cell];
                for (unsigned int i=0; i<accessor.get_fe().dofs_per_cell; ++i, ++cache)
                  dof_indices[i] = *cache;
@@ -2518,7 +2525,7 @@ namespace internal
            static
            void
            get_dof_indices (const DoFCellAccessor<dealii::hp::DoFHandler<dim,spacedim> > &accessor,
-                                    std::vector<unsigned int>                            &dof_indices)
+                                    std::vector<types::global_dof_index>                            &dof_indices)
              {
                                              // no caching for
                                              // hp::DoFHandler
@@ -2564,7 +2571,7 @@ namespace internal
                             accessor.get_fe().dofs_per_vertex * GeometryInfo<dim>::vertices_per_cell),
                            ExcMessage ("Cell must either be active, or all DoFs must be in vertices"));
 
-               unsigned int *cache = &accessor.dof_handler->levels[accessor.level()]
+               types::global_dof_index *cache = &accessor.dof_handler->levels[accessor.level()]
                                                  ->cell_dof_indices_cache[accessor.present_index *
                                                                                       accessor.get_fe().dofs_per_cell];
                for ( ; local_values_begin != local_values_end; ++local_values_begin, ++cache)
@@ -2595,7 +2602,7 @@ namespace internal
                            typename BaseClass::ExcVectorDoesNotMatch());
                const unsigned int dofs_per_cell = accessor.get_fe().dofs_per_cell;
 
-               std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+               std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
                get_dof_indices (accessor, local_dof_indices);
 
                for (unsigned int i=0; i<dofs_per_cell; ++i, ++local_values_begin)
@@ -2637,7 +2644,7 @@ namespace internal
                             accessor.get_fe().dofs_per_vertex * GeometryInfo<dim>::vertices_per_cell),
                            ExcMessage ("Cell must either be active, or all DoFs must be in vertices"));
 
-               unsigned int *cache = &accessor.dof_handler->levels[accessor.level()]
+               types::global_dof_index *cache = &accessor.dof_handler->levels[accessor.level()]
                                                  ->cell_dof_indices_cache[accessor.present_index *
                                                                                       accessor.get_fe().dofs_per_cell];
                constraints.get_dof_values(values, *cache, local_values_begin,
@@ -2668,7 +2675,7 @@ namespace internal
                            typename BaseClass::ExcVectorDoesNotMatch());
                const unsigned int dofs_per_cell = accessor.get_fe().dofs_per_cell;
 
-               std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+               std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
                get_dof_indices (accessor, local_dof_indices);
 
                constraints.get_dof_values (values, local_dof_indices.begin(),
@@ -2703,7 +2710,7 @@ namespace internal
                             accessor.get_fe().dofs_per_vertex * GeometryInfo<dim>::vertices_per_cell),
                            ExcMessage ("Cell must either be active, or all DoFs must be in vertices"));
 
-               unsigned int *cache = &accessor.dof_handler->levels[accessor.level()]
+               types::global_dof_index *cache = &accessor.dof_handler->levels[accessor.level()]
                                                  ->cell_dof_indices_cache[accessor.present_index * accessor.get_fe().dofs_per_cell];
                for (unsigned int i=0; i<accessor.get_fe().dofs_per_cell; ++i, ++cache)
                  values(*cache) = local_values(i);
@@ -2722,7 +2729,7 @@ namespace internal
                                              // implemented
                const unsigned int dofs_per_cell = accessor.get_fe().dofs_per_cell;
 
-               std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+               std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
                get_dof_indices (accessor, local_dof_indices);
 
                for (unsigned int i=0; i<dofs_per_cell; ++i)
@@ -2839,7 +2846,7 @@ namespace internal
 
                const unsigned int n_dofs = local_source_end - local_source_begin;
 
-               unsigned int * dofs = &accessor.dof_handler->levels[accessor.level()]
+               types::global_dof_index * dofs = &accessor.dof_handler->levels[accessor.level()]
                                      ->cell_dof_indices_cache[accessor.present_index * n_dofs];
 
                                              // distribute cell vector
@@ -2871,7 +2878,7 @@ namespace internal
 //TODO[WB/MK]: This function could me made more efficient because it allocates memory, which could be avoided by passing in another argument as a scratch array. This should be fixed eventually
 
                                              // get indices of dofs
-               std::vector<unsigned int> dofs (n_dofs);
+               std::vector<types::global_dof_index> dofs (n_dofs);
                accessor.get_dof_indices (dofs);
 
                                              // distribute cell vector
@@ -2910,7 +2917,7 @@ namespace internal
 
                const unsigned int n_dofs = local_source_end - local_source_begin;
 
-               unsigned int * dofs = &accessor.dof_handler->levels[accessor.level()]
+               types::global_dof_index * dofs = &accessor.dof_handler->levels[accessor.level()]
                                      ->cell_dof_indices_cache[accessor.present_index * n_dofs];
 
                                              // distribute cell vector
@@ -2944,7 +2951,7 @@ namespace internal
 //TODO[WB/MK]: This function could me made more efficient because it allocates memory, which could be avoided by passing in another argument as a scratch array. This should be fixed eventually
 
                                              // get indices of dofs
-               std::vector<unsigned int> dofs (n_dofs);
+               std::vector<types::global_dof_index> dofs (n_dofs);
                accessor.get_dof_indices (dofs);
 
                                              // distribute cell vector
@@ -2986,7 +2993,7 @@ namespace internal
 
                const unsigned int n_dofs = local_source.m();
 
-               unsigned int * dofs = &accessor.dof_handler->levels[accessor.level()]
+               types::global_dof_index * dofs = &accessor.dof_handler->levels[accessor.level()]
                                      ->cell_dof_indices_cache[accessor.present_index * n_dofs];
 
                                              // distribute cell matrix
@@ -3023,7 +3030,7 @@ namespace internal
 //TODO[WB/MK]: This function could me made more efficient because it allocates memory, which could be avoided by passing in another argument as a scratch array.
 
                                              // get indices of dofs
-               std::vector<unsigned int> dofs (n_dofs);
+               std::vector<types::global_dof_index> dofs (n_dofs);
                accessor.get_dof_indices (dofs);
 
                                              // distribute cell matrix
@@ -3070,7 +3077,7 @@ namespace internal
                            ExcMessage ("Cell must either be active, or all DoFs must be in vertices"));
 
                const unsigned int n_dofs = accessor.get_fe().dofs_per_cell;
-               unsigned int * dofs = &accessor.dof_handler->levels[accessor.level()]
+               types::global_dof_index * dofs = &accessor.dof_handler->levels[accessor.level()]
                                      ->cell_dof_indices_cache[accessor.present_index * n_dofs];
 
                                              // distribute cell matrices
@@ -3116,7 +3123,7 @@ namespace internal
 //TODO[WB/MK]: This function could me made more efficient because it allocates memory, which could be avoided by passing in another argument as a scratch array.
 
                                              // get indices of dofs
-               std::vector<unsigned int> dofs (n_dofs);
+               std::vector<types::global_dof_index> dofs (n_dofs);
                accessor.get_dof_indices (dofs);
 
                                              // distribute cell matrix and vector
@@ -3299,7 +3306,7 @@ get_dof_indices (std::vector<types::global_dof_index> &dof_indices) const
 
 template<class DH>
 inline
-void DoFCellAccessor<DH>::get_mg_dof_indices (std::vector<unsigned int>& dof_indices) const {
+void DoFCellAccessor<DH>::get_mg_dof_indices (std::vector<types::global_dof_index>& dof_indices) const {
   DoFAccessor<dim, DH>::get_mg_dof_indices (this->level (), dof_indices);
 }
 

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.