]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Convert unsigned int to types::global_dof_index in the tests.
authorBruno Turcksin <bruno.turcksin@gmail.com>
Thu, 21 Mar 2013 15:54:03 +0000 (15:54 +0000)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Thu, 21 Mar 2013 15:54:03 +0000 (15:54 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@28972 0785d39b-7218-0410-832d-ea1e28bc413d

20 files changed:
tests/bits/dof_constraints_03.cc
tests/bits/dof_tools_02d.cc
tests/bits/dof_tools_11.cc
tests/bits/dof_tools_15c.cc
tests/bits/dof_tools_15d.cc
tests/bits/dof_tools_15d_x.cc
tests/bits/dof_tools_16d.cc
tests/bits/dof_tools_16d_x.cc
tests/bits/step-12.cc
tests/codim_one/interpolate_boundary_values_02_vector_valued.cc
tests/codim_one/interpolate_boundary_values_03.cc
tests/deal.II/filtered_matrix.cc
tests/deal.II/inhomogeneous_constraints.cc
tests/distributed_grids/dof_handler_number_cache.cc
tests/hp/matrices.cc
tests/hp/renumber_block_wise_01a.cc
tests/petsc/52.cc
tests/petsc/67.cc
tests/petsc/69.cc
tests/petsc/parallel_sparse_matrix_01.cc

index 85f5737845f59e4dde6f545e6bada8ee6103130f..9f1adac50960891856346b3432995d3dfe353c19 100644 (file)
@@ -73,7 +73,7 @@ void test ()
 
                                    // then fill the matrix by setting up
                                    // bogus matrix entries
-  std::vector<unsigned int> local_dofs (fe.dofs_per_cell);
+  std::vector<types::global_dof_index> local_dofs (fe.dofs_per_cell);
   FullMatrix<double> local_matrix (fe.dofs_per_cell, fe.dofs_per_cell);
   for (typename DoFHandler<dim>::active_cell_iterator
          cell = dof_handler.begin_active();
index 0510940f142f4a373550d7967b64bc8c4b5fe2d4..a8c1ad6b5d199183427d5c9459ed20f310e27337 100644 (file)
@@ -47,7 +47,7 @@ check_this (const DoFHandler<dim> &dof_handler)
                                    // create sparsity pattern
   BlockCompressedSparsityPattern sp (n_components,
                                      n_components);
-  std::vector<types::global_dof_inde> dofs_per_component(n_components);
+  std::vector<types::global_dof_index> dofs_per_component(n_components);
   DoFTools::count_dofs_per_component (dof_handler,
                                       dofs_per_component);
   for (unsigned int i=0; i<n_components; ++i)
index 8488e3f9d8e922a29bf418ccd68e9d69a2dfaa85..f7ac89e061ff492b5d3cc63d1733f17802d59832 100644 (file)
@@ -55,7 +55,7 @@ check_this (const DoFHandler<dim> &dof_handler)
 
                                    // output every second element
   unsigned int j=0;
-  for (typename std::map<Point<dim>, unsigned int, Comp>::const_iterator
+  for (typename std::map<Point<dim>, types::global_dof_index, Comp>::const_iterator
          i=map.begin(); i!=map.end(); ++i,++j)
     if (j%2 == 0)
       deallog << i->first << " " << i->second << std::endl;
index 62ddd7b23ee8a9f3738002a1c47e0b3c4f35bced..797cb1976715f96a70b9ed773f327b9a42566cdf 100644 (file)
@@ -36,8 +36,9 @@ check_this (const DoFHandler<dim> &dof_handler)
   std::vector<types::global_dof_index> map (dof_handler.n_dofs());
   DoFTools::map_dof_to_boundary_indices (dof_handler, map);
   
-  const unsigned int n_blocks = std::min (dof_handler.get_fe().n_components(),
-                                          dof_handler.n_boundary_dofs());
+  const unsigned int n_blocks = std::min (
+      static_cast<types::global_dof_index>(dof_handler.get_fe().n_components()),
+      dof_handler.n_boundary_dofs());
   BlockSparsityPattern sp (n_blocks,
                            n_blocks);
                                    // split dofs almost arbitrarily to
index 8ada4c4bec7ed6885f3f0163d79c9012ee6e2d8b..43563535550448a979515aefca7a205991572a83 100644 (file)
@@ -36,13 +36,14 @@ check_this (const DoFHandler<dim> &dof_handler)
   std::vector<types::global_dof_index> map (dof_handler.n_dofs());
   DoFTools::map_dof_to_boundary_indices (dof_handler, map);
   
-  const unsigned int n_blocks = std::min (dof_handler.get_fe().n_components(),
-                                          dof_handler.n_boundary_dofs());
+  const unsigned int n_blocks = std::min (
+      static_cast<types::global_dof_index>(dof_handler.get_fe().n_components()),
+      dof_handler.n_boundary_dofs());
   BlockCompressedSparsityPattern sp (n_blocks,
                                      n_blocks);
                                    // split dofs almost arbitrarily to
                                    // blocks
-  std::vector<unsigned int> dofs_per_block(n_blocks);
+  std::vector<types::global_dof_index> dofs_per_block(n_blocks);
   for (unsigned int i=0; i<n_blocks-1; ++i)
     dofs_per_block[i] = dof_handler.n_boundary_dofs()/n_blocks;
   dofs_per_block.back() = (dof_handler.n_boundary_dofs() -
index db4cb9def42aab400981bd659415c985893df508..72655734e6b26c67e267d82624213cabec96d9da 100644 (file)
@@ -36,8 +36,9 @@ check_this (const DoFHandler<dim> &dof_handler)
   std::vector<types::global_dof_index> map (dof_handler.n_dofs());
   DoFTools::map_dof_to_boundary_indices (dof_handler, map);
   
-  const unsigned int n_blocks = std::min (dof_handler.get_fe().n_components(),
-                                          dof_handler.n_boundary_dofs());
+  const unsigned int n_blocks = std::min (
+      static_cast<types::global_dof_index>(dof_handler.get_fe().n_components()),
+      dof_handler.n_boundary_dofs());
   BlockCompressedSetSparsityPattern sp (n_blocks,
                                      n_blocks);
                                    // split dofs almost arbitrarily to
index 9be506ac0a59002f28091e6e6425749085293a91..0f88f5ea4f0788c1ecde865435c1a8c57af12f6f 100644 (file)
@@ -42,8 +42,9 @@ check_this (const DoFHandler<dim> &dof_handler)
   typename FunctionMap<dim>::type boundary_ids;
   boundary_ids[0] = 0;
   const types::global_dof_index n_boundary_dofs = dof_handler.n_boundary_dofs(boundary_ids);
-  const unsigned int n_blocks = std::min (dof_handler.get_fe().n_components(),
-                                          n_boundary_dofs);
+  const unsigned int n_blocks = std::min (
+      static_cast<types::global_dof_index>(dof_handler.get_fe().n_components()),
+      n_boundary_dofs);
   BlockCompressedSparsityPattern sp (n_blocks,
                                      n_blocks);
                                    // split dofs almost arbitrarily to
index 0cf3aaa769b7b77bcbce54fba058d643c5bfcb02..180255b0b0e04cd66ebda6870fba754f6daa5ac2 100644 (file)
@@ -42,8 +42,9 @@ check_this (const DoFHandler<dim> &dof_handler)
   typename FunctionMap<dim>::type boundary_ids;
   boundary_ids[0] = 0;
   const types::global_dof_index n_boundary_dofs = dof_handler.n_boundary_dofs(boundary_ids);
-  const unsigned int n_blocks = std::min (dof_handler.get_fe().n_components(),
-                                          n_boundary_dofs);
+  const unsigned int n_blocks = std::min (
+      static_cast<types::global_dof_index>(dof_handler.get_fe().n_components()),
+      n_boundary_dofs);
   BlockCompressedSetSparsityPattern sp (n_blocks,
                                      n_blocks);
                                    // split dofs almost arbitrarily to
index 71007b824ecc5ad09873d6aba143934df523969b..2b86c96151fc554edebc5d3f60e71cdfdd7c30ab 100644 (file)
@@ -567,8 +567,8 @@ template <int dim>
 void DGMethod<dim>::assemble_system2 () 
 {
   const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell;
-  std::vector<unsigned int> dofs (dofs_per_cell);
-  std::vector<unsigned int> dofs_neighbor (dofs_per_cell);
+  std::vector<types::global_dof_index> dofs (dofs_per_cell);
+  std::vector<types::global_dof_index> dofs_neighbor (dofs_per_cell);
 
   const UpdateFlags update_flags = update_values
                                    | update_gradients
index 29f646f9ab18de4aa93bb5a524ac7dfb1b20cb34..387a2dd8a735d9433035664af7736940a252a894 100644 (file)
@@ -62,14 +62,14 @@ void test() {
                                     // separatel
     for (unsigned int boundary_id=0; boundary_id<2; ++boundary_id)
       {
-       std::map<unsigned int, double> bv;
+       std::map<types::global_dof_index, double> bv;
        VectorTools::interpolate_boundary_values (dof_handler,
                                                  boundary_id,
                                                  X<spacedim>(),
                                                  bv);
        deallog << bv.size() << " boundary degrees of freedom" << std::endl;
 
-       for (std::map<unsigned int, double>::const_iterator i = bv.begin();
+       for (std::map<types::global_dof_index, double>::const_iterator i = bv.begin();
             i != bv.end(); ++i)
          deallog << i->first << ' ' << i->second << std::endl;
 
index d1a95331ea2abc9ada73d29dd7d57ea24566c513..21d7a20e48c064b5f6bc51067705eb0794cad08f 100644 (file)
@@ -62,7 +62,7 @@ void test() {
                                                bv);
       deallog << bv.size() << " boundary degrees of freedom" << std::endl;
       
-      for (std::map<unsigned int, double>::const_iterator i = bv.begin();
+      for (std::map<types::global_dof_index, double>::const_iterator i = bv.begin();
           i != bv.end(); ++i)
        deallog << i->first << ' ' << i->second << std::endl;
       
index f6b74cad1b558302e54e4d9936a29680489aa9c9..b5107d317d753ce70d9afbd113600c25b4784c91 100644 (file)
@@ -67,7 +67,7 @@ solve_filtered (std::map<types::global_dof_index,double> &bv,
   
   solver.solve (A1, u, f1, fprec);
 
-  for (std::map<unsigned int,double>::const_iterator i=bv.begin();
+  for (std::map<types::global_dof_index,double>::const_iterator i=bv.begin();
        i!=bv.end(); ++i)
     Assert (std::fabs(u(i->first) - i->second) < 1e-8,
            ExcInternalError());
index 6920559810baf9d030faea5e8a79e7a3e9dbbc9a..2e52f8cb1851f28498fa118f2eda185ed9198ea7 100644 (file)
@@ -204,7 +204,7 @@ void LaplaceProblem<dim>::setup_system ()
                                              0,
                                              BoundaryValues<dim>(),
                                              boundary_values);
-    std::map<unsigned int,double>::const_iterator boundary_value = boundary_values.begin();
+    std::map<types::global_dof_index,double>::const_iterator boundary_value = boundary_values.begin();
     for ( ; boundary_value !=boundary_values.end(); ++boundary_value)
       {
        if (!test_all_constraints.is_constrained(boundary_value->first))
index 03fa3570da490caf919249ea4f8d07b4d8666660..ec4bf7ac5ec6d6a233e5b5ec693f8b0733dcbf76 100644 (file)
@@ -96,7 +96,7 @@ void test()
       Assert (dof_handler.locally_owned_dofs() == all,
              ExcInternalError());
       Assert (dof_handler.n_locally_owned_dofs_per_processor() ==
-             std::vector<unsigned int> (1,N),
+             std::vector<types::global_dof_index> (1,N),
              ExcInternalError());
       Assert (dof_handler.locally_owned_dofs_per_processor() ==
              std::vector<IndexSet>(1,all),
index 5cc50064799166db25188f8e79b158deff0063ea..3758b746d8aa90a142277a76dc4ce4244eeca730 100644 (file)
@@ -72,7 +72,7 @@ check_boundary (const hp::DoFHandler<dim> &dof,
   hp::QCollection<dim-1> face_quadrature;
   face_quadrature.push_back (QGauss<dim-1>(6));
   
-  std::vector<dof_index> dof_to_boundary_mapping;
+  std::vector<types::global_dof_index> dof_to_boundary_mapping;
   DoFTools::map_dof_to_boundary_indices (dof,
                                         dof_to_boundary_mapping);
 
index f2ec1b139d462e8c7fa0ba2bc84accb420b9157a..10ddaaff128d43facd1228bd92123d1c7db11065 100644 (file)
@@ -65,7 +65,7 @@ check_renumbering(hp::DoFHandler<dim>& dof)
                                   // do component-wise and save the
                                   // results
   DoFRenumbering::component_wise (dof);
-  const std::vector<unsigned int> vc = get_dofs (dof);
+  const std::vector<types::global_dof_index> vc = get_dofs (dof);
 
   deallog << "OK" << std::endl;
 }
index dd3e5235ab5bb703e67e0740f5f1a8e919d58bfe..1bf6aa4832bd65f56adf7c0d1d1241d886c96373 100644 (file)
@@ -62,7 +62,8 @@ int main (int argc,char **argv)
     {
       PetscInitialize(&argc,&argv,0,0);
       {
-        std::vector<unsigned int> row_lengths (5, 3U);
+        std::vector<types::global_dof_index> row_lengths (5,
+            static_cast<types::global_dof_index>(3));
         row_lengths.back() = 2;
         PETScWrappers::SparseMatrix m (5,5,row_lengths);
         test (m);
index 988b5448d075d226e95314739a773d9310242c49..cbb91719e132cd967947d86e3e5d735a354a71ad 100644 (file)
@@ -77,8 +77,8 @@ void test (PETScWrappers::MatrixBase &m)
       const double s = m.el(N/3,i);
       norm_sqr -= s*s;
     }
-  const unsigned int rows[2] = { N/3, N/2 };
-  m.clear_rows (std::vector<unsigned int>(&rows[0], &rows[2]));
+  const types::global_dof_index rows[2] = { N/3, N/2 };
+  m.clear_rows (std::vector<types::global_dof_index>(&rows[0], &rows[2]));
   
   deallog << m.frobenius_norm() << ' ' << std::sqrt (norm_sqr)
           << std::endl;
index 8d34de162cd9819fe35e03e6049fec6998d9f9ff..63bcedb50453a817b57df2f057158cc629c9ccc7 100644 (file)
@@ -81,8 +81,8 @@ void test (PETScWrappers::MatrixBase &m)
     }
   norm_sqr += 2*rnd*rnd;
   
-  const unsigned int rows[2] = { N/3, N/2 };
-  m.clear_rows (std::vector<unsigned int>(&rows[0], &rows[2]), rnd);
+  const types::global_dof_index rows[2] = { N/3, N/2 };
+  m.clear_rows (std::vector<types::global_dof_index>(&rows[0], &rows[2]), rnd);
   
   deallog << m.frobenius_norm() << ' ' << std::sqrt (norm_sqr)
           << std::endl;
index 3b571c1dae596a69d2fb2eeb94818af1d6b610c3..ad8b16339edf1c55595e7a7e8da6f466acc5b9d4 100644 (file)
@@ -57,8 +57,8 @@ void test ()
                                    // process has 10 rows, the second one 20,
                                    // the third one 30, and so on
   unsigned int N = 0;
-  std::vector<unsigned int> local_rows_per_process (get_n_mpi_processes());
-  std::vector<unsigned int> start_row (get_n_mpi_processes());
+  std::vector<types::global_dof_index> local_rows_per_process (get_n_mpi_processes());
+  std::vector<types::global_dof_index> start_row (get_n_mpi_processes());
   for (unsigned int i=0; i<get_n_mpi_processes(); ++i)
     {
       N += (i+1)*10;

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.