]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
convert some unsigned ints to types::global_dof_index
authorkoecher <koecher@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 10 Aug 2012 16:44:51 +0000 (16:44 +0000)
committerkoecher <koecher@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 10 Aug 2012 16:44:51 +0000 (16:44 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_3@25889 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/files
deal.II/include/deal.II/numerics/matrix_tools.h
deal.II/source/numerics/matrix_tools.cc

index 5b38b2e2c7d51772fed9d01ad5b4f80b69b349bd..d90abcd9587a1ca749cfaa84a7cace03b43260bf 100644 (file)
@@ -189,8 +189,8 @@ UWE source/numerics/dof_output_operator.cc
 UWE source/numerics/error_estimator.cc
 UWE source/numerics/fe_field_function.cc
 UWE source/numerics/histogram.cc
-Uwe source/numerics/matrix_free.cc
-source/numerics/matrix_tools.cc
+UWE source/numerics/matrix_free.cc
+UWE source/numerics/matrix_tools.cc
 source/numerics/mesh_worker.cc
 source/numerics/mesh_worker_info.cc
 source/numerics/mesh_worker_vector_selector.cc
index 882c422ad1143c278f5f99f932e27850f48dabb5..0dc698d2d700d28e8da8bcebb5e0255135dca588 100644 (file)
@@ -367,7 +367,7 @@ namespace MatrixCreator
                                     SparseMatrix<double>     &matrix,
                                     const typename FunctionMap<spacedim>::type &boundary_functions,
                                     Vector<double>           &rhs_vector,
-                                    std::vector<unsigned int>&dof_to_boundary_mapping,
+                                    std::vector<types::global_dof_index>&dof_to_boundary_mapping,
                                     const Function<spacedim> * const weight = 0,
                                     std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
 
@@ -380,7 +380,7 @@ namespace MatrixCreator
 //                                    SparseMatrix<double>   &matrix,
 //                                    const FunctionMap<1>::type &boundary_functions,
 //                                    Vector<double>         &rhs_vector,
-//                                    std::vector<unsigned int>&dof_to_boundary_mapping,
+//                                    std::vector<types::global_dof_index>&dof_to_boundary_mapping,
 //                                    const Function<1> * const a = 0);
 // //codimension 1
 //
@@ -390,7 +390,7 @@ namespace MatrixCreator
 //                                    SparseMatrix<double>   &matrix,
 //                                    const FunctionMap<2>::type &boundary_functions,
 //                                    Vector<double>         &rhs_vector,
-//                                    std::vector<unsigned int>&dof_to_boundary_mapping,
+//                                    std::vector<types::global_dof_index>&dof_to_boundary_mapping,
 //                                    const Function<2> * const a = 0);
 
 
@@ -408,7 +408,7 @@ namespace MatrixCreator
                                     SparseMatrix<double>     &matrix,
                                     const typename FunctionMap<spacedim>::type        &boundary_functions,
                                     Vector<double>           &rhs_vector,
-                                    std::vector<unsigned int>&dof_to_boundary_mapping,
+                                    std::vector<types::global_dof_index>&dof_to_boundary_mapping,
                                     const Function<spacedim> * const a = 0,
                                     std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
 
@@ -424,7 +424,7 @@ namespace MatrixCreator
                                     SparseMatrix<double>     &matrix,
                                     const typename FunctionMap<spacedim>::type &boundary_functions,
                                     Vector<double>           &rhs_vector,
-                                    std::vector<unsigned int>&dof_to_boundary_mapping,
+                                    std::vector<types::global_dof_index>&dof_to_boundary_mapping,
                                     const Function<spacedim> * const a = 0,
                                     std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
 
@@ -439,7 +439,7 @@ namespace MatrixCreator
 //                                    SparseMatrix<double>   &matrix,
 //                                    const FunctionMap<1>::type &boundary_functions,
 //                                    Vector<double>         &rhs_vector,
-//                                    std::vector<unsigned int>&dof_to_boundary_mapping,
+//                                    std::vector<types::global_dof_index>&dof_to_boundary_mapping,
 //                                    const Function<1> * const a = 0);
 
                                    /**
@@ -453,7 +453,7 @@ namespace MatrixCreator
                                     SparseMatrix<double>     &matrix,
                                     const typename FunctionMap<spacedim>::type        &boundary_functions,
                                     Vector<double>           &rhs_vector,
-                                    std::vector<unsigned int>&dof_to_boundary_mapping,
+                                    std::vector<types::global_dof_index>&dof_to_boundary_mapping,
                                     const Function<spacedim> * const a = 0,
                                     std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
 
@@ -805,7 +805,7 @@ namespace MatrixTools
                                     */
   template <typename number>
   void
-  apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
                          SparseMatrix<number>  &matrix,
                          Vector<number>        &solution,
                          Vector<number>        &right_hand_side,
@@ -822,7 +822,7 @@ namespace MatrixTools
                                     */
   template <typename number>
   void
-  apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
                          BlockSparseMatrix<number>           &matrix,
                          BlockVector<number>                 &solution,
                          BlockVector<number>                 &right_hand_side,
@@ -867,7 +867,7 @@ namespace MatrixTools
                                     * step-18.
                                     */
   void
-  apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
                          PETScWrappers::SparseMatrix  &matrix,
                          PETScWrappers::Vector  &solution,
                          PETScWrappers::Vector  &right_hand_side,
@@ -878,7 +878,7 @@ namespace MatrixTools
                                     * matrices.
                                     */
   void
-  apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
                          PETScWrappers::MPI::SparseMatrix  &matrix,
                          PETScWrappers::MPI::Vector  &solution,
                          PETScWrappers::MPI::Vector  &right_hand_side,
@@ -910,7 +910,7 @@ namespace MatrixTools
                                     * to this function is the same.
                                     */
   void
-  apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
                          PETScWrappers::MPI::SparseMatrix  &matrix,
                          PETScWrappers::Vector       &solution,
                          PETScWrappers::MPI::Vector  &right_hand_side,
@@ -920,7 +920,7 @@ namespace MatrixTools
                                     * Same as above but for BlockSparseMatrix.
                                     */
   void
-  apply_boundary_values (const std::map<unsigned int,double>  &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,double>  &boundary_values,
                          PETScWrappers::MPI::BlockSparseMatrix  &matrix,
                          PETScWrappers::MPI::BlockVector        &solution,
                          PETScWrappers::MPI::BlockVector        &right_hand_side,
@@ -968,7 +968,7 @@ namespace MatrixTools
                                     * across an MPI system.
                                     */
   void
-  apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
                          TrilinosWrappers::SparseMatrix  &matrix,
                          TrilinosWrappers::Vector        &solution,
                          TrilinosWrappers::Vector        &right_hand_side,
@@ -980,7 +980,7 @@ namespace MatrixTools
                                     * working on block structures.
                                     */
   void
-  apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
                          TrilinosWrappers::BlockSparseMatrix  &matrix,
                          TrilinosWrappers::BlockVector        &solution,
                          TrilinosWrappers::BlockVector        &right_hand_side,
@@ -1023,7 +1023,7 @@ namespace MatrixTools
                                     * types.
                                     */
   void
-  apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
                          TrilinosWrappers::SparseMatrix  &matrix,
                          TrilinosWrappers::MPI::Vector   &solution,
                          TrilinosWrappers::MPI::Vector   &right_hand_side,
@@ -1035,7 +1035,7 @@ namespace MatrixTools
                                     * on block structures.
                                     */
   void
-  apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
                          TrilinosWrappers::BlockSparseMatrix  &matrix,
                          TrilinosWrappers::MPI::BlockVector   &solution,
                          TrilinosWrappers::MPI::BlockVector   &right_hand_side,
@@ -1079,8 +1079,8 @@ namespace MatrixTools
                                     * documentation of this class.
                                     */
   void
-  local_apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
-                               const std::vector<unsigned int> &local_dof_indices,
+  local_apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
+                               const std::vector<types::global_dof_index> &local_dof_indices,
                                FullMatrix<double> &local_matrix,
                                Vector<double>     &local_rhs,
                                const bool          eliminate_columns);
index 84bf26e84e8e58c2d9cbb6d1bd71f1c28e4fe893..e51cabea5cb37c1b3269d2deea565b2945e9f7df 100644 (file)
@@ -207,7 +207,7 @@ namespace MatrixCreator
 
       struct CopyData
       {
-          std::vector<unsigned int> dof_indices;
+          std::vector<types::global_dof_index> dof_indices;
           FullMatrix<double>        cell_matrix;
           dealii::Vector<double>    cell_rhs;
       };
@@ -825,7 +825,7 @@ namespace MatrixCreator
                                    SparseMatrix<double>      &matrix,
                                    const typename FunctionMap<spacedim>::type &boundary_functions,
                                    Vector<double>            &rhs_vector,
-                                   std::vector<unsigned int> &dof_to_boundary_mapping,
+                                   std::vector<types::global_dof_index> &dof_to_boundary_mapping,
                                    const Function<spacedim> * const coefficient,
                                    const std::vector<unsigned int>& component_mapping,
                                    const MatrixCreator::internal::IteratorRange<DoFHandler<dim,spacedim> >   range,
@@ -870,8 +870,8 @@ namespace MatrixCreator
       std::vector<Vector<double> > rhs_values_system (fe_values.n_quadrature_points,
                                                       Vector<double>(n_function_components));
 
-      std::vector<unsigned int> dofs (dofs_per_cell);
-      std::vector<unsigned int> dofs_on_face_vector (dofs_per_face);
+      std::vector<types::global_dof_index> dofs (dofs_per_cell);
+      std::vector<types::global_dof_index> dofs_on_face_vector (dofs_per_face);
 
                                        // for each dof on the cell, have a
                                        // flag whether it is on the face
@@ -1093,7 +1093,7 @@ namespace MatrixCreator
                                         SparseMatrix<double>  &,
                                         const FunctionMap<3>::type &,
                                         Vector<double> &,
-                                        std::vector<unsigned int> &,
+                                        std::vector<types::global_dof_index> &,
                                         const Function<3> * const ,
                                         const std::vector<unsigned int> &,
                                         const MatrixCreator::internal::IteratorRange<DoFHandler<2,3> > ,
@@ -1112,7 +1112,7 @@ namespace MatrixCreator
                                         SparseMatrix<double>  &,
                                         const FunctionMap<3>::type &,
                                         Vector<double> &,
-                                        std::vector<unsigned int> &,
+                                        std::vector<types::global_dof_index> &,
                                         const Function<3> * const ,
                                         const std::vector<unsigned int> &,
                                         const MatrixCreator::internal::IteratorRange<DoFHandler<1,3> > ,
@@ -1133,7 +1133,7 @@ namespace MatrixCreator
                                SparseMatrix<double>  &matrix,
                                const typename FunctionMap<spacedim>::type  &boundary_functions,
                                Vector<double>            &rhs_vector,
-                               std::vector<unsigned int> &dof_to_boundary_mapping,
+                               std::vector<types::global_dof_index> &dof_to_boundary_mapping,
                                const Function<spacedim> * const coefficient,
                                std::vector<unsigned int> component_mapping)
   {
@@ -1193,7 +1193,7 @@ namespace MatrixCreator
        SparseMatrix<double>      &matrix,
        const typename FunctionMap<spacedim>::type &boundary_functions,
        Vector<double>            &rhs_vector,
-       std::vector<unsigned int> &dof_to_boundary_mapping,
+       std::vector<types::global_dof_index> &dof_to_boundary_mapping,
        const Function<spacedim> * const coefficient,
        const std::vector<unsigned int>& component_mapping,
        const MatrixCreator::internal::IteratorRange<DoFHandler<dim,spacedim> >   range,
@@ -1225,7 +1225,7 @@ namespace MatrixCreator
                                    SparseMatrix<double>      &matrix,
                                    const typename FunctionMap<spacedim>::type &boundary_functions,
                                    Vector<double>            &rhs_vector,
-                                   std::vector<unsigned int> &dof_to_boundary_mapping,
+                                   std::vector<types::global_dof_index> &dof_to_boundary_mapping,
                                    const Function<spacedim> * const coefficient,
                                    const std::vector<unsigned int>& component_mapping,
                                    const MatrixCreator::internal::IteratorRange<hp::DoFHandler<dim,spacedim> >   range,
@@ -1242,7 +1242,7 @@ namespace MatrixCreator
       if (true)
         {
           unsigned int max_element = 0;
-          for (std::vector<unsigned int>::const_iterator i=dof_to_boundary_mapping.begin();
+          for (std::vector<types::global_dof_index>::const_iterator i=dof_to_boundary_mapping.begin();
                i!=dof_to_boundary_mapping.end(); ++i)
             if ((*i != hp::DoFHandler<dim,spacedim>::invalid_dof_index) &&
                 (*i > max_element))
@@ -1272,8 +1272,8 @@ namespace MatrixCreator
       std::vector<double>          rhs_values_scalar;
       std::vector<Vector<double> > rhs_values_system;
 
-      std::vector<unsigned int> dofs (max_dofs_per_cell);
-      std::vector<unsigned int> dofs_on_face_vector (max_dofs_per_face);
+      std::vector<types::global_dof_index> dofs (max_dofs_per_cell);
+      std::vector<types::global_dof_index> dofs_on_face_vector (max_dofs_per_face);
 
                                        // for each dof on the cell, have a
                                        // flag whether it is on the face
@@ -1591,7 +1591,7 @@ namespace MatrixCreator
                                     SparseMatrix<double>      &matrix,
                                     const typename FunctionMap<spacedim>::type &rhs,
                                     Vector<double>            &rhs_vector,
-                                    std::vector<unsigned int> &dof_to_boundary_mapping,
+                                    std::vector<types::global_dof_index> &dof_to_boundary_mapping,
                                     const Function<spacedim> * const a,
                                     std::vector<unsigned int> component_mapping)
   {
@@ -1610,7 +1610,7 @@ namespace MatrixCreator
                                SparseMatrix<double>      &matrix,
                                const typename FunctionMap<spacedim>::type         &boundary_functions,
                                Vector<double>            &rhs_vector,
-                               std::vector<unsigned int> &dof_to_boundary_mapping,
+                               std::vector<types::global_dof_index> &dof_to_boundary_mapping,
                                const Function<spacedim> * const coefficient,
                                std::vector<unsigned int> component_mapping)
   {
@@ -1670,7 +1670,7 @@ namespace MatrixCreator
        SparseMatrix<double>      &matrix,
        const typename FunctionMap<spacedim>::type &boundary_functions,
        Vector<double>            &rhs_vector,
-       std::vector<unsigned int> &dof_to_boundary_mapping,
+       std::vector<types::global_dof_index> &dof_to_boundary_mapping,
        const Function<spacedim> * const coefficient,
        const std::vector<unsigned int>& component_mapping,
        const MatrixCreator::internal::IteratorRange<hp::DoFHandler<dim,spacedim> >   range,
@@ -1697,7 +1697,7 @@ namespace MatrixCreator
                                     SparseMatrix<double>      &matrix,
                                     const typename FunctionMap<spacedim>::type &rhs,
                                     Vector<double>            &rhs_vector,
-                                    std::vector<unsigned int> &dof_to_boundary_mapping,
+                                    std::vector<types::global_dof_index> &dof_to_boundary_mapping,
                                     const Function<spacedim> * const a,
                                     std::vector<unsigned int> component_mapping)
   {
@@ -1943,7 +1943,7 @@ namespace MatrixTools
 //TODO:[WB] I don't think that the optimized storage of diagonals is needed (GK)
   template <typename number>
   void
-  apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
                          SparseMatrix<number>  &matrix,
                          Vector<number>   &solution,
                          Vector<number>   &right_hand_side,
@@ -1980,7 +1980,7 @@ namespace MatrixTools
         }
 
 
-    std::map<unsigned int,double>::const_iterator dof  = boundary_values.begin(),
+    std::map<types::global_dof_index,double>::const_iterator dof  = boundary_values.begin(),
                                                   endd = boundary_values.end();
     const SparsityPattern    &sparsity    = matrix.get_sparsity_pattern();
     const std::size_t  *sparsity_rowstart = sparsity.get_rowstart_indices();
@@ -1989,7 +1989,7 @@ namespace MatrixTools
       {
         Assert (dof->first < n_dofs, ExcInternalError());
 
-        const unsigned int dof_number = dof->first;
+        const types::global_dof_index dof_number = dof->first;
                                          // for each boundary dof:
 
                                          // set entries of this line
@@ -2000,8 +2000,8 @@ namespace MatrixTools
                                          // we shall not set
                                          // matrix.global_entry(
                                          //     sparsity_rowstart[dof.first])
-        const unsigned int last = sparsity_rowstart[dof_number+1];
-        for (unsigned int j=sparsity_rowstart[dof_number]+1; j<last; ++j)
+        const types::global_dof_index last = sparsity_rowstart[dof_number+1];
+        for (types::global_dof_index j=sparsity_rowstart[dof_number]+1; j<last; ++j)
           matrix.global_entry(j) = 0.;
 
 
@@ -2063,7 +2063,7 @@ namespace MatrixTools
                                              // since that is the
                                              // diagonal element and
                                              // thus the present row
-            for (unsigned int j=sparsity_rowstart[dof_number]+1; j<last; ++j)
+            for (types::global_dof_index j=sparsity_rowstart[dof_number]+1; j<last; ++j)
               {
                 const unsigned int row = sparsity_colnums[j];
 
@@ -2109,7 +2109,7 @@ namespace MatrixTools
 
   template <typename number>
   void
-  apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
                          BlockSparseMatrix<number>  &matrix,
                          BlockVector<number>   &solution,
                          BlockVector<number>   &right_hand_side,
@@ -2174,7 +2174,7 @@ namespace MatrixTools
       first_nonzero_diagonal_entry = 1;
 
 
-    std::map<unsigned int,double>::const_iterator dof  = boundary_values.begin(),
+    std::map<types::global_dof_index,double>::const_iterator dof  = boundary_values.begin(),
                                                   endd = boundary_values.end();
     const BlockSparsityPattern &
       sparsity_pattern = matrix.get_sparsity_pattern();
@@ -2195,8 +2195,8 @@ namespace MatrixTools
                                          // get global index and index
                                          // in the block in which this
                                          // dof is located
-        const unsigned int dof_number = dof->first;
-        const std::pair<unsigned int,unsigned int>
+        const types::global_dof_index dof_number = dof->first;
+        const std::pair<types::global_dof_index,unsigned int>
           block_index = index_mapping.global_to_local (dof_number);
 
                                          // for each boundary dof:
@@ -2359,7 +2359,7 @@ namespace MatrixTools
                                                      // cases with
                                                      // square
                                                      // sub-matrices
-                    const unsigned int *p = 0;
+                    const types::global_dof_index *p = 0;
                     if (this_sparsity.n_rows() == this_sparsity.n_cols())
                       {
                         if (this_sparsity.get_column_numbers()
@@ -2404,7 +2404,7 @@ namespace MatrixTools
                              [this_sparsity.get_rowstart_indices()[row+1]]),
                             ExcInternalError());
 
-                    const unsigned int global_entry
+                    const types::global_dof_index global_entry
                       = (p
                          -
                          &this_sparsity.get_column_numbers()
@@ -2436,7 +2436,7 @@ namespace MatrixTools
     {
       template <typename PETScMatrix, typename PETScVector>
       void
-      apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+      apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
                              PETScMatrix      &matrix,
                              PETScVector      &solution,
                              PETScVector      &right_hand_side,
@@ -2483,7 +2483,7 @@ namespace MatrixTools
                                          // figure out which rows of the matrix we
                                          // have to eliminate on this processor
         std::vector<unsigned int> constrained_rows;
-        for (std::map<unsigned int,double>::const_iterator
+        for (std::map<types::global_dof_index,double>::const_iterator
                dof  = boundary_values.begin();
              dof != boundary_values.end();
              ++dof)
@@ -2521,9 +2521,9 @@ namespace MatrixTools
         right_hand_side.compress ();
         solution.compress ();
 
-        std::vector<unsigned int> indices;
+        std::vector<types::global_dof_index> indices;
         std::vector<PetscScalar>  solution_values;
-        for (std::map<unsigned int,double>::const_iterator
+        for (std::map<types::global_dof_index,double>::const_iterator
                dof  = boundary_values.begin();
              dof != boundary_values.end();
              ++dof)
@@ -2553,7 +2553,7 @@ namespace MatrixTools
 
 
   void
-  apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
                          PETScWrappers::SparseMatrix   &matrix,
                          PETScWrappers::Vector   &solution,
                          PETScWrappers::Vector   &right_hand_side,
@@ -2568,7 +2568,7 @@ namespace MatrixTools
 
 
   void
-  apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
                          PETScWrappers::MPI::SparseMatrix   &matrix,
                          PETScWrappers::MPI::Vector   &solution,
                          PETScWrappers::MPI::Vector   &right_hand_side,
@@ -2585,7 +2585,7 @@ namespace MatrixTools
 
 
   void
-  apply_boundary_values (const std::map<unsigned int,double>  &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,double>  &boundary_values,
                          PETScWrappers::MPI::BlockSparseMatrix  &matrix,
                          PETScWrappers::MPI::BlockVector        &solution,
                          PETScWrappers::MPI::BlockVector        &right_hand_side,
@@ -2609,7 +2609,7 @@ namespace MatrixTools
     std::vector<std::map<unsigned int,double> > block_boundary_values(n_blocks);
     {
       int offset = 0, block=0;
-      for (std::map<unsigned int,double>::const_iterator
+      for (std::map<types::global_dof_index,double>::const_iterator
              dof  = boundary_values.begin();
            dof != boundary_values.end();
            ++dof)
@@ -2619,8 +2619,8 @@ namespace MatrixTools
               offset += matrix.block(block,0).m();
               block++;
             }
-          const unsigned int index = dof->first - offset;
-          block_boundary_values[block].insert(std::pair<unsigned int, double> (index,dof->second));
+          const types::global_dof_index index = dof->first - offset;
+          block_boundary_values[block].insert(std::pair<types::global_dof_index, double> (index,dof->second));
         }
     }
 
@@ -2640,11 +2640,11 @@ namespace MatrixTools
                                      // the whole row.
     for (unsigned int block_m=0; block_m<n_blocks; ++block_m)
       {
-        const std::pair<unsigned int, unsigned int> local_range
+        const std::pair<types::global_dof_index, types::global_dof_index> local_range
           = matrix.block(block_m,0).local_range();
 
         std::vector<unsigned int> constrained_rows;
-        for (std::map<unsigned int,double>::const_iterator
+        for (std::map<types::global_dof_index,double>::const_iterator
                dof  = block_boundary_values[block_m].begin();
              dof != block_boundary_values[block_m].end();
              ++dof)
@@ -2670,7 +2670,7 @@ namespace MatrixTools
     {
       template <typename TrilinosMatrix, typename TrilinosVector>
       void
-      apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+      apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
                              TrilinosMatrix      &matrix,
                              TrilinosVector      &solution,
                              TrilinosVector      &right_hand_side,
@@ -2688,7 +2688,7 @@ namespace MatrixTools
         if (boundary_values.size() == 0)
           return;
 
-        const std::pair<unsigned int, unsigned int> local_range
+        const std::pair<types::global_dof_index, types::global_dof_index> local_range
           = matrix.local_range();
         Assert (local_range == right_hand_side.local_range(),
                 ExcInternalError());
@@ -2706,7 +2706,7 @@ namespace MatrixTools
                                          // matrix that we can see. if we can't
                                          // find such an entry, take one
         TrilinosScalar average_nonzero_diagonal_entry = 1;
-        for (unsigned int i=local_range.first; i<local_range.second; ++i)
+        for (types::global_dof_index i=local_range.first; i<local_range.second; ++i)
           if (matrix.diag_element(i) != 0)
             {
               average_nonzero_diagonal_entry = std::fabs(matrix.diag_element(i));
@@ -2716,7 +2716,7 @@ namespace MatrixTools
                                          // figure out which rows of the matrix we
                                          // have to eliminate on this processor
         std::vector<unsigned int> constrained_rows;
-        for (std::map<unsigned int,double>::const_iterator
+        for (std::map<types::global_dof_index,double>::const_iterator
                dof  = boundary_values.begin();
              dof != boundary_values.end();
              ++dof)
@@ -2754,9 +2754,9 @@ namespace MatrixTools
         right_hand_side.compress ();
         solution.compress ();
 
-        std::vector<unsigned int> indices;
+        std::vector<types::global_dof_index> indices;
         std::vector<TrilinosScalar>  solution_values;
-        for (std::map<unsigned int,double>::const_iterator
+        for (std::map<types::global_dof_index,double>::const_iterator
                dof  = boundary_values.begin();
              dof != boundary_values.end();
              ++dof)
@@ -2785,7 +2785,7 @@ namespace MatrixTools
 
       template <typename TrilinosMatrix, typename TrilinosBlockVector>
       void
-      apply_block_boundary_values (const std::map<unsigned int,double> &boundary_values,
+      apply_block_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
                                    TrilinosMatrix      &matrix,
                                    TrilinosBlockVector &solution,
                                    TrilinosBlockVector &right_hand_side,
@@ -2808,10 +2808,10 @@ namespace MatrixTools
                                          // into blocks for the boundary values.
                                          // To this end, generate a vector of
                                          // maps with the respective indices.
-        std::vector<std::map<unsigned int,double> > block_boundary_values(n_blocks);
+        std::vector<std::map<types::global_dof_index,double> > block_boundary_values(n_blocks);
         {
           int offset = 0, block=0;
-          for (std::map<unsigned int,double>::const_iterator
+          for (std::map<types::global_dof_index,double>::const_iterator
                  dof  = boundary_values.begin();
                dof != boundary_values.end();
                ++dof)
@@ -2821,9 +2821,9 @@ namespace MatrixTools
                   offset += matrix.block(block,0).m();
                   block++;
                 }
-              const unsigned int index = dof->first - offset;
+              const types::global_dof_index index = dof->first - offset;
               block_boundary_values[block].insert(
-                std::pair<unsigned int, double> (index,dof->second));
+                std::pair<types::global_dof_index, double> (index,dof->second));
             }
         }
 
@@ -2843,11 +2843,11 @@ namespace MatrixTools
                                          // the whole row.
         for (unsigned int block_m=0; block_m<n_blocks; ++block_m)
           {
-            const std::pair<unsigned int, unsigned int> local_range
+            const std::pair<types::global_dof_index, types::global_dof_index> local_range
               = matrix.block(block_m,0).local_range();
 
             std::vector<unsigned int> constrained_rows;
-            for (std::map<unsigned int,double>::const_iterator
+            for (std::map<types::global_dof_index,double>::const_iterator
                    dof  = block_boundary_values[block_m].begin();
                  dof != block_boundary_values[block_m].end();
                  ++dof)
@@ -2867,7 +2867,7 @@ namespace MatrixTools
 
 
   void
-  apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
                          TrilinosWrappers::SparseMatrix   &matrix,
                          TrilinosWrappers::Vector         &solution,
                          TrilinosWrappers::Vector         &right_hand_side,
@@ -2882,7 +2882,7 @@ namespace MatrixTools
 
 
   void
-  apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
                          TrilinosWrappers::SparseMatrix   &matrix,
                          TrilinosWrappers::MPI::Vector    &solution,
                          TrilinosWrappers::MPI::Vector    &right_hand_side,
@@ -2897,7 +2897,7 @@ namespace MatrixTools
 
 
   void
-  apply_boundary_values (const std::map<unsigned int,double>  &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,double>  &boundary_values,
                          TrilinosWrappers::BlockSparseMatrix  &matrix,
                          TrilinosWrappers::BlockVector        &solution,
                          TrilinosWrappers::BlockVector        &right_hand_side,
@@ -2911,7 +2911,7 @@ namespace MatrixTools
 
 
   void
-  apply_boundary_values (const std::map<unsigned int,double>  &boundary_values,
+  apply_boundary_values (const std::map<types::global_dof_index,double>  &boundary_values,
                          TrilinosWrappers::BlockSparseMatrix  &matrix,
                          TrilinosWrappers::MPI::BlockVector   &solution,
                          TrilinosWrappers::MPI::BlockVector   &right_hand_side,
@@ -2927,8 +2927,8 @@ namespace MatrixTools
 
 
   void
-  local_apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
-                               const std::vector<unsigned int> &local_dof_indices,
+  local_apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
+                               const std::vector<types::global_dof_index> &local_dof_indices,
                                FullMatrix<double> &local_matrix,
                                Vector<double>     &local_rhs,
                                const bool          eliminate_columns)
@@ -2975,7 +2975,7 @@ namespace MatrixTools
     const unsigned int n_local_dofs = local_dof_indices.size();
     for (unsigned int i=0; i<n_local_dofs; ++i)
       {
-        const std::map<unsigned int, double>::const_iterator
+        const std::map<types::global_dof_index, double>::const_iterator
           boundary_value = boundary_values.find (local_dof_indices[i]);
         if (boundary_value != boundary_values.end())
           {
@@ -3049,14 +3049,14 @@ namespace MatrixTools
 {
   template
   void
-  apply_boundary_values<double> (const std::map<unsigned int,double> &boundary_values,
+  apply_boundary_values<double> (const std::map<types::global_dof_index,double> &boundary_values,
                                  SparseMatrix<double>  &matrix,
                                  Vector<double>   &solution,
                                  Vector<double>   &right_hand_side,
                                  const bool        eliminate_columns);
   template
   void
-  apply_boundary_values<float> (const std::map<unsigned int,double> &boundary_values,
+  apply_boundary_values<float> (const std::map<types::global_dof_index,double> &boundary_values,
                                 SparseMatrix<float>  &matrix,
                                 Vector<float>   &solution,
                                 Vector<float>   &right_hand_side,
@@ -3064,14 +3064,14 @@ namespace MatrixTools
 
   template
   void
-  apply_boundary_values<double> (const std::map<unsigned int,double> &boundary_values,
+  apply_boundary_values<double> (const std::map<types::global_dof_index,double> &boundary_values,
                                  BlockSparseMatrix<double>  &matrix,
                                  BlockVector<double>   &solution,
                                  BlockVector<double>   &right_hand_side,
                                  const bool        eliminate_columns);
   template
   void
-  apply_boundary_values<float> (const std::map<unsigned int,double> &boundary_values,
+  apply_boundary_values<float> (const std::map<types::global_dof_index,double> &boundary_values,
                                 BlockSparseMatrix<float>  &matrix,
                                 BlockVector<float>   &solution,
                                 BlockVector<float>   &right_hand_side,

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.