From: turcksin Date: Thu, 21 Mar 2013 15:54:03 +0000 (+0000) Subject: Convert unsigned int to types::global_dof_index in the tests. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ada7159e80e3099743d2045b0cac93995640c4d6;p=dealii-svn.git Convert unsigned int to types::global_dof_index in the tests. git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@28972 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/bits/dof_constraints_03.cc b/tests/bits/dof_constraints_03.cc index 85f5737845..9f1adac509 100644 --- a/tests/bits/dof_constraints_03.cc +++ b/tests/bits/dof_constraints_03.cc @@ -73,7 +73,7 @@ void test () // then fill the matrix by setting up // bogus matrix entries - std::vector local_dofs (fe.dofs_per_cell); + std::vector local_dofs (fe.dofs_per_cell); FullMatrix local_matrix (fe.dofs_per_cell, fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(); diff --git a/tests/bits/dof_tools_02d.cc b/tests/bits/dof_tools_02d.cc index 0510940f14..a8c1ad6b5d 100644 --- a/tests/bits/dof_tools_02d.cc +++ b/tests/bits/dof_tools_02d.cc @@ -47,7 +47,7 @@ check_this (const DoFHandler &dof_handler) // create sparsity pattern BlockCompressedSparsityPattern sp (n_components, n_components); - std::vector dofs_per_component(n_components); + std::vector dofs_per_component(n_components); DoFTools::count_dofs_per_component (dof_handler, dofs_per_component); for (unsigned int i=0; i &dof_handler) // output every second element unsigned int j=0; - for (typename std::map, unsigned int, Comp>::const_iterator + for (typename std::map, 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; diff --git a/tests/bits/dof_tools_15c.cc b/tests/bits/dof_tools_15c.cc index 62ddd7b23e..797cb19767 100644 --- a/tests/bits/dof_tools_15c.cc +++ b/tests/bits/dof_tools_15c.cc @@ -36,8 +36,9 @@ check_this (const DoFHandler &dof_handler) std::vector 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(dof_handler.get_fe().n_components()), + dof_handler.n_boundary_dofs()); BlockSparsityPattern sp (n_blocks, n_blocks); // split dofs almost arbitrarily to diff --git a/tests/bits/dof_tools_15d.cc b/tests/bits/dof_tools_15d.cc index 8ada4c4bec..4356353555 100644 --- a/tests/bits/dof_tools_15d.cc +++ b/tests/bits/dof_tools_15d.cc @@ -36,13 +36,14 @@ check_this (const DoFHandler &dof_handler) std::vector 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(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 dofs_per_block(n_blocks); + std::vector dofs_per_block(n_blocks); for (unsigned int i=0; i &dof_handler) std::vector 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(dof_handler.get_fe().n_components()), + dof_handler.n_boundary_dofs()); BlockCompressedSetSparsityPattern sp (n_blocks, n_blocks); // split dofs almost arbitrarily to diff --git a/tests/bits/dof_tools_16d.cc b/tests/bits/dof_tools_16d.cc index 9be506ac0a..0f88f5ea4f 100644 --- a/tests/bits/dof_tools_16d.cc +++ b/tests/bits/dof_tools_16d.cc @@ -42,8 +42,9 @@ check_this (const DoFHandler &dof_handler) typename FunctionMap::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(dof_handler.get_fe().n_components()), + n_boundary_dofs); BlockCompressedSparsityPattern sp (n_blocks, n_blocks); // split dofs almost arbitrarily to diff --git a/tests/bits/dof_tools_16d_x.cc b/tests/bits/dof_tools_16d_x.cc index 0cf3aaa769..180255b0b0 100644 --- a/tests/bits/dof_tools_16d_x.cc +++ b/tests/bits/dof_tools_16d_x.cc @@ -42,8 +42,9 @@ check_this (const DoFHandler &dof_handler) typename FunctionMap::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(dof_handler.get_fe().n_components()), + n_boundary_dofs); BlockCompressedSetSparsityPattern sp (n_blocks, n_blocks); // split dofs almost arbitrarily to diff --git a/tests/bits/step-12.cc b/tests/bits/step-12.cc index 71007b824e..2b86c96151 100644 --- a/tests/bits/step-12.cc +++ b/tests/bits/step-12.cc @@ -567,8 +567,8 @@ template void DGMethod::assemble_system2 () { const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell; - std::vector dofs (dofs_per_cell); - std::vector dofs_neighbor (dofs_per_cell); + std::vector dofs (dofs_per_cell); + std::vector dofs_neighbor (dofs_per_cell); const UpdateFlags update_flags = update_values | update_gradients diff --git a/tests/codim_one/interpolate_boundary_values_02_vector_valued.cc b/tests/codim_one/interpolate_boundary_values_02_vector_valued.cc index 29f646f9ab..387a2dd8a7 100644 --- a/tests/codim_one/interpolate_boundary_values_02_vector_valued.cc +++ b/tests/codim_one/interpolate_boundary_values_02_vector_valued.cc @@ -62,14 +62,14 @@ void test() { // separatel for (unsigned int boundary_id=0; boundary_id<2; ++boundary_id) { - std::map bv; + std::map bv; VectorTools::interpolate_boundary_values (dof_handler, boundary_id, X(), bv); deallog << bv.size() << " boundary degrees of freedom" << std::endl; - for (std::map::const_iterator i = bv.begin(); + for (std::map::const_iterator i = bv.begin(); i != bv.end(); ++i) deallog << i->first << ' ' << i->second << std::endl; diff --git a/tests/codim_one/interpolate_boundary_values_03.cc b/tests/codim_one/interpolate_boundary_values_03.cc index d1a95331ea..21d7a20e48 100644 --- a/tests/codim_one/interpolate_boundary_values_03.cc +++ b/tests/codim_one/interpolate_boundary_values_03.cc @@ -62,7 +62,7 @@ void test() { bv); deallog << bv.size() << " boundary degrees of freedom" << std::endl; - for (std::map::const_iterator i = bv.begin(); + for (std::map::const_iterator i = bv.begin(); i != bv.end(); ++i) deallog << i->first << ' ' << i->second << std::endl; diff --git a/tests/deal.II/filtered_matrix.cc b/tests/deal.II/filtered_matrix.cc index f6b74cad1b..b5107d317d 100644 --- a/tests/deal.II/filtered_matrix.cc +++ b/tests/deal.II/filtered_matrix.cc @@ -67,7 +67,7 @@ solve_filtered (std::map &bv, solver.solve (A1, u, f1, fprec); - for (std::map::const_iterator i=bv.begin(); + for (std::map::const_iterator i=bv.begin(); i!=bv.end(); ++i) Assert (std::fabs(u(i->first) - i->second) < 1e-8, ExcInternalError()); diff --git a/tests/deal.II/inhomogeneous_constraints.cc b/tests/deal.II/inhomogeneous_constraints.cc index 6920559810..2e52f8cb18 100644 --- a/tests/deal.II/inhomogeneous_constraints.cc +++ b/tests/deal.II/inhomogeneous_constraints.cc @@ -204,7 +204,7 @@ void LaplaceProblem::setup_system () 0, BoundaryValues(), boundary_values); - std::map::const_iterator boundary_value = boundary_values.begin(); + std::map::const_iterator boundary_value = boundary_values.begin(); for ( ; boundary_value !=boundary_values.end(); ++boundary_value) { if (!test_all_constraints.is_constrained(boundary_value->first)) diff --git a/tests/distributed_grids/dof_handler_number_cache.cc b/tests/distributed_grids/dof_handler_number_cache.cc index 03fa3570da..ec4bf7ac5e 100644 --- a/tests/distributed_grids/dof_handler_number_cache.cc +++ b/tests/distributed_grids/dof_handler_number_cache.cc @@ -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 (1,N), + std::vector (1,N), ExcInternalError()); Assert (dof_handler.locally_owned_dofs_per_processor() == std::vector(1,all), diff --git a/tests/hp/matrices.cc b/tests/hp/matrices.cc index 5cc5006479..3758b746d8 100644 --- a/tests/hp/matrices.cc +++ b/tests/hp/matrices.cc @@ -72,7 +72,7 @@ check_boundary (const hp::DoFHandler &dof, hp::QCollection face_quadrature; face_quadrature.push_back (QGauss(6)); - std::vector dof_to_boundary_mapping; + std::vector dof_to_boundary_mapping; DoFTools::map_dof_to_boundary_indices (dof, dof_to_boundary_mapping); diff --git a/tests/hp/renumber_block_wise_01a.cc b/tests/hp/renumber_block_wise_01a.cc index f2ec1b139d..10ddaaff12 100644 --- a/tests/hp/renumber_block_wise_01a.cc +++ b/tests/hp/renumber_block_wise_01a.cc @@ -65,7 +65,7 @@ check_renumbering(hp::DoFHandler& dof) // do component-wise and save the // results DoFRenumbering::component_wise (dof); - const std::vector vc = get_dofs (dof); + const std::vector vc = get_dofs (dof); deallog << "OK" << std::endl; } diff --git a/tests/petsc/52.cc b/tests/petsc/52.cc index dd3e5235ab..1bf6aa4832 100644 --- a/tests/petsc/52.cc +++ b/tests/petsc/52.cc @@ -62,7 +62,8 @@ int main (int argc,char **argv) { PetscInitialize(&argc,&argv,0,0); { - std::vector row_lengths (5, 3U); + std::vector row_lengths (5, + static_cast(3)); row_lengths.back() = 2; PETScWrappers::SparseMatrix m (5,5,row_lengths); test (m); diff --git a/tests/petsc/67.cc b/tests/petsc/67.cc index 988b5448d0..cbb91719e1 100644 --- a/tests/petsc/67.cc +++ b/tests/petsc/67.cc @@ -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(&rows[0], &rows[2])); + const types::global_dof_index rows[2] = { N/3, N/2 }; + m.clear_rows (std::vector(&rows[0], &rows[2])); deallog << m.frobenius_norm() << ' ' << std::sqrt (norm_sqr) << std::endl; diff --git a/tests/petsc/69.cc b/tests/petsc/69.cc index 8d34de162c..63bcedb504 100644 --- a/tests/petsc/69.cc +++ b/tests/petsc/69.cc @@ -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(&rows[0], &rows[2]), rnd); + const types::global_dof_index rows[2] = { N/3, N/2 }; + m.clear_rows (std::vector(&rows[0], &rows[2]), rnd); deallog << m.frobenius_norm() << ' ' << std::sqrt (norm_sqr) << std::endl; diff --git a/tests/petsc/parallel_sparse_matrix_01.cc b/tests/petsc/parallel_sparse_matrix_01.cc index 3b571c1dae..ad8b16339e 100644 --- a/tests/petsc/parallel_sparse_matrix_01.cc +++ b/tests/petsc/parallel_sparse_matrix_01.cc @@ -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 local_rows_per_process (get_n_mpi_processes()); - std::vector start_row (get_n_mpi_processes()); + std::vector local_rows_per_process (get_n_mpi_processes()); + std::vector start_row (get_n_mpi_processes()); for (unsigned int i=0; i