From: turcksin Date: Wed, 20 Mar 2013 19:54:19 +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=fb77696c2e3220c0138e35e4052d6b93425b3350;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@28961 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/bits/count_dofs_per_block_01.cc b/tests/bits/count_dofs_per_block_01.cc index 358308d8d6..1fcaa0452f 100644 --- a/tests/bits/count_dofs_per_block_01.cc +++ b/tests/bits/count_dofs_per_block_01.cc @@ -42,7 +42,7 @@ std::string output_file_name = "count_dofs_per_block_01/output"; -void print (const std::vector &v) +void print (const std::vector &v) { deallog << v.size(); for (unsigned int i=0; i &v) +void print (const std::vector &v) { deallog << v.size(); for (unsigned int i=0; i dofs_per_component_hp(3,0); + std::vector dofs_per_component_hp(3,0); DoFTools::count_dofs_per_component(hp_dof_handler, dofs_per_component_hp); for (unsigned int i=0; i<3; i++) diff --git a/tests/bits/dof_constraints_01.cc b/tests/bits/dof_constraints_01.cc index bef2390654..7e2cdbcaca 100644 --- a/tests/bits/dof_constraints_01.cc +++ b/tests/bits/dof_constraints_01.cc @@ -81,7 +81,7 @@ void test () // them into the matrix and condensing away // hanging node constraints later on, or // (2) distributing them right away - 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_constraints_02.cc b/tests/bits/dof_constraints_02.cc index 42774dc596..2c83343e88 100644 --- a/tests/bits/dof_constraints_02.cc +++ b/tests/bits/dof_constraints_02.cc @@ -74,7 +74,7 @@ void test () // them into the vector and condensing away // hanging node constraints later on, or // (2) distributing them right away - std::vector local_dofs (fe.dofs_per_cell); + std::vector local_dofs (fe.dofs_per_cell); Vector local_vector (fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(); diff --git a/tests/bits/dof_constraints_07.cc b/tests/bits/dof_constraints_07.cc index 7cd345edb1..cd98abc715 100644 --- a/tests/bits/dof_constraints_07.cc +++ b/tests/bits/dof_constraints_07.cc @@ -61,7 +61,7 @@ void test () constraints.close (); deallog << "Number of constraints: " << constraints.n_constraints() << std::endl; - std::vector block_sizes(2); + std::vector block_sizes(2); block_sizes[0] = dof_handler.n_dofs()/3; block_sizes[1] = dof_handler.n_dofs() - block_sizes[0]; BlockVector b(block_sizes); diff --git a/tests/bits/dof_constraints_08.cc b/tests/bits/dof_constraints_08.cc index db2b6090ef..1124c09ca0 100644 --- a/tests/bits/dof_constraints_08.cc +++ b/tests/bits/dof_constraints_08.cc @@ -61,7 +61,7 @@ void test () constraints.close (); deallog << "Number of constraints: " << constraints.n_constraints() << std::endl; - std::vector block_sizes(2); + std::vector block_sizes(2); block_sizes[0] = dof_handler.n_dofs()/3; block_sizes[1] = dof_handler.n_dofs() - block_sizes[0]; BlockVector b(block_sizes); diff --git a/tests/bits/dof_constraints_09.cc b/tests/bits/dof_constraints_09.cc index 2fd5782fde..26d39aef70 100644 --- a/tests/bits/dof_constraints_09.cc +++ b/tests/bits/dof_constraints_09.cc @@ -81,7 +81,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_00a.cc b/tests/bits/dof_tools_00a.cc index 3998f0eb6c..26e8d09cbb 100644 --- a/tests/bits/dof_tools_00a.cc +++ b/tests/bits/dof_tools_00a.cc @@ -29,7 +29,7 @@ check_this (const DoFHandler &dof_handler) deallog << "n_dofs:" << dof_handler.n_dofs() << std::endl; - std::vector dofs_per_component(n_components); + std::vector dofs_per_component(n_components); DoFTools::count_dofs_per_component (dof_handler, dofs_per_component); diff --git a/tests/bits/dof_tools_01c.cc b/tests/bits/dof_tools_01c.cc index e80558bbc1..78b4d2f4ac 100644 --- a/tests/bits/dof_tools_01c.cc +++ b/tests/bits/dof_tools_01c.cc @@ -40,7 +40,7 @@ check_this (const DoFHandler &dof_handler) const unsigned int n_components = dof_handler.get_fe().n_components(); BlockSparsityPattern 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) const unsigned int n_components = dof_handler.get_fe().n_components(); 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) const unsigned int n_components = dof_handler.get_fe().n_components(); BlockCompressedSetSparsityPattern 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) // create sparsity pattern BlockSparsityPattern 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) // 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) // create sparsity pattern BlockCompressedSetSparsityPattern 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 void check_this (const DoFHandler &dof_handler) { - std::vector n_dofs(dof_handler.get_fe().n_components()); + std::vector n_dofs(dof_handler.get_fe().n_components()); DoFTools::count_dofs_per_component (dof_handler, n_dofs); for (unsigned int i=0; i void check_this (const DoFHandler &dof_handler) { - std::vector map(dof_handler.n_dofs()); + std::vector map(dof_handler.n_dofs()); DoFTools::map_dof_to_boundary_indices (dof_handler, map); for (unsigned int i=0; i void check_this (const DoFHandler &dof_handler) { - std::vector map(dof_handler.n_dofs()); + std::vector map(dof_handler.n_dofs()); std::set boundary_ids; // check for boundary id 0 alone diff --git a/tests/bits/dof_tools_11.cc b/tests/bits/dof_tools_11.cc index 5b6a51d8e7..8488e3f9d8 100644 --- a/tests/bits/dof_tools_11.cc +++ b/tests/bits/dof_tools_11.cc @@ -48,7 +48,7 @@ check_this (const DoFHandler &dof_handler) if (dof_handler.get_fe().get_unit_support_points().size() == 0) return; - std::map, unsigned int, Comp> map; + std::map, types::global_dof_index, Comp> map; MappingQ mapping(2); DoFTools::map_support_points_to_dofs (mapping, dof_handler, map); diff --git a/tests/bits/dof_tools_15a.cc b/tests/bits/dof_tools_15a.cc index 7527e67d66..424332224c 100644 --- a/tests/bits/dof_tools_15a.cc +++ b/tests/bits/dof_tools_15a.cc @@ -34,7 +34,7 @@ check_this (const DoFHandler &dof_handler) if (dof_handler.get_fe().dofs_per_face == 0) return; - std::vector map (dof_handler.n_dofs()); + std::vector map (dof_handler.n_dofs()); DoFTools::map_dof_to_boundary_indices (dof_handler, map); // create sparsity pattern diff --git a/tests/bits/dof_tools_15b.cc b/tests/bits/dof_tools_15b.cc index 71b7b74d84..184955bae7 100644 --- a/tests/bits/dof_tools_15b.cc +++ b/tests/bits/dof_tools_15b.cc @@ -33,7 +33,7 @@ check_this (const DoFHandler &dof_handler) if (dof_handler.get_fe().dofs_per_face == 0) return; - std::vector map (dof_handler.n_dofs()); + std::vector map (dof_handler.n_dofs()); DoFTools::map_dof_to_boundary_indices (dof_handler, map); // create sparsity pattern diff --git a/tests/bits/dof_tools_15b_x.cc b/tests/bits/dof_tools_15b_x.cc index f2e9ecbb02..aac6504231 100644 --- a/tests/bits/dof_tools_15b_x.cc +++ b/tests/bits/dof_tools_15b_x.cc @@ -33,7 +33,7 @@ check_this (const DoFHandler &dof_handler) if (dof_handler.get_fe().dofs_per_face == 0) return; - std::vector map (dof_handler.n_dofs()); + std::vector map (dof_handler.n_dofs()); DoFTools::map_dof_to_boundary_indices (dof_handler, map); // create sparsity pattern diff --git a/tests/bits/dof_tools_15c.cc b/tests/bits/dof_tools_15c.cc index 17a57a16e8..62ddd7b23e 100644 --- a/tests/bits/dof_tools_15c.cc +++ b/tests/bits/dof_tools_15c.cc @@ -33,7 +33,7 @@ check_this (const DoFHandler &dof_handler) if (dof_handler.get_fe().dofs_per_face == 0) return; - std::vector map (dof_handler.n_dofs()); + 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(), @@ -42,7 +42,7 @@ check_this (const DoFHandler &dof_handler) 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) if (dof_handler.get_fe().dofs_per_face == 0) return; - std::vector map (dof_handler.n_dofs()); + 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(), diff --git a/tests/bits/dof_tools_15d_x.cc b/tests/bits/dof_tools_15d_x.cc index 70bc8a36e8..db4cb9def4 100644 --- a/tests/bits/dof_tools_15d_x.cc +++ b/tests/bits/dof_tools_15d_x.cc @@ -33,7 +33,7 @@ check_this (const DoFHandler &dof_handler) if (dof_handler.get_fe().dofs_per_face == 0) return; - std::vector map (dof_handler.n_dofs()); + 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(), @@ -42,7 +42,7 @@ check_this (const DoFHandler &dof_handler) 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) if (dof_handler.get_fe().dofs_per_face == 0) return; - std::vector map (dof_handler.n_dofs()); + std::vector map (dof_handler.n_dofs()); std::set set; set.insert (0); DoFTools::map_dof_to_boundary_indices (dof_handler, set, map); diff --git a/tests/bits/dof_tools_16b.cc b/tests/bits/dof_tools_16b.cc index c2e3f797da..ce4f2e3fe1 100644 --- a/tests/bits/dof_tools_16b.cc +++ b/tests/bits/dof_tools_16b.cc @@ -34,7 +34,7 @@ check_this (const DoFHandler &dof_handler) if (dof_handler.get_fe().dofs_per_face == 0) return; - std::vector map (dof_handler.n_dofs()); + std::vector map (dof_handler.n_dofs()); std::set set; set.insert (0); DoFTools::map_dof_to_boundary_indices (dof_handler, set, map); diff --git a/tests/bits/dof_tools_16b_x.cc b/tests/bits/dof_tools_16b_x.cc index e88a192fee..cfa8cbdeeb 100644 --- a/tests/bits/dof_tools_16b_x.cc +++ b/tests/bits/dof_tools_16b_x.cc @@ -34,7 +34,7 @@ check_this (const DoFHandler &dof_handler) if (dof_handler.get_fe().dofs_per_face == 0) return; - std::vector map (dof_handler.n_dofs()); + std::vector map (dof_handler.n_dofs()); std::set set; set.insert (0); DoFTools::map_dof_to_boundary_indices (dof_handler, set, map); diff --git a/tests/bits/dof_tools_16c.cc b/tests/bits/dof_tools_16c.cc index f758ee3394..973e3fb307 100644 --- a/tests/bits/dof_tools_16c.cc +++ b/tests/bits/dof_tools_16c.cc @@ -34,7 +34,7 @@ check_this (const DoFHandler &dof_handler) if (dof_handler.get_fe().dofs_per_face == 0) return; - std::vector map (dof_handler.n_dofs()); + std::vector map (dof_handler.n_dofs()); std::set set; set.insert (0); DoFTools::map_dof_to_boundary_indices (dof_handler, set, map); @@ -48,7 +48,7 @@ check_this (const DoFHandler &dof_handler) 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) if (dof_handler.get_fe().dofs_per_face == 0) return; - std::vector map (dof_handler.n_dofs()); + std::vector map (dof_handler.n_dofs()); std::set set; set.insert (0); DoFTools::map_dof_to_boundary_indices (dof_handler, set, map); typename FunctionMap::type boundary_ids; boundary_ids[0] = 0; - const unsigned int n_boundary_dofs = dof_handler.n_boundary_dofs(boundary_ids); + 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); 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) if (dof_handler.get_fe().dofs_per_face == 0) return; - std::vector map (dof_handler.n_dofs()); + std::vector map (dof_handler.n_dofs()); std::set set; set.insert (0); DoFTools::map_dof_to_boundary_indices (dof_handler, set, map); typename FunctionMap::type boundary_ids; boundary_ids[0] = 0; - const unsigned int n_boundary_dofs = dof_handler.n_boundary_dofs(boundary_ids); + 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); BlockCompressedSetSparsityPattern 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) const unsigned int n_components = dof_handler.get_fe().n_components(); BlockSparsityPattern 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) const unsigned int n_components = dof_handler.get_fe().n_components(); 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) const unsigned int n_components = dof_handler.get_fe().n_components(); BlockCompressedSetSparsityPattern 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) const unsigned int n_components = dof_handler.get_fe().n_components(); BlockSparsityPattern 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) const unsigned int n_components = dof_handler.get_fe().n_components(); 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) const unsigned int n_components = dof_handler.get_fe().n_components(); BlockCompressedSetSparsityPattern 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, bool constrain_only_velocity = // Determine the orientation of the two faces: - std::vector dofs_1(fe.dofs_per_face); - std::vector dofs_2(fe.dofs_per_face); + std::vector dofs_1(fe.dofs_per_face); + std::vector dofs_2(fe.dofs_per_face); const unsigned int face_1_index = face_1->nth_active_fe_index(0); const unsigned int face_2_index = face_2->nth_active_fe_index(0); face_1->get_dof_indices(dofs_1, face_1_index); diff --git a/tests/bits/fe_tools_common.h b/tests/bits/fe_tools_common.h index dcf31fc3d2..17aca14894 100644 --- a/tests/bits/fe_tools_common.h +++ b/tests/bits/fe_tools_common.h @@ -83,7 +83,8 @@ output_vector (const VECTOR &v) // write out at most 20 equispaced // elements of the vector - for (unsigned int i=0; i(1), + v.size()/20)) deallog << v(i) << ' '; deallog << std::endl; } diff --git a/tests/bits/gerold_2.cc b/tests/bits/gerold_2.cc index ad6edd4a5a..efdb92c3a0 100644 --- a/tests/bits/gerold_2.cc +++ b/tests/bits/gerold_2.cc @@ -56,7 +56,7 @@ void LaplaceProblem::run () SparsityPattern cell_connectivity; GridTools::get_face_connectivity_of_cells (triangulation, cell_connectivity); - std::vector permutation(triangulation.n_active_cells()); + std::vector permutation(triangulation.n_active_cells()); SparsityTools::reorder_Cuthill_McKee (cell_connectivity, permutation); for (unsigned int i=0; i 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); Vector local_vector (fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator diff --git a/tests/bits/make_boundary_constraints_02.cc b/tests/bits/make_boundary_constraints_02.cc index 1f051876ee..ed71dafe3c 100644 --- a/tests/bits/make_boundary_constraints_02.cc +++ b/tests/bits/make_boundary_constraints_02.cc @@ -106,7 +106,7 @@ void test () // and for A applying constraints // right away and for B applying // constraints later on - 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); Vector local_vector (fe.dofs_per_cell); for (typename DoFHandler::active_cell_iterator diff --git a/tests/bits/sparse_matrix_add_entries_01.cc b/tests/bits/sparse_matrix_add_entries_01.cc index 9e40b81b11..b45577b6a1 100644 --- a/tests/bits/sparse_matrix_add_entries_01.cc +++ b/tests/bits/sparse_matrix_add_entries_01.cc @@ -36,7 +36,7 @@ void test () SparseMatrix m(sp); // prepare structure with indices and values - std::vector indices (m.n()); + std::vector indices (m.n()); for (unsigned int j=0; j values (m.n()); diff --git a/tests/bits/sparse_matrix_add_entries_02.cc b/tests/bits/sparse_matrix_add_entries_02.cc index ae3f3cbb4d..2c3e7e0c0d 100644 --- a/tests/bits/sparse_matrix_add_entries_02.cc +++ b/tests/bits/sparse_matrix_add_entries_02.cc @@ -36,7 +36,7 @@ void test () SparseMatrix m(sp); // prepare structure with indices and values - std::vector indices (m.n()); + std::vector indices (m.n()); for (unsigned int j=0; j values (m.n()); diff --git a/tests/bits/sparse_matrix_add_entries_03.cc b/tests/bits/sparse_matrix_add_entries_03.cc index 4734d7aba2..ebcdc41088 100644 --- a/tests/bits/sparse_matrix_add_entries_03.cc +++ b/tests/bits/sparse_matrix_add_entries_03.cc @@ -36,7 +36,7 @@ void test () SparseMatrix m(sp); // prepare structure with indices and values - std::vector indices (m.n()); + std::vector indices (m.n()); for (unsigned int j=0; j values (m.n()); diff --git a/tests/bits/sparse_matrix_add_entries_04.cc b/tests/bits/sparse_matrix_add_entries_04.cc index 1f3a4f9169..070cbbcac4 100644 --- a/tests/bits/sparse_matrix_add_entries_04.cc +++ b/tests/bits/sparse_matrix_add_entries_04.cc @@ -35,7 +35,7 @@ void test () SparseMatrix m(sp); // prepare structure with indices and values - std::vector indices (m.n()); + std::vector indices (m.n()); for (unsigned int j=0; j values (m.n()); diff --git a/tests/bits/sparse_matrix_add_entries_05.cc b/tests/bits/sparse_matrix_add_entries_05.cc index 98098386ed..02d6f73148 100644 --- a/tests/bits/sparse_matrix_add_entries_05.cc +++ b/tests/bits/sparse_matrix_add_entries_05.cc @@ -35,7 +35,7 @@ void test () SparseMatrix m(sp); // prepare structure with indices and values - std::vector indices (m.n()); + std::vector indices (m.n()); for (unsigned int i=0; i values (m.n()); diff --git a/tests/bits/sparse_matrix_add_entries_06.cc b/tests/bits/sparse_matrix_add_entries_06.cc index d169f71cbe..288610173b 100644 --- a/tests/bits/sparse_matrix_add_entries_06.cc +++ b/tests/bits/sparse_matrix_add_entries_06.cc @@ -36,7 +36,7 @@ void test () SparseMatrix m(sp); // prepare structure with indices and values - std::vector indices (m.n()); + std::vector indices (m.n()); for (unsigned int j=0; j values (m.n()); diff --git a/tests/bits/step-12.cc b/tests/bits/step-12.cc index 9bce807338..71007b824e 100644 --- a/tests/bits/step-12.cc +++ b/tests/bits/step-12.cc @@ -401,8 +401,8 @@ template void DGMethod::assemble_system1 () { 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/bits/subdomain_ids_03.cc b/tests/bits/subdomain_ids_03.cc index a52ab4b44a..07a9112536 100644 --- a/tests/bits/subdomain_ids_03.cc +++ b/tests/bits/subdomain_ids_03.cc @@ -70,7 +70,7 @@ void test () dof_handler.distribute_dofs (fe); deallog << dof_handler.n_dofs() << std::endl; - std::vector new_indices (dof_handler.n_dofs()); + std::vector new_indices (dof_handler.n_dofs()); DoFRenumbering::compute_subdomain_wise (new_indices, dof_handler); for (unsigned int i=0; i bv; + std::map bv; VectorTools::interpolate_boundary_values (dof_handler, boundary_id, Functions::SquareFunction(), diff --git a/tests/codim_one/interpolate_boundary_values_1d_closed_ring.cc b/tests/codim_one/interpolate_boundary_values_1d_closed_ring.cc index 8bf60f5b1c..a2c860eb9c 100644 --- a/tests/codim_one/interpolate_boundary_values_1d_closed_ring.cc +++ b/tests/codim_one/interpolate_boundary_values_1d_closed_ring.cc @@ -70,7 +70,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/dof_renumbering.cc b/tests/deal.II/dof_renumbering.cc index 91b93e151d..68a93fd1fb 100644 --- a/tests/deal.II/dof_renumbering.cc +++ b/tests/deal.II/dof_renumbering.cc @@ -58,7 +58,7 @@ template void print_dofs (const MGDoFHandler &dof, unsigned int level) { - std::vector v (dof.get_fe().dofs_per_cell); + std::vector v (dof.get_fe().dofs_per_cell); for (typename MGDoFHandler::cell_iterator cell=dof.begin(level); cell != dof.end(level); ++cell) { diff --git a/tests/deal.II/dof_renumbering_04a.cc b/tests/deal.II/dof_renumbering_04a.cc index 3bb924e0ce..f2f31b986e 100644 --- a/tests/deal.II/dof_renumbering_04a.cc +++ b/tests/deal.II/dof_renumbering_04a.cc @@ -66,7 +66,7 @@ check () DoFHandler dof(tr); dof.distribute_dofs(fe); - std::vector new_dofs (dof.n_dofs()); + std::vector new_dofs (dof.n_dofs()); DoFRenumbering::boost::compute_Cuthill_McKee(new_dofs, dof); for (unsigned int i=0; iset_active_fe_index(1); dof.distribute_dofs(element); - std::vector count (element.n_components()); + std::vector count (element.n_components()); DoFTools::count_dofs_per_component (dof, count, true); for (unsigned int d=0; d::make_grid_and_dofs() DoFRenumbering::component_wise(dof_handler); - std::vector dofs_per_block(2); + std::vector dofs_per_block(2); DoFTools::count_dofs_per_block(dof_handler, dofs_per_block, block_component); const unsigned int n_stress_dof = dofs_per_block[0]; diff --git a/tests/deal.II/filtered_matrix.cc b/tests/deal.II/filtered_matrix.cc index bce56ebe86..f6b74cad1b 100644 --- a/tests/deal.II/filtered_matrix.cc +++ b/tests/deal.II/filtered_matrix.cc @@ -45,7 +45,7 @@ void -solve_filtered (std::map &bv, +solve_filtered (std::map &bv, SparseMatrix &A, Vector &u, Vector &f) diff --git a/tests/deal.II/grid_transform_3d.cc b/tests/deal.II/grid_transform_3d.cc index 6d881b157a..7387728549 100644 --- a/tests/deal.II/grid_transform_3d.cc +++ b/tests/deal.II/grid_transform_3d.cc @@ -40,7 +40,7 @@ int main () // build up a map of vertex indices // of boundary vertices to the new // boundary points - std::map > new_points; + std::map > new_points; Triangulation::active_cell_iterator cell=tria.begin_active(), endc=tria.end(); diff --git a/tests/deal.II/inhomogeneous_constraints_04.cc b/tests/deal.II/inhomogeneous_constraints_04.cc index 2559eaed47..0d3250ae0a 100644 --- a/tests/deal.II/inhomogeneous_constraints_04.cc +++ b/tests/deal.II/inhomogeneous_constraints_04.cc @@ -67,11 +67,11 @@ void test(bool use_constraint_matrix) // "assemble": - std::vector local_dofs1; + std::vector local_dofs1; for (unsigned int i=0;i<5;++i) local_dofs1.push_back(i); - std::vector local_dofs2; + std::vector local_dofs2; local_dofs2.push_back(1); for (unsigned int i=1;i<5;++i) local_dofs2.push_back(3+i); @@ -115,9 +115,9 @@ void test(bool use_constraint_matrix) } std::map boundary_values; - boundary_values.insert (std::pair(1, -5.0)); - boundary_values.insert (std::pair(3, 2.0)); - boundary_values.insert (std::pair(4, 0.0)); + boundary_values.insert (std::pair(1, -5.0)); + boundary_values.insert (std::pair(3, 2.0)); + boundary_values.insert (std::pair(4, 0.0)); MatrixTools::apply_boundary_values (boundary_values, mat, solution, diff --git a/tests/deal.II/inhomogeneous_constraints_block.cc b/tests/deal.II/inhomogeneous_constraints_block.cc index 88881930a8..c57859a1f8 100644 --- a/tests/deal.II/inhomogeneous_constraints_block.cc +++ b/tests/deal.II/inhomogeneous_constraints_block.cc @@ -135,7 +135,7 @@ void AdvectionProblem::setup_system () 0, ConstantFunction(1.,2), boundary_values); - std::map::const_iterator boundary_value = + std::map::const_iterator boundary_value = boundary_values.begin(); for ( ; boundary_value !=boundary_values.end(); ++boundary_value) { diff --git a/tests/deal.II/inhomogeneous_constraints_nonsymmetric.cc b/tests/deal.II/inhomogeneous_constraints_nonsymmetric.cc index 5fa66fa125..132ce74619 100644 --- a/tests/deal.II/inhomogeneous_constraints_nonsymmetric.cc +++ b/tests/deal.II/inhomogeneous_constraints_nonsymmetric.cc @@ -139,7 +139,7 @@ void AdvectionProblem::setup_system () 0, RightHandSide(), boundary_values); - std::map::const_iterator boundary_value = + std::map::const_iterator boundary_value = boundary_values.begin(); for ( ; boundary_value !=boundary_values.end(); ++boundary_value) { diff --git a/tests/deal.II/interpolate_boundary_values_01.cc b/tests/deal.II/interpolate_boundary_values_01.cc index f6ecedf816..901855633c 100644 --- a/tests/deal.II/interpolate_boundary_values_01.cc +++ b/tests/deal.II/interpolate_boundary_values_01.cc @@ -129,7 +129,7 @@ void FindBug::make_grid_and_dofs () template void FindBug::dirichlet_conditions () { - std::map dirichlet_dofs; + std::map dirichlet_dofs; std::vector component_mask(dim+1, false); component_mask[dim] = true; diff --git a/tests/deal.II/matrices.cc b/tests/deal.II/matrices.cc index aa8de37812..8a7b29f574 100644 --- a/tests/deal.II/matrices.cc +++ b/tests/deal.II/matrices.cc @@ -67,7 +67,7 @@ check_boundary (const DoFHandler &dof, QGauss face_quadrature(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/deal.II/project_boundary_rt_01.cc b/tests/deal.II/project_boundary_rt_01.cc index 8a9157f0d7..1c5a229ea5 100644 --- a/tests/deal.II/project_boundary_rt_01.cc +++ b/tests/deal.II/project_boundary_rt_01.cc @@ -132,7 +132,7 @@ void test_projection (const Triangulation& tr, MappingQ1 mapping; TestFunction f(degree-1); - std::map boundary_constraints; + std::map boundary_constraints; typename FunctionMap::type boundary_map; for (types::boundary_id i=0;i<255;++i) boundary_map[i] = &f; @@ -145,7 +145,7 @@ void test_projection (const Triangulation& tr, // boundary values Vector u(dof.n_dofs()); u = -1.; - for (typename std::map::const_iterator + for (typename std::map::const_iterator i = boundary_constraints.begin(); i != boundary_constraints.end(); ++i) u(i->first) = i->second; diff --git a/tests/deal.II/sparsity_pattern.cc b/tests/deal.II/sparsity_pattern.cc index 612ef30a7a..daee93ba97 100644 --- a/tests/deal.II/sparsity_pattern.cc +++ b/tests/deal.II/sparsity_pattern.cc @@ -60,7 +60,7 @@ template void check_boundary (const DoFHandler &dof) { - 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/deal.II/sparsity_pattern_01.cc b/tests/deal.II/sparsity_pattern_01.cc index 97e689df02..1b9c2ec3b8 100644 --- a/tests/deal.II/sparsity_pattern_01.cc +++ b/tests/deal.II/sparsity_pattern_01.cc @@ -59,7 +59,7 @@ template void check_boundary (const DoFHandler &dof) { - 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/deal.II/sparsity_pattern_01_x.cc b/tests/deal.II/sparsity_pattern_01_x.cc index 1e9284f20d..df5183ede5 100644 --- a/tests/deal.II/sparsity_pattern_01_x.cc +++ b/tests/deal.II/sparsity_pattern_01_x.cc @@ -60,7 +60,7 @@ template void check_boundary (const DoFHandler &dof) { - 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/deal.II/sparsity_pattern_x.cc b/tests/deal.II/sparsity_pattern_x.cc index 6d8058aa07..7196446416 100644 --- a/tests/deal.II/sparsity_pattern_x.cc +++ b/tests/deal.II/sparsity_pattern_x.cc @@ -60,7 +60,7 @@ template void check_boundary (const DoFHandler &dof) { - 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/deal.II/vertex_as_face_06.cc b/tests/deal.II/vertex_as_face_06.cc index 03a82bae0e..e3e08ba120 100644 --- a/tests/deal.II/vertex_as_face_06.cc +++ b/tests/deal.II/vertex_as_face_06.cc @@ -40,7 +40,7 @@ void test () DoFHandler<1,spacedim> dof_handler (tria); dof_handler.distribute_dofs (fe); - std::vector dof_indices(fe.dofs_per_face); + std::vector dof_indices(fe.dofs_per_face); deallog << "Coarse mesh:" << std::endl; dof_handler.begin_active()->face(0)->get_dof_indices (dof_indices); diff --git a/tests/deal.II/vertex_as_face_07.cc b/tests/deal.II/vertex_as_face_07.cc index 0e1438687c..e26dd75503 100644 --- a/tests/deal.II/vertex_as_face_07.cc +++ b/tests/deal.II/vertex_as_face_07.cc @@ -35,7 +35,7 @@ void print_dofs (const typename hp::DoFHandler<1,spacedim>::face_iterator &i, const unsigned int fe_index, const unsigned int n) { - std::vector dof_indices (n); + std::vector dof_indices (n); i->get_dof_indices (dof_indices, fe_index); for (unsigned int i=0; i void print_dofs (const typename hp::DoFHandler<1,spacedim>::cell_iterator &i, const unsigned int n) { - std::vector dof_indices (n); + std::vector dof_indices (n); i->get_dof_indices (dof_indices); for (unsigned int i=0; i dofs_per_component (fe.n_components()); + std::vector dofs_per_component (fe.n_components()); DoFTools::count_dofs_per_component (dof_handler, dofs_per_component); Assert (std::accumulate (dofs_per_component.begin(), dofs_per_component.end(), 0U) diff --git a/tests/hp/fe_nothing_09.cc b/tests/hp/fe_nothing_09.cc index 2861defa33..b66358b52b 100644 --- a/tests/hp/fe_nothing_09.cc +++ b/tests/hp/fe_nothing_09.cc @@ -67,12 +67,12 @@ void test () dof_handler.distribute_dofs (fe_collection); deallog << dof_handler.n_dofs() << " dofs" << std::endl; - std::map bv; + std::map bv; VectorTools::interpolate_boundary_values (dof_handler, 0, ZeroFunction(2), bv); - for (std::map::iterator + for (std::map::iterator p = bv.begin(); p!=bv.end(); ++p) deallog << p->first << ' ' << p->second << std::endl; } diff --git a/tests/hp/renumber_block_wise_01a.cc b/tests/hp/renumber_block_wise_01a.cc index 75fd72215e..f2ec1b139d 100644 --- a/tests/hp/renumber_block_wise_01a.cc +++ b/tests/hp/renumber_block_wise_01a.cc @@ -39,7 +39,7 @@ template -std::vector +std::vector get_dofs (const hp::DoFHandler &dof) { std::vector local; diff --git a/tests/hp/step-12.cc b/tests/hp/step-12.cc index 87c27cb46d..472e7cff1d 100644 --- a/tests/hp/step-12.cc +++ b/tests/hp/step-12.cc @@ -571,8 +571,8 @@ template void DGMethod::assemble_system2 () { const unsigned int dofs_per_cell = dof_handler.get_fe()[0].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/lac/full_matrix_05.cc b/tests/lac/full_matrix_05.cc index 5685759a48..098b33b7da 100644 --- a/tests/lac/full_matrix_05.cc +++ b/tests/lac/full_matrix_05.cc @@ -32,11 +32,11 @@ void test () A(i,j) = i+j; // pick every other row and column - std::vector rows (A.m()/2); + std::vector rows (A.m()/2); for (unsigned int i=0; i cols (A.n()/2); + std::vector cols (A.n()/2); for (unsigned int i=0; i prec_sor; prec_sor.initialize(A, 1.); - std::vector permutation(dim); - std::vector inverse_permutation(dim); + std::vector permutation(dim); + std::vector inverse_permutation(dim); // Create a permutation: Blocks // backwards and every second diff --git a/tests/lac/solver_relaxation_03.cc b/tests/lac/solver_relaxation_03.cc index 9d059c2afe..a7f106b962 100644 --- a/tests/lac/solver_relaxation_03.cc +++ b/tests/lac/solver_relaxation_03.cc @@ -89,8 +89,8 @@ int main() PreconditionBlock,double>::AdditionalData prec_data(blocksize, 0.8); // The permutation vectors; - std::vector bperm(n_blocks); - std::vector ibperm(n_blocks); + std::vector bperm(n_blocks); + std::vector ibperm(n_blocks); relax_data.block_list.reinit(n_blocks, dim, blocksize); for (unsigned int block=0;block permutation(4); + std::vector permutation(4); SparsityTools::reorder_Cuthill_McKee (sp, permutation); for (unsigned int i=0; i & + const std::vector & constrained_dofs = data.get_constrained_dofs(); for (unsigned int i=0; i::iterator bc_it = boundary_indices[level].begin(); + std::set::iterator bc_it = boundary_indices[level].begin(); for ( ; bc_it != boundary_indices[level].end(); ++bc_it) mg_constraints[level].add_line(*bc_it); diff --git a/tests/mpi/count_dofs_per_block_01.cc b/tests/mpi/count_dofs_per_block_01.cc index 2f79c333ca..69e57d2011 100644 --- a/tests/mpi/count_dofs_per_block_01.cc +++ b/tests/mpi/count_dofs_per_block_01.cc @@ -51,7 +51,7 @@ void test() DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs (fe); - std::vector dofs_per_block (fe.n_blocks()); + std::vector dofs_per_block (fe.n_blocks()); DoFTools::count_dofs_per_block (dof_handler, dofs_per_block); if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0) diff --git a/tests/mpi/map_dofs_to_support_points.cc b/tests/mpi/map_dofs_to_support_points.cc index 7872b3dd84..853c4778ec 100644 --- a/tests/mpi/map_dofs_to_support_points.cc +++ b/tests/mpi/map_dofs_to_support_points.cc @@ -44,7 +44,7 @@ void test() points); if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0) { - for (typename std::map >::const_iterator + for (typename std::map >::const_iterator p = points.begin(); p != points.end(); ++p) diff --git a/tests/mpi/p4est_2d_dofhandler_04.cc b/tests/mpi/p4est_2d_dofhandler_04.cc index a36a7be393..ed764c2ae8 100644 --- a/tests/mpi/p4est_2d_dofhandler_04.cc +++ b/tests/mpi/p4est_2d_dofhandler_04.cc @@ -104,7 +104,7 @@ void test() if (!cell->is_artificial()) { cell->get_dof_indices (local_dof_indices); - for (std::vector::iterator it=local_dof_indices.begin(); it!= local_dof_indices.end(); ++it) + for (std::vector::iterator it=local_dof_indices.begin(); it!= local_dof_indices.end(); ++it) { unsigned int invalid_dofindex = DoFHandler::invalid_dof_index; Assert(*it!=invalid_dofindex, ExcInternalError()); diff --git a/tests/mpi/petsc_01.cc b/tests/mpi/petsc_01.cc index ecbb3706ff..6aa1515365 100644 --- a/tests/mpi/petsc_01.cc +++ b/tests/mpi/petsc_01.cc @@ -43,7 +43,7 @@ void test() csp.add(1,0); PETScWrappers::MPI::SparseMatrix mat; - std::vector< unsigned int > local_rows(numprocs,2); + std::vector local_rows(numprocs,2); mat.reinit(MPI_COMM_WORLD, csp, local_rows, local_rows, myid); diff --git a/tests/mpi/petsc_02.cc b/tests/mpi/petsc_02.cc index 4de69e5d56..92e5a51852 100644 --- a/tests/mpi/petsc_02.cc +++ b/tests/mpi/petsc_02.cc @@ -41,7 +41,7 @@ void test() csp.add(1,1); PETScWrappers::MPI::SparseMatrix mat; - std::vector< unsigned int > local_rows(numprocs, 0); + std::vector local_rows(numprocs, 0); local_rows[0]=2; mat.reinit(MPI_COMM_WORLD, csp, local_rows, local_rows, myid); diff --git a/tests/mpi/trilinos_compress_bug.cc b/tests/mpi/trilinos_compress_bug.cc index d6cf7d124b..7a2da7ac16 100644 --- a/tests/mpi/trilinos_compress_bug.cc +++ b/tests/mpi/trilinos_compress_bug.cc @@ -43,14 +43,14 @@ void test () TrilinosWrappers::MPI::Vector test1(locally_owned); if (myid==0) { - unsigned int idx[]={0,1,2,3,4,5,6,7,8}; + types::global_dof_index idx[]={0,1,2,3,4,5,6,7,8}; double val[]={0,1,2,3,4,5,6,7,8}; test1.add(9,idx,val); } else { { - unsigned int idx[]={1,9,3,10,5,11,12,13,14}; + types::global_dof_index idx[]={1,9,3,10,5,11,12,13,14}; double val[]={1,9,3,10,5,11,12,13,14}; test1.add(9,idx,val); } diff --git a/tests/petsc/block_vector_iterator_03.cc b/tests/petsc/block_vector_iterator_03.cc index 8778f7f1a2..7e6ff61449 100644 --- a/tests/petsc/block_vector_iterator_03.cc +++ b/tests/petsc/block_vector_iterator_03.cc @@ -40,7 +40,7 @@ bool operator == (const PETScWrappers::BlockVector &v1, void test () { - std::vector ivector(4); + std::vector ivector(4); ivector[0] = 2; ivector[1] = 4; ivector[2] = 3; diff --git a/tests/serialization/dof_handler_01.cc b/tests/serialization/dof_handler_01.cc index 159f5aad00..126fc6470a 100644 --- a/tests/serialization/dof_handler_01.cc +++ b/tests/serialization/dof_handler_01.cc @@ -86,8 +86,8 @@ namespace dealii // compare dofs on this cell and then on the faces if (c1->has_children() == false) { - std::vector local_dofs_1 (c1->get_fe().dofs_per_cell); - std::vector local_dofs_2 (c2->get_fe().dofs_per_cell); + std::vector local_dofs_1 (c1->get_fe().dofs_per_cell); + std::vector local_dofs_2 (c2->get_fe().dofs_per_cell); c1->get_dof_indices (local_dofs_1); c2->get_dof_indices (local_dofs_2); diff --git a/tests/trilinos/49a.cc b/tests/trilinos/49a.cc index 37b0da5966..9a670d2bea 100644 --- a/tests/trilinos/49a.cc +++ b/tests/trilinos/49a.cc @@ -28,7 +28,7 @@ void test (TrilinosWrappers::BlockVector &v) { - std::vector sizes (2, 3); + std::vector sizes (2, 3); dealii::BlockVector w (sizes); for (unsigned int i=0; i sizes (2, 3); + std::vector sizes (2, 3); TrilinosWrappers::BlockVector v (sizes); test (v); } diff --git a/tests/trilinos/49b.cc b/tests/trilinos/49b.cc index 22f08a0290..81fab055dd 100644 --- a/tests/trilinos/49b.cc +++ b/tests/trilinos/49b.cc @@ -28,7 +28,7 @@ void test (TrilinosWrappers::MPI::BlockVector &v) { - std::vector sizes (2, 3); + std::vector sizes (2, 3); dealii::BlockVector w (sizes); for (unsigned int i=0; i row_lengths (5, 3U); + std::vector row_lengths (5, + static_cast(3)); row_lengths.back() = 2; TrilinosWrappers::SparseMatrix m (5U,5U,row_lengths); test (m); diff --git a/tests/trilinos/67.cc b/tests/trilinos/67.cc index 09745e2e76..4e2c81fbed 100644 --- a/tests/trilinos/67.cc +++ b/tests/trilinos/67.cc @@ -78,8 +78,8 @@ void test (TrilinosWrappers::SparseMatrix &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/trilinos/69.cc b/tests/trilinos/69.cc index fce91f9230..d2d03aed17 100644 --- a/tests/trilinos/69.cc +++ b/tests/trilinos/69.cc @@ -82,8 +82,8 @@ void test (TrilinosWrappers::SparseMatrix &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/trilinos/block_sparse_matrix_add_01.cc b/tests/trilinos/block_sparse_matrix_add_01.cc index 01b85b6a32..dc9b928db1 100644 --- a/tests/trilinos/block_sparse_matrix_add_01.cc +++ b/tests/trilinos/block_sparse_matrix_add_01.cc @@ -82,8 +82,8 @@ void test () full_matrix(block_row*2+1,block_col*2) = -1.; } - std::vector local_row_indices (2*m.n_block_rows()); - std::vector local_col_indices (2*m.n_block_cols()); + std::vector local_row_indices (2*m.n_block_rows()); + std::vector local_col_indices (2*m.n_block_cols()); for (unsigned int i=0; i local_row_indices (2*m.n_block_rows()); - std::vector local_col_indices (2*m.n_block_cols()); + std::vector local_row_indices (2*m.n_block_rows()); + std::vector local_col_indices (2*m.n_block_cols()); for (unsigned int i=0; i ivector(4); + std::vector ivector(4); ivector[0] = 2; ivector[1] = 4; ivector[2] = 3; diff --git a/tests/trilinos/sparse_matrix_add_01.cc b/tests/trilinos/sparse_matrix_add_01.cc index 04ffb49891..dd998305e6 100644 --- a/tests/trilinos/sparse_matrix_add_01.cc +++ b/tests/trilinos/sparse_matrix_add_01.cc @@ -40,7 +40,7 @@ void test (TrilinosWrappers::SparseMatrix &m) // now add the same elements row-wise { - std::vector col_indices (m.n()/3+1); + std::vector col_indices (m.n()/3+1); std::vector col_values (m.n()/3+1); for (unsigned int i=0; i full_matrix(2,2); full_matrix(0,0) = full_matrix(1,1) = 1.; full_matrix(0,1) = full_matrix(1,0) = -1.; - std::vector local_indices (2); + std::vector local_indices (2); for (unsigned int i=0; i col_indices (m.n()/3+1); + std::vector col_indices (m.n()/3+1); std::vector col_values (m.n()/3+1); for (unsigned int i=0; i full_matrix(2,2); full_matrix(0,0) = full_matrix(1,1) = 1.; full_matrix(0,1) = full_matrix(1,0) = -1.; - std::vector local_indices (2); + std::vector local_indices (2); for (unsigned int i=0; i