]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
changes in include/deal.II/multigrid/ and source/multigrid/ directories
authorkainan.wang <kainan.wang@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 25 Feb 2013 05:19:15 +0000 (05:19 +0000)
committerkainan.wang <kainan.wang@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 25 Feb 2013 05:19:15 +0000 (05:19 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@28545 0785d39b-7218-0410-832d-ea1e28bc413d

12 files changed:
deal.II/files
deal.II/include/deal.II/multigrid/mg_tools.h
deal.II/include/deal.II/multigrid/mg_transfer.h
deal.II/include/deal.II/multigrid/mg_transfer.templates.h
deal.II/include/deal.II/multigrid/mg_transfer_block.h
deal.II/include/deal.II/multigrid/mg_transfer_block.templates.h
deal.II/include/deal.II/multigrid/mg_transfer_component.h
deal.II/include/deal.II/multigrid/mg_transfer_component.templates.h
deal.II/source/multigrid/mg_tools.cc
deal.II/source/multigrid/mg_transfer_block.cc
deal.II/source/multigrid/mg_transfer_component.cc
deal.II/source/multigrid/mg_transfer_prebuilt.cc

index da5d3954fea009301dcf67e5f24d8589156771f0..5d4151b773488fbb594814799c41931b6d4b4c06 100644 (file)
@@ -1,4 +1,4 @@
-TH: things to check:
+gTH: things to check:
 1. std::accumulate with different data types
 2. numbers::invalid_unsigned_int
 
@@ -171,14 +171,14 @@ BRUNO source/lac/trilinos_vector.cc
 BRUNO source/lac/vector.cc
 BRUNO source/lac/vector_memory.cc
 BRUNO source/lac/vector_view.cc
-source/multigrid/mg_base.cc
+KAINAN source/multigrid/mg_base.cc
 source/multigrid/mg_dof_accessor.cc
-source/multigrid/mg_dof_handler.cc
-source/multigrid/mg_tools.cc
-source/multigrid/mg_transfer_block.cc
-source/multigrid/mg_transfer_component.cc
-source/multigrid/mg_transfer_prebuilt.cc
-source/multigrid/multigrid.cc
+KAINAN source/multigrid/mg_dof_handler.cc
+KAINAN source/multigrid/mg_tools.cc
+KAINAN source/multigrid/mg_transfer_block.cc
+KAINAN source/multigrid/mg_transfer_component.cc
+KAINAN source/multigrid/mg_transfer_prebuilt.cc
+KAINAN source/multigrid/multigrid.cc
 UWE source/numerics/data_out.cc
 UWE source/numerics/data_out_faces.cc
 UWE source/numerics/data_out_rotation.cc
@@ -489,20 +489,20 @@ KAINAN include/deal.II/multigrid/mg_base.h
 KAINAN include/deal.II/multigrid/mg_block_smoother.h
 KAINAN include/deal.II/multigrid/mg_coarse.h
 KAINAN include/deal.II/multigrid/mg_constrained_dofs.h
-include/deal.II/multigrid/mg_dof_accessor.h
-include/deal.II/multigrid/mg_dof_handler.h
-include/deal.II/multigrid/mg_dof_iterator_selector.h
-include/deal.II/multigrid/mg_matrix.h
-include/deal.II/multigrid/mg_smoother.h
-include/deal.II/multigrid/mg_tools.h
-include/deal.II/multigrid/mg_transfer_block.h
-include/deal.II/multigrid/mg_transfer_block.templates.h
-include/deal.II/multigrid/mg_transfer_component.h
-include/deal.II/multigrid/mg_transfer_component.templates.h
-include/deal.II/multigrid/mg_transfer.h
-include/deal.II/multigrid/mg_transfer.templates.h
-include/deal.II/multigrid/multigrid.h
-include/deal.II/multigrid/multigrid.templates.h
+KAINAN include/deal.II/multigrid/mg_dof_accessor.h
+KAINAN include/deal.II/multigrid/mg_dof_handler.h
+KAINAN include/deal.II/multigrid/mg_dof_iterator_selector.h
+KAINAN include/deal.II/multigrid/mg_matrix.h
+KAINAN include/deal.II/multigrid/mg_smoother.h
+KAINAN include/deal.II/multigrid/mg_tools.h
+KAINAN include/deal.II/multigrid/mg_transfer_block.h
+KAINAN include/deal.II/multigrid/mg_transfer_block.templates.h
+KAINAN include/deal.II/multigrid/mg_transfer_component.h
+KAINAN include/deal.II/multigrid/mg_transfer_component.templates.h
+KAINAN include/deal.II/multigrid/mg_transfer.h
+KAINAN include/deal.II/multigrid/mg_transfer.templates.h
+KAINAN include/deal.II/multigrid/multigrid.h
+KAINAN include/deal.II/multigrid/multigrid.templates.h
 UWE include/deal.II/numerics/data_component_interpretation.h
 UWE include/deal.II/numerics/data_out_faces.h
 UWE include/deal.II/numerics/data_out.h
index 27df82e897a1424c5dd9713bbc49365116a183e5..532d90a4196a7374dae28b3358e38558f25994ea 100644 (file)
@@ -176,8 +176,8 @@ namespace MGTools
   template <class DH>
   void
   count_dofs_per_block (const DH     &dof_handler,
-                        std::vector<std::vector<unsigned int> > &dofs_per_block,
-                        std::vector<unsigned int>  target_block = std::vector<unsigned int>());
+                        std::vector<std::vector<types::global_dof_index> > &dofs_per_block,
+                        std::vector<types::global_dof_index>  target_block = std::vector<types::global_dof_index>());
 
   /**
    * Count the dofs component-wise
@@ -192,7 +192,7 @@ namespace MGTools
   template <int dim, int spacedim>
   void
   count_dofs_per_component (const DoFHandler<dim,spacedim> &mg_dof,
-                            std::vector<std::vector<unsigned int> > &result,
+                            std::vector<std::vector<types::global_dof_index> > &result,
                             const bool only_once = false,
                             std::vector<unsigned int> target_component = std::vector<unsigned int>());
 
@@ -204,7 +204,7 @@ namespace MGTools
   template <int dim, int spacedim>
   void
   count_dofs_per_component (const DoFHandler<dim,spacedim> &mg_dof,
-                            std::vector<std::vector<unsigned int> > &result,
+                            std::vector<std::vector<types::global_dof_index> > &result,
                             std::vector<unsigned int> target_component) DEAL_II_DEPRECATED;
 
   /**
@@ -233,7 +233,7 @@ namespace MGTools
   void
   make_boundary_list (const DoFHandler<dim,spacedim>      &mg_dof,
                       const typename FunctionMap<dim>::type &function_map,
-                      std::vector<std::set<unsigned int> > &boundary_indices,
+                      std::vector<std::set<types::global_dof_index> > &boundary_indices,
                       const ComponentMask                   &component_mask = ComponentMask());
 
   /**
@@ -253,7 +253,7 @@ namespace MGTools
    */
   template <typename number>
   void
-  apply_boundary_values (const std::set<unsigned int> &boundary_dofs,
+  apply_boundary_values (const std::set<types::global_dof_index> &boundary_dofs,
                          SparseMatrix<number> &matrix,
                          const bool preserve_symmetry,
                          const bool ignore_zeros = false) DEAL_II_DEPRECATED;
@@ -263,7 +263,7 @@ namespace MGTools
    */
   template <typename number>
   void
-  apply_boundary_values (const std::set<unsigned int> &boundary_dofs,
+  apply_boundary_values (const std::set<types::global_dof_index> &boundary_dofs,
                          BlockSparseMatrix<number> &matrix,
                          const bool preserve_symmetry) DEAL_II_DEPRECATED;
 
@@ -302,7 +302,7 @@ namespace MGTools
   template <int dim, int spacedim>
   void
   extract_non_interface_dofs (const DoFHandler<dim,spacedim> &mg_dof_handler,
-                              std::vector<std::set<unsigned int> > &non_interface_dofs);
+                              std::vector<std::set<types::global_dof_index> > &non_interface_dofs);
 }
 
 /* @} */
index b4117d4ea0861184a774b4ba1de8cc6edb503d4a..3cb255c1f25e81ae05b9a079c9813a52e2047239 100644 (file)
@@ -242,7 +242,7 @@ private:
    * The data is first the global
    * index, then the level index.
    */
-  std::vector<std::vector<std::pair<unsigned int, unsigned int> > >
+  std::vector<std::vector<std::pair<types::global_dof_index, unsigned int> > >
   copy_indices;
 
   /**
index 5b00fb46c6f0ac168649172e05052c8f9057ed18..c02da23a5bd9fe0ff15945a70425f49e538dfe33 100644 (file)
@@ -69,7 +69,7 @@ namespace
   template <int dim, typename number, int spacedim>
   void
   reinit_vector (const dealii::DoFHandler<dim,spacedim> &mg_dof,
-                 std::vector<unsigned int> target_component,
+                 std::vector<types::global_dof_index> target_component,
                  MGLevelObject<BlockVector<number> > &v)
   {
     const unsigned int n_blocks = mg_dof.get_fe().n_blocks();
@@ -86,9 +86,9 @@ namespace
                            target_component.end());
     const unsigned int n_target_blocks = max_block + 1;
 
-    std::vector<std::vector<unsigned int> >
+    std::vector<std::vector<types::global_dof_index> >
     ndofs(mg_dof.get_tria().n_levels(),
-          std::vector<unsigned int>(n_target_blocks));
+          std::vector<types::global_dof_index>(n_target_blocks));
     MGTools::count_dofs_per_block (mg_dof, ndofs, target_component);
 
     for (unsigned int level=v.min_level();
@@ -156,7 +156,7 @@ MGTransferPrebuilt<VECTOR>::copy_to_mg (
       --level;
       VECTOR &dst_level = dst[level];
 
-      typedef std::vector<std::pair<unsigned int, unsigned int> >::const_iterator IT;
+      typedef std::vector<std::pair<types::global_dof_index, unsigned int> >::const_iterator IT;
       for (IT i= copy_indices[level].begin();
            i != copy_indices[level].end(); ++i)
         dst_level(i->second) = src(i->first);
@@ -195,7 +195,7 @@ MGTransferPrebuilt<VECTOR>::copy_from_mg(
   dst = 0;
   for (unsigned int level=0; level<mg_dof_handler.get_tria().n_levels(); ++level)
     {
-      typedef std::vector<std::pair<unsigned int, unsigned int> >::const_iterator IT;
+      typedef std::vector<std::pair<types::global_dof_index, unsigned int> >::const_iterator IT;
 
       if (constraints == 0)
         for (IT i= copy_indices[level].begin();
@@ -227,7 +227,7 @@ MGTransferPrebuilt<VECTOR>::copy_from_mg_add (
   // functions
   for (unsigned int level=0; level<mg_dof_handler.get_tria().n_levels(); ++level)
     {
-      typedef std::vector<std::pair<unsigned int, unsigned int> >::const_iterator IT;
+      typedef std::vector<std::pair<types::global_dof_index, unsigned int> >::const_iterator IT;
       for (IT i= copy_indices[level].begin();
            i != copy_indices[level].end(); ++i)
         dst(i->first) += src[level](i->second);
index c348a24308371cc9bb506595e7ec30f3423bfebc..19b97e44b7b33309ad749b980b7e00d6a9a79cf2 100644 (file)
@@ -123,7 +123,7 @@ protected:
   /**
    * Sizes of the multi-level vectors.
    */
-  mutable std::vector<std::vector<unsigned int> > sizes;
+  mutable std::vector<std::vector<types::global_dof_index> > sizes;
 
   /**
    * Start index of each block.
@@ -520,7 +520,7 @@ private:
 
 /*@}*/
 
-//---------------------------------------------------------------------------
+//----------inline function definition--------------------------------------------------
 template <typename number>
 inline void
 MGTransferBlockSelect<number>::select(const unsigned int block)
index b3acd4e31d76d2617b097f1da598791f726aaef3..7b7886bd41ec15b09f6e31b82374d9106e3e6ffe 100644 (file)
@@ -33,7 +33,6 @@ DEAL_II_NAMESPACE_OPEN
 typedef std::vector<std::pair<unsigned int, unsigned int> >::const_iterator IT;
 
 
-
 template <typename number>
 template <int dim, typename number2, int spacedim>
 void
index 708175b29afe84aca92e6f5753e1615e5b13f82a..eb2a520bb10a3d90ca721761311dfa7a599c657d 100644 (file)
@@ -125,18 +125,18 @@ protected:
   /**
    * Sizes of the multi-level vectors.
    */
-  mutable std::vector<std::vector<unsigned int> > sizes;
+  mutable std::vector<std::vector<types::global_dof_index> > sizes;
 
   /**
    * Start index of each component.
    */
-  std::vector<unsigned int> component_start;
+  std::vector<types::global_dof_index> component_start;
 
   /**
    * Start index of each component on
    * all levels.
    */
-  std::vector<std::vector<unsigned int> > mg_component_start;
+  std::vector<std::vector<types::global_dof_index> > mg_component_start;
 
   /**
    * Call build_matrices()
@@ -165,7 +165,7 @@ protected:
    * The data is first the global
    * index, then the level index.
    */
-  std::vector<std::vector<std::pair<unsigned int, unsigned int> > >
+  std::vector<std::vector<std::pair<types::global_dof_index, unsigned int> > >
   copy_to_and_from_indices;
 
   /**
@@ -174,7 +174,7 @@ protected:
    * boundary values in the
    * restriction matrix.
    */
-  std::vector<std::set<unsigned int> > boundary_indices;
+  std::vector<std::set<types::global_dof_index> > boundary_indices;
 };
 
 //TODO:[GK] Update documentation for copy_* functions
@@ -268,8 +268,8 @@ public:
                        = std::vector<unsigned int>(),
                        const std::vector<unsigned int> &mg_target_component
                        = std::vector<unsigned int>(),
-                       const std::vector<std::set<unsigned int> > &boundary_indices
-                       = std::vector<std::set<unsigned int> >()
+                       const std::vector<std::set<types::global_dof_index> > &boundary_indices
+                       = std::vector<std::set<types::global_dof_index> >()
                       );
 
   /**
index 47455156680089254ef8c7a40a0b59d8ce823729..6e55196f1e6af91dc0901b4c8f4247ed0fce1a90 100644 (file)
@@ -169,7 +169,7 @@ MGTransferSelect<number>::do_copy_from_mg (
   for (; level_cell != endc; ++level_cell)
     {
       const unsigned int level = level_cell->level();
-      typedef std::vector<std::pair<unsigned int, unsigned int> >::const_iterator IT;
+      typedef std::vector<std::pair<types::global_dof_index, unsigned int> >::const_iterator IT;
       for (IT i=copy_to_and_from_indices[level].begin();
            i != copy_to_and_from_indices[level].end(); ++i)
         dst(i->first) = src[level](i->second);
@@ -188,8 +188,8 @@ MGTransferSelect<number>::do_copy_from_mg_add (
   const FiniteElement<dim> &fe = mg_dof_handler.get_fe();
   const unsigned int dofs_per_cell = fe.dofs_per_cell;
 
-  std::vector<unsigned int> global_dof_indices (dofs_per_cell);
-  std::vector<unsigned int> level_dof_indices (dofs_per_cell);
+  std::vector<types::global_dof_index> global_dof_indices (dofs_per_cell);
+  std::vector<types::global_dof_index> level_dof_indices (dofs_per_cell);
 
   typename DoFHandler<dim,spacedim>::active_cell_iterator
   level_cell = mg_dof_handler.begin_active();
@@ -206,7 +206,7 @@ MGTransferSelect<number>::do_copy_from_mg_add (
   for (; level_cell != endc; ++level_cell)
     {
       const unsigned int level = level_cell->level();
-      typedef std::vector<std::pair<unsigned int, unsigned int> >::const_iterator IT;
+      typedef std::vector<std::pair<types::global_dof_index, unsigned int> >::const_iterator IT;
       for (IT i=copy_to_and_from_indices[level].begin();
            i != copy_to_and_from_indices[level].end(); ++i)
         dst(i->first) += src[level](i->second);
index 1fe5ef922d226d0a5d912108667cdb0e8ba6d7d2..1ed223ab8c471a79d1be94010bea1c71a7c8dab8 100644 (file)
@@ -130,8 +130,8 @@ namespace MGTools
 
     const typename DoFHandler<dim,spacedim>::cell_iterator end = dofs.end(level);
     typename DoFHandler<dim,spacedim>::active_cell_iterator cell;
-    std::vector<unsigned int> cell_indices;
-    std::vector<unsigned int> neighbor_indices;
+    std::vector<types::global_dof_index> cell_indices;
+    std::vector<types::global_dof_index> neighbor_indices;
 
     // We loop over cells and go from
     // cells to lower dimensional
@@ -304,8 +304,8 @@ namespace MGTools
 
     const typename DoFHandler<dim,spacedim>::cell_iterator end = dofs.end(level);
     typename DoFHandler<dim,spacedim>::active_cell_iterator cell;
-    std::vector<unsigned int> cell_indices;
-    std::vector<unsigned int> neighbor_indices;
+    std::vector<types::global_dof_index> cell_indices;
+    std::vector<types::global_dof_index> neighbor_indices;
 
     // We have to translate the
     // couplings from components to
@@ -542,7 +542,7 @@ namespace MGTools
     SparsityPattern         &sparsity,
     const unsigned int       level)
   {
-    const unsigned int n_dofs = dof.n_dofs(level);
+    const types::global_dof_index n_dofs = dof.n_dofs(level);
 
     Assert (sparsity.n_rows() == n_dofs,
             ExcDimensionMismatch (sparsity.n_rows(), n_dofs));
@@ -550,7 +550,7 @@ namespace MGTools
             ExcDimensionMismatch (sparsity.n_cols(), n_dofs));
 
     const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
-    std::vector<unsigned int> dofs_on_this_cell(dofs_per_cell);
+    std::vector<types::global_dof_index> dofs_on_this_cell(dofs_per_cell);
     typename DH::cell_iterator cell = dof.begin(level),
                                endc = dof.end(level);
     for (; cell!=endc; ++cell)
@@ -574,7 +574,7 @@ namespace MGTools
     SparsityPattern       &sparsity,
     const unsigned int level)
   {
-    const unsigned int n_dofs = dof.n_dofs(level);
+    const types::global_dof_index n_dofs = dof.n_dofs(level);
 
     Assert (sparsity.n_rows() == n_dofs,
             ExcDimensionMismatch (sparsity.n_rows(), n_dofs));
@@ -634,8 +634,8 @@ namespace MGTools
     Assert ((level>=1) && (level<dof.get_tria().n_levels()),
             ExcIndexRange(level, 1, dof.get_tria().n_levels()));
 
-    const unsigned int fine_dofs = dof.n_dofs(level);
-    const unsigned int coarse_dofs = dof.n_dofs(level-1);
+    const types::global_dof_index fine_dofs = dof.n_dofs(level);
+    const types::global_dof_index coarse_dofs = dof.n_dofs(level-1);
 
     // Matrix maps from fine level to coarse level
 
@@ -645,8 +645,8 @@ namespace MGTools
             ExcDimensionMismatch (sparsity.n_cols(), fine_dofs));
 
     const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
-    std::vector<unsigned int> dofs_on_this_cell(dofs_per_cell);
-    std::vector<unsigned int> dofs_on_other_cell(dofs_per_cell);
+    std::vector<types::global_dof_index> dofs_on_this_cell(dofs_per_cell);
+    std::vector<types::global_dof_index> dofs_on_other_cell(dofs_per_cell);
     typename DoFHandler<dim,spacedim>::cell_iterator cell = dof.begin(level),
                                                      endc = dof.end(level);
     for (; cell!=endc; ++cell)
@@ -693,7 +693,7 @@ namespace MGTools
     const Table<2,DoFTools::Coupling> &flux_mask)
   {
     const FiniteElement<dim> &fe = dof.get_fe();
-    const unsigned int n_dofs = dof.n_dofs(level);
+    const types::global_dof_index n_dofs = dof.n_dofs(level);
     const unsigned int n_comp = fe.n_components();
 
     Assert (sparsity.n_rows() == n_dofs,
@@ -710,8 +710,8 @@ namespace MGTools
             ExcDimensionMismatch (flux_mask.n_cols(), n_comp));
 
     const unsigned int total_dofs = fe.dofs_per_cell;
-    std::vector<unsigned int> dofs_on_this_cell(total_dofs);
-    std::vector<unsigned int> dofs_on_other_cell(total_dofs);
+    std::vector<types::global_dof_index> dofs_on_this_cell(total_dofs);
+    std::vector<types::global_dof_index> dofs_on_other_cell(total_dofs);
     Table<2,bool> support_on_face(total_dofs, GeometryInfo<dim>::faces_per_cell);
 
     typename DoFHandler<dim,spacedim>::cell_iterator cell = dof.begin(level),
@@ -874,8 +874,8 @@ namespace MGTools
     Assert ((level>=1) && (level<dof.get_tria().n_levels()),
             ExcIndexRange(level, 1, dof.get_tria().n_levels()));
 
-    const unsigned int fine_dofs = dof.n_dofs(level);
-    const unsigned int coarse_dofs = dof.n_dofs(level-1);
+    const types::global_dof_index fine_dofs = dof.n_dofs(level);
+    const types::global_dof_index coarse_dofs = dof.n_dofs(level-1);
 
     // Matrix maps from fine level to coarse level
 
@@ -889,8 +889,8 @@ namespace MGTools
             ExcDimensionMismatch (flux_mask.n_cols(), n_comp));
 
     const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
-    std::vector<unsigned int> dofs_on_this_cell(dofs_per_cell);
-    std::vector<unsigned int> dofs_on_other_cell(dofs_per_cell);
+    std::vector<types::global_dof_index> dofs_on_this_cell(dofs_per_cell);
+    std::vector<types::global_dof_index> dofs_on_other_cell(dofs_per_cell);
     Table<2,bool> support_on_face(dofs_per_cell, GeometryInfo<dim>::faces_per_cell);
 
     typename DoFHandler<dim,spacedim>::cell_iterator cell = dof.begin(level),
@@ -943,9 +943,9 @@ namespace MGTools
   template <int dim, int spacedim>
   void
   count_dofs_per_component (const DoFHandler<dim,spacedim> &dof_handler,
-                            std::vector<std::vector<unsigned int> > &result,
+                            std::vector<std::vector<types::global_dof_index> > &result,
                             bool                              only_once,
-                            std::vector<unsigned int>         target_component)
+                            std::vector<types::global_dof_index>         target_component)
   {
     const FiniteElement<dim> &fe = dof_handler.get_fe();
     const unsigned int n_components = fe.n_components();
@@ -1045,8 +1045,8 @@ namespace MGTools
   template <int dim, int spacedim>
   void
   count_dofs_per_component (const DoFHandler<dim,spacedim>        &dof_handler,
-                            std::vector<std::vector<unsigned int> > &result,
-                            std::vector<unsigned int>            target_component)
+                            std::vector<std::vector<types::global_dof_index> > &result,
+                            std::vector<types::global_dof_index>            target_component)
   {
     count_dofs_per_component (dof_handler, result,
                               false, target_component);
@@ -1058,8 +1058,8 @@ namespace MGTools
   void
   count_dofs_per_block (
     const DH     &dof_handler,
-    std::vector<std::vector<unsigned int> > &dofs_per_block,
-    std::vector<unsigned int>  target_block)
+    std::vector<std::vector<types::global_dof_index> > &dofs_per_block,
+    std::vector<types::global_dof_index>  target_block)
   {
     const FiniteElement<DH::dimension,DH::space_dimension> &fe = dof_handler.get_fe();
     const unsigned int n_blocks = fe.n_blocks();
@@ -1141,7 +1141,7 @@ namespace MGTools
   make_boundary_list(
     const DoFHandler<1,1> &,
     const FunctionMap<1>::type &,
-    std::vector<std::set<unsigned int> > &,
+    std::vector<std::set<types::global_dof_index> > &,
     const ComponentMask &)
   {
     Assert(false, ExcNotImplemented());
@@ -1154,7 +1154,7 @@ namespace MGTools
   make_boundary_list(
     const DoFHandler<1,2> &,
     const FunctionMap<1>::type &,
-    std::vector<std::set<unsigned int> > &,
+    std::vector<std::set<types::global_dof_index> > &,
     const ComponentMask &)
   {
     Assert(false, ExcNotImplemented());
@@ -1167,7 +1167,7 @@ namespace MGTools
   make_boundary_list(
     const DoFHandler<dim,spacedim> &dof,
     const typename FunctionMap<dim>::type &function_map,
-    std::vector<std::set<unsigned int> > &boundary_indices,
+    std::vector<std::set<types::global_dof_index> > &boundary_indices,
     const ComponentMask &component_mask)
   {
     // if for whatever reason we were
@@ -1185,7 +1185,7 @@ namespace MGTools
 
     AssertDimension (boundary_indices.size(), n_levels);
 
-    std::vector<unsigned int> local_dofs;
+    std::vector<types::global_dof_index> local_dofs;
     local_dofs.reserve (DoFTools::max_dofs_per_face(dof));
     std::fill (local_dofs.begin (),
                local_dofs.end (),
@@ -1383,7 +1383,7 @@ namespace MGTools
             ExcDimensionMismatch (boundary_indices.size(),
                                   dof.get_tria().n_levels()));
 
-    std::vector<std::set<unsigned int> >
+    std::vector<std::set<types::global_dof_index> >
     my_boundary_indices (dof.get_tria().n_levels());
     make_boundary_list (dof, function_map, my_boundary_indices, component_mask);
     for (unsigned int i=0; i<dof.get_tria().n_levels(); ++i)
@@ -1422,7 +1422,7 @@ namespace MGTools
     const unsigned int   dofs_per_cell   = fe.dofs_per_cell;
     const unsigned int   dofs_per_face   = fe.dofs_per_face;
 
-    std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+    std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
     std::vector<bool> cell_dofs(dofs_per_cell, false);
 
     typename DoFHandler<dim>::cell_iterator cell = mg_dof_handler.begin(),
@@ -1463,7 +1463,7 @@ namespace MGTools
   template <int dim, int spacedim>
   void
   extract_non_interface_dofs (const DoFHandler<dim,spacedim> &mg_dof_handler,
-                              std::vector<std::set<unsigned int> >  &non_interface_dofs)
+                              std::vector<std::set<types::global_dof_index> >  &non_interface_dofs)
   {
     Assert (non_interface_dofs.size() == mg_dof_handler.get_tria().n_levels(),
             ExcDimensionMismatch (non_interface_dofs.size(),
@@ -1474,7 +1474,7 @@ namespace MGTools
     const unsigned int   dofs_per_cell   = fe.dofs_per_cell;
     const unsigned int   dofs_per_face   = fe.dofs_per_face;
 
-    std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+    std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
     std::vector<bool> cell_dofs(dofs_per_cell, false);
     std::vector<bool> cell_dofs_interface(dofs_per_cell, false);
 
@@ -1560,8 +1560,8 @@ namespace MGTools
     const unsigned int   dofs_per_cell   = fe.dofs_per_cell;
     const unsigned int   dofs_per_face   = fe.dofs_per_face;
 
-    std::vector<unsigned int> local_dof_indices (dofs_per_cell);
-    std::vector<unsigned int> face_dof_indices (dofs_per_face);
+    std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
+    std::vector<types::global_dof_index> face_dof_indices (dofs_per_face);
 
     std::vector<bool> cell_dofs(dofs_per_cell, false);
     std::vector<bool> boundary_cell_dofs(dofs_per_cell, false);
@@ -1623,7 +1623,7 @@ namespace MGTools
   template <typename number>
   void
   apply_boundary_values (
-    const std::set<unsigned int> &boundary_dofs,
+    const std::set<types::global_dof_index> &boundary_dofs,
     SparseMatrix<number> &matrix,
     const bool preserve_symmetry,
     const bool /*ignore_zeros*/)
@@ -1634,8 +1634,8 @@ namespace MGTools
     // a deprecated function, I therefore threw away the original function
     // and replaced it by the following, which I believe should work
 
-    std::map<unsigned int, double> boundary_values;
-    for (std::set<unsigned int>::const_iterator p=boundary_dofs.begin();
+    std::map<types::global_dof_index, double> boundary_values;
+    for (std::set<types::global_dof_index>::const_iterator p=boundary_dofs.begin();
          p != boundary_dofs.end(); ++p)
       boundary_values[*p] = 0;
 
@@ -1650,7 +1650,7 @@ namespace MGTools
   template <typename number>
   void
   apply_boundary_values (
-    const std::set<unsigned int> &boundary_dofs,
+    const std::set<types::global_dof_index> &boundary_dofs,
     BlockSparseMatrix<number> &matrix,
     const bool preserve_symmetry)
   {
@@ -1666,8 +1666,8 @@ namespace MGTools
     // a deprecated function, I therefore threw away the original function
     // and replaced it by the following, which I believe should work
 
-    std::map<unsigned int, double> boundary_values;
-    for (std::set<unsigned int>::const_iterator p=boundary_dofs.begin();
+    std::map<types::global_dof_index, double> boundary_values;
+    for (std::set<types::global_dof_index>::const_iterator p=boundary_dofs.begin();
          p != boundary_dofs.end(); ++p)
       boundary_values[*p] = 0;
 
@@ -1689,16 +1689,16 @@ namespace MGTools
 namespace MGTools
 {
   template void apply_boundary_values (
-    const std::set<unsigned int> &,
+    const std::set<types::global_dof_index> &,
     SparseMatrix<float> &, const bool, const bool);
   template void apply_boundary_values (
-    const std::set<unsigned int> &,
+    const std::set<types::global_dof_index> &,
     SparseMatrix<double> &, const bool, const bool);
   template void apply_boundary_values (
-    const std::set<unsigned int> &,
+    const std::set<types::global_dof_index> &,
     BlockSparseMatrix<float> &, const bool);
   template void apply_boundary_values (
-    const std::set<unsigned int> &,
+    const std::set<types::global_dof_index> &,
     BlockSparseMatrix<double> &, const bool);
 }
 
index acf82b29ea7358292470a4fe0cf505bab22467b2..3db1882b7ce6733eaa88cc5d3bdf7b7582f7f08c 100644 (file)
@@ -49,7 +49,7 @@ namespace
     const dealii::DoFHandler<dim,spacedim> &mg_dof,
     MGLevelObject<BlockVector<number> > &v,
     const std::vector<bool> &sel,
-    std::vector<std::vector<unsigned int> > &ndofs)
+    std::vector<std::vector<types::global_dof_index> > &ndofs)
   {
     std::vector<bool> selected=sel;
     // Compute the number of blocks needed
@@ -60,9 +60,9 @@ namespace
 
     if (ndofs.size() == 0)
       {
-        std::vector<std::vector<unsigned int> >
+        std::vector<std::vector<types::global_dof_index> >
         new_dofs(mg_dof.get_tria().n_levels(),
-                 std::vector<unsigned int>(selected.size()));
+                 std::vector<types::global_dof_index>(selected.size()));
         std::swap(ndofs, new_dofs);
         MGTools::count_dofs_per_block (mg_dof, ndofs);
       }
@@ -96,7 +96,7 @@ namespace
     const dealii::DoFHandler<dim,spacedim> &mg_dof,
     MGLevelObject<dealii::Vector<number> > &v,
     const unsigned int selected_block,
-    std::vector<std::vector<unsigned int> > &ndofs)
+    std::vector<std::vector<types::global_dof_index> > &ndofs)
   {
     const unsigned int n_blocks = mg_dof.get_fe().n_blocks();
     Assert(selected_block < n_blocks, ExcIndexRange(selected_block, 0, n_blocks));
@@ -106,9 +106,9 @@ namespace
 
     if (ndofs.size() == 0)
       {
-        std::vector<std::vector<unsigned int> >
+        std::vector<std::vector<types::global_dof_index> >
         new_dofs(mg_dof.get_tria().n_levels(),
-                 std::vector<unsigned int>(selected.size()));
+                 std::vector<types::global_dof_index>(selected.size()));
         std::swap(ndofs, new_dofs);
         MGTools::count_dofs_per_block (mg_dof, ndofs);
       }
@@ -229,7 +229,7 @@ void MGTransferBlockBase::build_matrices (
 
   // Compute the lengths of all blocks
   sizes.clear ();
-  sizes.resize(n_levels, std::vector<unsigned int>(fe.n_blocks()));
+  sizes.resize(n_levels, std::vector<types::global_dof_index>(fe.n_blocks()));
   MGTools::count_dofs_per_block(mg_dof, sizes);
 
   // Fill some index vectors
@@ -238,10 +238,10 @@ void MGTransferBlockBase::build_matrices (
   // Compute start indices from sizes
   for (unsigned int l=0; l<mg_block_start.size(); ++l)
     {
-      unsigned int k=0;
+      types::global_dof_index k=0;
       for (unsigned int i=0; i<mg_block_start[l].size(); ++i)
         {
-          const unsigned int t=mg_block_start[l][i];
+          const types::global_dof_index t=mg_block_start[l][i];
           mg_block_start[l][i] = k;
           k += t;
         }
@@ -251,10 +251,10 @@ void MGTransferBlockBase::build_matrices (
   DoFTools::count_dofs_per_block (static_cast<const DoFHandler<dim,spacedim>&>(mg_dof),
                                   block_start);
 
-  unsigned int k=0;
+  types::global_dof_index k=0;
   for (unsigned int i=0; i<block_start.size(); ++i)
     {
-      const unsigned int t=block_start[i];
+      const types::global_dof_index t=block_start[i];
       block_start[i] = k;
       k += t;
     }
@@ -295,8 +295,8 @@ void MGTransferBlockBase::build_matrices (
   // two fields which will store the
   // indices of the multigrid dofs
   // for a cell and one of its children
-  std::vector<unsigned int> dof_indices_parent (dofs_per_cell);
-  std::vector<unsigned int> dof_indices_child (dofs_per_cell);
+  std::vector<types::global_dof_index> dof_indices_parent (dofs_per_cell);
+  std::vector<types::global_dof_index> dof_indices_child (dofs_per_cell);
 
   // for each level: first build the
   // sparsity pattern of the matrices
@@ -411,7 +411,7 @@ void MGTransferBlockBase::build_matrices (
   if (mg_constrained_dofs != 0)
     if (mg_constrained_dofs->set_boundary_values())
       {
-        std::vector<unsigned int> constrain_indices;
+        std::vector<types::global_dof_index> constrain_indices;
         std::vector<std::vector<bool> > constraints_per_block (n_blocks);
         for (int level=n_levels-2; level>=0; --level)
           {
@@ -425,7 +425,7 @@ void MGTransferBlockBase::build_matrices (
             // need to filter away.
             constrain_indices.resize (0);
             constrain_indices.resize (prolongation_matrices[level]->n(), 0);
-            std::set<unsigned int>::const_iterator dof
+            std::set<types::global_dof_index>::const_iterator dof
             = mg_constrained_dofs->get_boundary_indices()[level].begin(),
             endd = mg_constrained_dofs->get_boundary_indices()[level].end();
             for (; dof != endd; ++dof)
@@ -434,13 +434,13 @@ void MGTransferBlockBase::build_matrices (
             unsigned int index = 0;
             for (unsigned int block=0; block<n_blocks; ++block)
               {
-                const unsigned int n_dofs = prolongation_matrices[level]->block(block, block).m();
+                const types::global_dof_index n_dofs = prolongation_matrices[level]->block(block, block).m();
                 constraints_per_block[block].resize(0);
                 constraints_per_block[block].resize(n_dofs, 0);
-                for (unsigned int i=0; i<n_dofs; ++i, ++index)
+                for (types::global_dof_index i=0; i<n_dofs; ++i, ++index)
                   constraints_per_block[block][i] = constrain_indices[index] == 1;
 
-                for (unsigned int i=0; i<n_dofs; ++i)
+                for (types::global_dof_index i=0; i<n_dofs; ++i)
                   {
                     SparseMatrix<double>::iterator
                     start_row = prolongation_matrices[level]->block(block, block).begin(i),
@@ -474,9 +474,9 @@ void MGTransferBlockSelect<number>::build_matrices (
 
   MGTransferBlockBase::build_matrices (dof, mg_dof);
 
-  std::vector<unsigned int> temp_copy_indices;
-  std::vector<unsigned int> global_dof_indices (fe.dofs_per_cell);
-  std::vector<unsigned int> level_dof_indices  (fe.dofs_per_cell);
+  std::vector<types::global_dof_index> temp_copy_indices;
+  std::vector<types::global_dof_index> global_dof_indices (fe.dofs_per_cell);
+  std::vector<types::global_dof_index> level_dof_indices  (fe.dofs_per_cell);
 
   for (int level=dof.get_tria().n_levels()-1; level>=0; --level)
     {
@@ -524,16 +524,16 @@ void MGTransferBlockSelect<number>::build_matrices (
       // copy_indices object. Then, insert the pairs
       // of global index and level index into
       // copy_indices.
-      const unsigned int n_active_dofs =
+      const types::global_dof_index n_active_dofs =
         std::count_if (temp_copy_indices.begin(), temp_copy_indices.end(),
-                       std::bind2nd(std::not_equal_to<unsigned int>(),
+                       std::bind2nd(std::not_equal_to<types::global_dof_index>(),
                                     numbers::invalid_unsigned_int));
       copy_indices[selected_block][level].resize (n_active_dofs);
-      unsigned int counter = 0;
-      for (unsigned int i=0; i<temp_copy_indices.size(); ++i)
+      types::global_dof_index counter = 0;
+      for (types::global_dof_index i=0; i<temp_copy_indices.size(); ++i)
         if (temp_copy_indices[i] != numbers::invalid_unsigned_int)
           copy_indices[selected_block][level][counter++] =
-            std::pair<unsigned int, unsigned int> (temp_copy_indices[i], i);
+            std::pair<types::global_dof_index, unsigned int> (temp_copy_indices[i], i);
       Assert (counter == n_active_dofs, ExcInternalError());
     }
 }
@@ -562,9 +562,9 @@ void MGTransferBlock<number>::build_matrices (
 
   MGTransferBlockBase::build_matrices (dof, mg_dof);
 
-  std::vector<std::vector<unsigned int> > temp_copy_indices (n_blocks);
-  std::vector<unsigned int> global_dof_indices (fe.dofs_per_cell);
-  std::vector<unsigned int> level_dof_indices  (fe.dofs_per_cell);
+  std::vector<std::vector<types::global_dof_index> > temp_copy_indices (n_blocks);
+  std::vector<types::global_dof_index> global_dof_indices (fe.dofs_per_cell);
+  std::vector<types::global_dof_index> level_dof_indices  (fe.dofs_per_cell);
   for (int level=dof.get_tria().n_levels()-1; level>=0; --level)
     {
       typename DoFHandler<dim,spacedim>::active_cell_iterator
@@ -603,17 +603,17 @@ void MGTransferBlock<number>::build_matrices (
       for (unsigned int block=0; block<n_blocks; ++block)
         if (selected[block])
           {
-            const unsigned int n_active_dofs =
+            const types::global_dof_index n_active_dofs =
               std::count_if (temp_copy_indices[block].begin(),
                              temp_copy_indices[block].end(),
-                             std::bind2nd(std::not_equal_to<unsigned int>(),
+                             std::bind2nd(std::not_equal_to<types::global_dof_index>(),
                                           numbers::invalid_unsigned_int));
             copy_indices[block][level].resize (n_active_dofs);
-            unsigned int counter = 0;
-            for (unsigned int i=0; i<temp_copy_indices[block].size(); ++i)
+            types::global_dof_index counter = 0;
+            for (types::global_dof_index i=0; i<temp_copy_indices[block].size(); ++i)
               if (temp_copy_indices[block][i] != numbers::invalid_unsigned_int)
                 copy_indices[block][level][counter++] =
-                  std::pair<unsigned int, unsigned int>
+                  std::pair<types::global_dof_index, unsigned int>
                   (temp_copy_indices[block][i], i);
             Assert (counter == n_active_dofs, ExcInternalError());
           }
index 74d58198ab397b571305433c043f73d00fcadc86..c0eab8366597daaaf655c635452e538fa08c1e34 100644 (file)
@@ -79,7 +79,7 @@ namespace
     MGLevelObject<BlockVector<number> > &v,
     const std::vector<bool> &sel,
     const std::vector<unsigned int> &target_comp,
-    std::vector<std::vector<unsigned int> > &ndofs)
+    std::vector<std::vector<types::global_dof_index> > &ndofs)
   {
     std::vector<bool> selected=sel;
     std::vector<unsigned int> target_component=target_comp;
@@ -122,9 +122,9 @@ namespace
 
     if (ndofs.size() == 0)
       {
-        std::vector<std::vector<unsigned int> >
+        std::vector<std::vector<types::global_dof_index> >
         new_dofs(mg_dof.get_tria().n_levels(),
-                 std::vector<unsigned int>(target_component.size()));
+                 std::vector<types::global_dof_index>(target_component.size()));
         std::swap(ndofs, new_dofs);
         MGTools::count_dofs_per_block (mg_dof, ndofs, target_component);
       }
@@ -179,7 +179,7 @@ namespace
     MGLevelObject<dealii::Vector<number> > &v,
     const ComponentMask &component_mask,
     const std::vector<unsigned int> &target_component,
-    std::vector<std::vector<unsigned int> > &ndofs)
+    std::vector<std::vector<types::global_dof_index> > &ndofs)
   {
     Assert (component_mask.represents_n_components(target_component.size()),
             ExcMessage ("The component mask does not have the correct size."));
@@ -191,9 +191,9 @@ namespace
 
     if (ndofs.size() == 0)
       {
-        std::vector<std::vector<unsigned int> >
+        std::vector<std::vector<types::global_dof_index> >
         new_dofs(mg_dof.get_tria().n_levels(),
-                 std::vector<unsigned int>(target_component.size()));
+                 std::vector<types::global_dof_index>(target_component.size()));
         std::swap(ndofs, new_dofs);
         MGTools::count_dofs_per_block (mg_dof, ndofs,
                                        target_component);
@@ -241,7 +241,7 @@ MGTransferSelect<number>::do_copy_to_mg (
     {
       --level;
 
-      typedef std::vector<std::pair<unsigned int, unsigned int> >::const_iterator IT;
+      typedef std::vector<std::pair<types::global_dof_index, unsigned int> >::const_iterator IT;
       for (IT i=copy_to_and_from_indices[level].begin();
            i != copy_to_and_from_indices[level].end(); ++i)
         dst[level](i->second) = src(i->first);
@@ -334,10 +334,10 @@ void MGTransferComponentBase::build_matrices (
   // Compute start indices from sizes
   for (unsigned int l=0; l<mg_component_start.size(); ++l)
     {
-      unsigned int k=0;
+      types::global_dof_index k=0;
       for (unsigned int i=0; i<mg_component_start[l].size(); ++i)
         {
-          const unsigned int t=mg_component_start[l][i];
+          const types::global_dof_index t=mg_component_start[l][i];
           mg_component_start[l][i] = k;
           k += t;
         }
@@ -348,10 +348,10 @@ void MGTransferComponentBase::build_matrices (
   DoFTools::
   count_dofs_per_block (mg_dof, component_start, target_component);
 
-  unsigned int k=0;
+  types::global_dof_index k=0;
   for (unsigned int i=0; i<component_start.size(); ++i)
     {
-      const unsigned int t=component_start[i];
+      const types::global_dof_index t=component_start[i];
       component_start[i] = k;
       k += t;
     }
@@ -391,8 +391,8 @@ void MGTransferComponentBase::build_matrices (
   // two fields which will store the
   // indices of the multigrid dofs
   // for a cell and one of its children
-  std::vector<unsigned int> dof_indices_parent (dofs_per_cell);
-  std::vector<unsigned int> dof_indices_child (dofs_per_cell);
+  std::vector<types::global_dof_index> dof_indices_parent (dofs_per_cell);
+  std::vector<types::global_dof_index> dof_indices_child (dofs_per_cell);
 
   // for each level: first build the
   // sparsity pattern of the matrices
@@ -503,9 +503,9 @@ void MGTransferComponentBase::build_matrices (
 
   if (boundary_indices.size() != 0)
     {
-      std::vector<std::vector<unsigned int> >
+      std::vector<std::vector<types::global_dof_index> >
       dofs_per_component(mg_dof.get_tria().n_levels(),
-                         std::vector<unsigned int>(n_components));
+                         std::vector<types::global_dof_index>(n_components));
 
       MGTools::count_dofs_per_block (mg_dof, dofs_per_component, mg_target_component);
       for (unsigned int level=0; level<n_levels-1; ++level)
@@ -517,8 +517,8 @@ void MGTransferComponentBase::build_matrices (
             for (unsigned int jblock=0; jblock<n_components; ++jblock)
               if (iblock==jblock)
                 {
-                  const unsigned int n_dofs = prolongation_matrices[level]->block(iblock,jblock).m();
-                  for (unsigned int i=0; i<n_dofs; ++i)
+                  const types::global_dof_index n_dofs = prolongation_matrices[level]->block(iblock,jblock).m();
+                  for (types::global_dof_index i=0; i<n_dofs; ++i)
                     {
                       SparseMatrix<double>::iterator anfang = prolongation_matrices[level]->block(iblock,jblock).begin(i),
                                                      ende = prolongation_matrices[level]->block(iblock,jblock).end(i);
@@ -530,7 +530,7 @@ void MGTransferComponentBase::build_matrices (
                           const BlockIndices block_indices_coarse (dofs_per_component[level]);
                           const unsigned int global_j = block_indices_coarse.local_to_global(iblock, column_number);
 
-                          std::set<unsigned int>::const_iterator found_dof =
+                          std::set<types::global_dof_index>::const_iterator found_dof =
                             boundary_indices[level].find(global_j);
 
                           const bool is_boundary_index =
@@ -558,7 +558,7 @@ void MGTransferSelect<number>::build_matrices (
   unsigned int mg_select,
   const std::vector<unsigned int> &t_component,
   const std::vector<unsigned int> &mg_t_component,
-  const std::vector<std::set<unsigned int> > &bdry_indices)
+  const std::vector<std::set<types::global_dof_index> > &bdry_indices)
 {
   const FiniteElement<dim> &fe = mg_dof.get_fe();
   unsigned int ncomp = mg_dof.get_fe().n_components();
@@ -617,9 +617,9 @@ void MGTransferSelect<number>::build_matrices (
 
   // use a temporary vector to create the
   // relation between global and level dofs
-  std::vector<unsigned int> temp_copy_indices;
-  std::vector<unsigned int> global_dof_indices (fe.dofs_per_cell);
-  std::vector<unsigned int> level_dof_indices  (fe.dofs_per_cell);
+  std::vector<types::global_dof_index> temp_copy_indices;
+  std::vector<types::global_dof_index> global_dof_indices (fe.dofs_per_cell);
+  std::vector<types::global_dof_index> level_dof_indices  (fe.dofs_per_cell);
   for (int level=dof.get_tria().n_levels()-1; level>=0; --level)
     {
       copy_to_and_from_indices[level].clear();
@@ -649,9 +649,9 @@ void MGTransferSelect<number>::build_matrices (
               if (component_mask[component] &&
                   !interface_dofs[level][level_dof_indices[i]])
                 {
-                  const unsigned int level_start
+                  const types::global_dof_index level_start
                     = mg_component_start[level][mg_target_component[component]];
-                  const unsigned int global_start
+                  const types::global_dof_index global_start
                     = component_start[target_component[component]];
                   temp_copy_indices[level_dof_indices[i]-level_start] =
                     global_dof_indices[i] - global_start;
@@ -661,16 +661,16 @@ void MGTransferSelect<number>::build_matrices (
 
       // write indices from vector into the map from
       // global to level dofs
-      const unsigned int n_active_dofs =
+      const types::global_dof_index n_active_dofs =
         std::count_if (temp_copy_indices.begin(), temp_copy_indices.end(),
-                       std::bind2nd(std::not_equal_to<unsigned int>(),
+                       std::bind2nd(std::not_equal_to<types::global_dof_index>(),
                                     numbers::invalid_unsigned_int));
       copy_to_and_from_indices[level].resize (n_active_dofs);
-      unsigned int counter = 0;
-      for (unsigned int i=0; i<temp_copy_indices.size(); ++i)
+      types::global_dof_index counter = 0;
+      for (types::global_dof_index i=0; i<temp_copy_indices.size(); ++i)
         if (temp_copy_indices[i] != numbers::invalid_unsigned_int)
           copy_to_and_from_indices[level][counter++] =
-            std::pair<unsigned int, unsigned int> (temp_copy_indices[i], i);
+            std::pair<types::global_dof_index, unsigned int> (temp_copy_indices[i], i);
       Assert (counter == n_active_dofs, ExcInternalError());
     }
 }
index 5d834c3e960ca0f07831f217234e0946e462a9ed..72b9b2e933114c0ff8cb6714526b9456cf859901 100644 (file)
@@ -116,8 +116,8 @@ void MGTransferPrebuilt<VECTOR>::build_matrices (
   // two fields which will store the
   // indices of the multigrid dofs
   // for a cell and one of its children
-  std::vector<unsigned int> dof_indices_parent (dofs_per_cell);
-  std::vector<unsigned int> dof_indices_child (dofs_per_cell);
+  std::vector<types::global_dof_index> dof_indices_parent (dofs_per_cell);
+  std::vector<types::global_dof_index> dof_indices_child (dofs_per_cell);
 
   // for each level: first build the sparsity
   // pattern of the matrices and then build the
@@ -139,7 +139,7 @@ void MGTransferPrebuilt<VECTOR>::build_matrices (
       // element will be stored
       CompressedSimpleSparsityPattern csp (sizes[level+1],
                                            sizes[level]);
-      std::vector<unsigned int> entries (dofs_per_cell);
+      std::vector<types::global_dof_index> entries (dofs_per_cell);
       for (typename DoFHandler<dim,spacedim>::cell_iterator cell=mg_dof.begin(level);
            cell != mg_dof.end(level); ++cell)
         if (cell->has_children())
@@ -219,7 +219,7 @@ void MGTransferPrebuilt<VECTOR>::build_matrices (
   if (mg_constrained_dofs != 0)
     if (mg_constrained_dofs->set_boundary_values())
       {
-        std::vector<unsigned int> constrain_indices;
+        std::vector<types::global_dof_index> constrain_indices;
         for (int level=n_levels-2; level>=0; --level)
           {
             if (mg_constrained_dofs->get_boundary_indices()[level].size() == 0)
@@ -232,14 +232,14 @@ void MGTransferPrebuilt<VECTOR>::build_matrices (
             // need to filter away.
             constrain_indices.resize (0);
             constrain_indices.resize (prolongation_matrices[level]->n(), 0);
-            std::set<unsigned int>::const_iterator dof
+            std::set<types::global_dof_index>::const_iterator dof
             = mg_constrained_dofs->get_boundary_indices()[level].begin(),
             endd = mg_constrained_dofs->get_boundary_indices()[level].end();
             for (; dof != endd; ++dof)
               constrain_indices[*dof] = 1;
 
-            const unsigned int n_dofs = prolongation_matrices[level]->m();
-            for (unsigned int i=0; i<n_dofs; ++i)
+            const types::global_dof_index n_dofs = prolongation_matrices[level]->m();
+            for (types::global_dof_index i=0; i<n_dofs; ++i)
               {
                 typename internal::MatrixSelector<VECTOR>::Matrix::iterator
                 start_row = prolongation_matrices[level]->begin(i),
@@ -265,9 +265,9 @@ void MGTransferPrebuilt<VECTOR>::build_matrices (
   // levels.
 
   copy_indices.resize(n_levels);
-  std::vector<unsigned int> temp_copy_indices;
-  std::vector<unsigned int> global_dof_indices (dofs_per_cell);
-  std::vector<unsigned int> level_dof_indices  (dofs_per_cell);
+  std::vector<types::global_dof_index> temp_copy_indices;
+  std::vector<types::global_dof_index> global_dof_indices (dofs_per_cell);
+  std::vector<types::global_dof_index> level_dof_indices  (dofs_per_cell);
   for (int level=mg_dof.get_tria().n_levels()-1; level>=0; --level)
     {
       copy_indices[level].clear();
@@ -308,16 +308,16 @@ void MGTransferPrebuilt<VECTOR>::build_matrices (
       // copy_indices object. Then, insert the pairs
       // of global index and level index into
       // copy_indices.
-      const unsigned int n_active_dofs =
+      const types::global_dof_index n_active_dofs =
         std::count_if (temp_copy_indices.begin(), temp_copy_indices.end(),
-                       std::bind2nd(std::not_equal_to<unsigned int>(),
+                       std::bind2nd(std::not_equal_to<types::global_dof_index>(),
                                     numbers::invalid_unsigned_int));
       copy_indices[level].resize (n_active_dofs);
-      unsigned int counter = 0;
-      for (unsigned int i=0; i<temp_copy_indices.size(); ++i)
+      types::global_dof_index counter = 0;
+      for (types::global_dof_index i=0; i<temp_copy_indices.size(); ++i)
         if (temp_copy_indices[i] != numbers::invalid_unsigned_int)
           copy_indices[level][counter++] =
-            std::pair<unsigned int, unsigned int> (temp_copy_indices[i], i);
+            std::pair<types::global_dof_index, unsigned int> (temp_copy_indices[i], i);
       Assert (counter == n_active_dofs, ExcInternalError());
     }
 }

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.